iView Weapp UI組件庫
今天來試試iView Weapp 這個微信小程序組件庫,看看好不好用~~
官網地址: http://inmap.talkingdata.com/wx/index_prod.html#/
掃碼觀看地址見:
使用方法
從https://github.com/TalkingData/iview-weapp 下載代碼,將 dist
目錄拷貝到自己的項目中。
- 添加需要的組件。在頁面的 json 中配置(路徑根據自己項目位置配置):
"usingComponents": {
"i-button": "../../dist/button/index"
}
- 在
wxml
中使用組件:
<i-button bind:click="handleClick" type="primary">Primary</i-button>
<i-button bind:click="handleClick" type="ghost">Ghost</i-button>
<i-button bind:click="handleClick" type="info">Info</i-button>
<i-button bind:click="handleClick" type="success">Success</i-button>
<i-button bind:click="handleClick" type="warning">Warning</i-button>
<i-button bind:click="handleClick" type="error">Error</i-button>
效果如下:
后面再詳細的使用下其他組件~~