下载
https://github.com/TalkingData/iview-weapp
打开示例
# 从 GitHub 下载后,安装依赖
npm i
将 examples 目录在微信开发者工具中打开即可
使用
1、将 dist 目录拷贝到自己的项目中
2、查看文档 https://weapp.iviewui.com
①在使用组件的页面的 json 文件中配置(路径根据自己项目位置配置):
{
"usingComponents": {
"i-card": "../../dist/card/index",
"i-button": "../../dist/button/index",
"i-badge": "../../dist/badge/index"
}
}
②在使用组件的页面 wxml 中使用组件
<i-card title="卡片标题" extra="额外内容" thumb="https://i.loli.net/2017/08/21/599a521472424.jpg">
<view slot="content">内容不错</view>
<view slot="footer">尾部内容</view>
</i-card>
<i-button bind:click="handleClick" type="info">Info</i-button>```