wechat-cpm-components
v1.0.0
Published
微信小程序通用前端组件库
Maintainers
Readme
wechat-cpm-components
微信小程序通用前端组件库
组件列表
| 组件 | 说明 | |------|------| | wc-button | 按钮 | | wc-card | 卡片 | | wc-avatar | 头像 | | wc-loading | 加载 | | wc-empty | 空状态 | | wc-badge | 徽章 |
安装
npm install wechat-cpm-components安装后在微信开发者工具中点击 工具 -> 构建 npm。
使用
在页面的 json 文件中引入组件:
{
"usingComponents": {
"wc-button": "wechat-cpm-components/button/index",
"wc-card": "wechat-cpm-components/card/index",
"wc-avatar": "wechat-cpm-components/avatar/index",
"wc-loading": "wechat-cpm-components/loading/index",
"wc-empty": "wechat-cpm-components/empty/index",
"wc-badge": "wechat-cpm-components/badge/index"
}
}本地开发
npm run build # 构建
npm run dev # 监听模式构建发布
npm run build
npm publish