当前位置:网站首页>uni-ui安装
uni-ui安装
2022-07-30 23:11:00 【Hel1x】
uni-ui安装
快速开始
在HBuilderX 新建uni-app项目的模板中,选择uni-ui模板即可使用
npm安装
npm install @dcloudio/uni-ui
安装后node_modules文件夹内增加dcloudio文件夹
官方文档
注意 cli 项目默认是不编译 node_modules 下的组件的,导致条件编译等功能失效 ,导致组件异常 需要在根目录创建 vue.config.js 文件 ,增加 @dcloudio/uni-ui 包的编译即可正常
// vue.config.js
module.exports = {
transpileDependencies:['@dcloudio/uni-ui']
}
配置easycom
使用 npm 安装好 uni-ui 之后,需要配置 easycom 规则,让 npm 安装的组件支持 easycom
打开项目根目录下的 pages.json 并添加 easycom 节点:
// pages.json
{
"easycom": {
"autoscan": true,
"custom": {
// uni-ui 规则如下配置
"^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"
}
},
// 其他内容
pages:[
// ...
]
}
本人配置到这里就能够使用uni-ui组件了
边栏推荐
猜你喜欢
![[MySQL] DQL related operations](/img/a5/c92e0404c6a970a62595bc7a3b68cd.gif)
[MySQL] DQL related operations

StoneDB 为何敢称业界唯一开源的 MySQL 原生 HTAP 数据库?

ML's shap: Based on FIFA 2018 Statistics (2018 Russia World Cup) team match star classification prediction data set using RF random forest + calculating SHAP value single-sample force map/dependency c

【MySQL】MySQL中对数据库及表的相关操作

ML之shap:基于FIFA 2018 Statistics(2018年俄罗斯世界杯足球赛)球队比赛之星分类预测数据集利用RF随机森林+计算SHAP值单样本力图/依赖关系贡献图可视化实现可解释性之攻略

阿里云视频点播+项目实战

2sk2225代换3A/1500V中文资料【PDF数据手册】

#yyds干货盘点# 面试必刷TOP101:判断链表中是否有环

IJCAI2022 Tutorial | Spoken Language Comprehension: Recent Advances and New Fields

Detailed operator
随机推荐
Detailed operator
【MySQL】MySQL中对数据库及表的相关操作
"NIO Cup" 2022 Nioke Summer Multi-School Training Camp 2 H.Take the Elevator
“由于找不到MSVCP140.dll,无法继续执行代码,重新安装程序可能会解决此问题等”解决方案
PyTorch model export to ONNX file example (LeNet-5)
Gxlcms audio novel system/novel listening system source code
Summary of BFS questions
grub learning
A detailed explanation: SRv6 Policy model, calculation and drainage
2022.7.27
Reverse linked list - head insertion inversion method
第十九周进度(了解物联网基础知识)
【2022-05-31】JS逆向之易企秀
# # yyds dry goods inventory interview will brush TOP101: to determine whether there is a part of the list
VS2017 compile Tars test project
2022 Nioke Summer Multi-School Training Camp 1 J Serval and Essay
MySQL索引常见面试题(2022版)
The problem of sticky packets in tcp protocol transmission
ThinkPHP high imitation blue play cloud network disk system source code / docking easy payment system program
Successfully solved ImportError: always import the name '_validate_lengths'