download
npm install weui-miniprogram --save
After downloading, the micro-channel developer tools click on Tools -> Build npm
Configuration
Modify usingComponents field in app.json in:
"usingComponents": {
// 自定义组件
"v-order": "components/order/order",
"v-score": "components/score/score",
// 有赞组件
"van-tab": "vant-weapp/tab/index",
"van-tabs": "vant-weapp/tabs/index",
"van-dialog": "vant-weapp/dialog/index",
"van-popup": "vant-weapp/popup/index",
"van-cell": "vant-weapp/cell/index",
// weiui 组件
"mp-cells": "weui-miniprogram/cells/cells",
"mp-cell": "weui-miniprogram/cell/cell",
"mp-badge": "weui-miniprogram/badge/badge"
},
Here to global configuration, you can also configure the page file that page's .json
The introduction of css:
/* app.wxss */
@import '/miniprogram_npm/weui-miniprogram/weui-wxss/dist/style/weui.wxss';
use
<mp-cells>
<mp-cell title="隐私声明"
link
bindtap="toPrivacy">
</mp-cell>
<mp-cell title="注销说明"
link
bindtap="toLogout">
</mp-cell>
</mp-cells>