-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathmain.js
45 lines (36 loc) · 1019 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import Vue from "vue";
import App from "./App";
import * as filters from "./utils/filters.js"; // global filter
import uView from "uview-ui";
import store from "./store";
import config from '@/config/config';
// 引入uView对小程序分享的mixin封装
let mpShare = require('uview-ui/libs/mixin/mpShare.js');
Vue.mixin(mpShare)
/**
* 全局filters
*/
Object.keys(filters).forEach((key) => {
Vue.filter(key, filters[key]);
});
// 引入Vuex
Vue.prototype.$store = store;
Vue.use(uView);
Vue.config.productionTip = false;
/**
* 注意!
* 此处将常用的颜色嵌入到原型链上面
* 颜色使用驼峰命名对应 uni.scss中全局颜色变量名
* 如需更换主题请修改此处以及uni.scss中的全局颜色
*/
// 主题色
Vue.prototype.$mainColor = config.mainColor;
// 高亮主题色
Vue.prototype.$lightColor = config.lightColor;
// 辅助高亮颜色
Vue.prototype.$aiderLightColor = config.aiderLightColor;
App.mpType = "app";
const app = new Vue({
...App,
});
app.$mount();