赞
踩
1.npm 安装
- npm i @dcloudio/uni-ui
- yarn add @dcloudio/uni-ui
- pnpm add @dcloudio/uni-ui
2.在page.json中引入规则
- {
- "easycom": {
- "autoscan": true,
- "custom": {
- // uni-ui 规则如下配置
- "^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"
- }
- },
-
- // 其他内容
- pages:[
- // ...
- ]
- }
3.重启项目,直接引入组件,无需注册组件 即可使用
- <uni-card title="基础卡片" sub-title="副标题" extra="额外信息"
- thumbnail="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png">
- <text>这是一个带头像和双标题的基础卡片,此示例展示了一个完整的卡片。</text>
- </uni-card>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。