初始配置
-
uni-app
vue create -p dcloudio/uni-preset-vue gouwushanchen //选默认模板 npm i sass npm i sass-loader@10
npm run dev:mp-weixin
微信开发工具导入:
\dist\dev\mp-weixin
manifest.json
"appid": "xxx",
-
uView
npm install uview-ui
main.js
import uView from "uview-ui"; Vue.use(uView);
uni.scss
@import ‘uview-ui/theme.scss‘;
App.vue
<style lang="scss"> @import "uview-ui/index.scss"; </style>
pages.json
"easycom": { "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" },
manifest.json
"mp-weixin": { /* 微信小程序特有相关 */ "appid": "xxx", "setting": { "urlCheck": false, "enhance": true }, "usingComponents": true },