// 安装
npm install uview-ui
npm i node-sass -D
npm i sass-loader -D
1.main.js 引入
// uview-ui
import uView from 'uview-ui'
Vue.use(uView)
2.uni.scss 引入
@import 'uview-ui/theme.scss';
3.App.vue 引入
<style lang="scss">
@import "uview-ui/index.scss";
</style>
4.pages.json 引入
"easycom": {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"page": [{}]
5.页面引入
<u-button type="error">危险按钮</u-button>
参考链接: https://blog.csdn.net/qq_40976321/article/details/106453181