npm install uview-plus
// main.js
import uviewPlus from 'uview-plus'
app.use(uviewPlus)
/* uni.scss */
@import 'uview-plus/theme.scss';
<style lang="scss">
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
@import "uview-plus/index.scss";
</style>
// pages.json
{
"easycom": {
// 注意一定要放在custom里,否则无效,https://ask.dcloud.net.cn/question/131175
"custom": {
"^u--(.*)": "uview-plus/components/u-$1/u-$1.vue",
"^up-(.*)": "uview-plus/components/u-$1/u-$1.vue",
"^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue"
}
},
// 此为本身已有的内容
"pages": [
// ......
]
}
配置完要重启hbuilderX
配置完要重启hbuilderX配置完要重启hbuilderX