Wechat wxml support and wxml code snippets for VSCode
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.vscode
images
snippets
syntaxes
.editorconfig
.gitignore
CHANGELOG.md
LICENSE
README.md
language-configuration.json
package.json

README.md

微信小程序 wxml

为 VSCode 提供 wxml 语法支持及代码片段

version installs

安装

  1. 打开编辑器,Ctrl + Shift + X,搜索 weapp-wxml
  2. 点击 install

使用

键入关键词,然后回车。关键词不区分大小写

vscode-weapp-snippets

代码示例

  • swiper

    <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
      <block wx:for="{{imgUrls}}">
        <swiper-item>
          <image src="{{item}}" class="slide-image" />
        </swiper-item>
      </block>
    </swiper>
  • actionsheet

    <action-sheet>
      <block wx:for="{{actionSheetItems}}">
        <action-sheet-item class="item" data-name="{{item}}" />{{item}}</action-sheet-item>
      </block>
    </action-sheet>
  • checkgroup

    <checkbox-group>
      <label class="" wx:for="{{item}}">
        <checkbox value="item.name" />{{item.value}}
      </label>
    </checkbox-group>
  • wxfor

    wx:for="{{item in items}}"
  • button

    <button type="" size="" loading="" plain="" bindtap=""></button>
  • ······more

Enjoy!​​