Blame view

src/main.js 2.67 KB
0c49c87e   liuqimichale   微信公众号 初始化
1
2
3
4
5
6
7
8
  // The Vue build version to load with the `import` command
  // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
  import Vue from 'vue'
  import App from './App'
  import router from './router'
  
  import './assets/css/reset.css'  // 引入公共样式
  
3e498dc1   刘淇   历史记录
9
10
  // import h5Popup from 'vue-h5-popup' // 引入弹窗
  // Vue.use(h5Popup)
0c49c87e   liuqimichale   微信公众号 初始化
11
  
94c1e6a3   liuqimichale   微信公众号 个人页面集合
12
  
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
13
14
15
16
  // import MintUI from 'mint-ui'
  // import 'mint-ui/lib/style.css'
  // Vue.use(MintUI)  // 引入MintUI
  
94c1e6a3   liuqimichale   微信公众号 个人页面集合
17
  
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
18
19
20
21
  import 'mint-ui/lib/style.css'
  import { MessageBox } from 'mint-ui'
  // Vue.use(MessageBox)
  Vue.prototype.$msgbox = MessageBox
5d47daa7   刘淇   无锡微信公众号
22
23
  import { Indicator } from 'mint-ui';
  Vue.prototype.$Indicator = Indicator
c14fb301   liuqimichale   赤峰 输入车牌停车记录
24
25
26
27
28
  
  import { Field } from 'mint-ui';
  
  Vue.component(Field.name, Field);
  
94c1e6a3   liuqimichale   微信公众号 个人页面集合
29
30
31
32
  //全局设置的基本样式
  import './assets/css/base.scss'
  
  
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
33
34
35
36
37
38
  import moment from 'moment'
  // 设置本地时区
  moment.locale('zh-cn')
  Vue.prototype.$moment = moment
  
  
0c49c87e   liuqimichale   微信公众号 初始化
39
40
41
  import utils from './utils/utils' // 工具类
  Vue.prototype.$utils = utils
  
dcf54a32   刘淇   扬名微信公众号
42
43
44
  import common from './utils/common' // 公共
  Vue.prototype.$common = common
  
3e498dc1   刘淇   历史记录
45
46
47
  import variables from './utils/variables' // 公共验证
  Vue.prototype.$variables = variables
  
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
48
49
50
51
  import Mint from 'mint-ui';
  import 'mint-ui/lib/style.css'
  Vue.use(Mint);
  
0c49c87e   liuqimichale   微信公众号 初始化
52
  
dcf54a32   刘淇   扬名微信公众号
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
  
  import {
    XHeader,
    XInput,
    Group,
    XButton,
    Tabbar,
    TabbarItem,
    Tab,
    TabItem,
    Cell,
    CellBox,
    Checklist,
    CheckIcon,
    Swiper,
    SwiperItem,
    Divider,
    TransferDom,
    Confirm,
fe11c22e   刘淇   开票
72
    Toast,
71ca44b6   刘淇   个人中心
73
74
    dateFormat,
    Loading
dcf54a32   刘淇   扬名微信公众号
75
76
  }from 'vux'
  
71ca44b6   刘淇   个人中心
77
  Vue.component('loading', Loading)
dcf54a32   刘淇   扬名微信公众号
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
  Vue.component('Toast', Toast)
  Vue.component('Confirm', Confirm)
  Vue.component('TransferDom', TransferDom)
  Vue.component('Divider', Divider)
  Vue.component('SwiperItem', SwiperItem)
  Vue.component('Swiper', Swiper)
  Vue.component('CheckIcon', CheckIcon)
  Vue.component('Checklist', Checklist)
  Vue.component('Group', Group)
  Vue.component('Cell', Cell)
  Vue.component('cell-box', CellBox)
  Vue.component('x-header', XHeader);
  Vue.component('x-input', XInput);
  Vue.component('group', Group);
  Vue.component('x-button', XButton);
  Vue.component('tabbar', Tabbar);
  Vue.component('tabbar-item', TabbarItem);
  Vue.component('tab', Tab);
  Vue.component('tab-item', TabItem);
  
71ca44b6   刘淇   个人中心
98
99
  import  { LoadingPlugin } from 'vux'
  Vue.use(LoadingPlugin)
dcf54a32   刘淇   扬名微信公众号
100
101
102
103
  
  import  { ToastPlugin } from 'vux'
  Vue.use(ToastPlugin)
  
13b6a53a   刘淇   title
104
105
106
107
108
109
110
  router.beforeEach((to, from, next) => {
    if(to.meta.title){
      document.title = to.meta.title
    }
    next()
  })
  
0c49c87e   liuqimichale   微信公众号 初始化
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
  import 'swiper/dist/css/swiper.min.css' // 轮播
  import 'swiper/dist/js/swiper.min'
  
  import vueFilter from './utils/filters'  // 公共filter
  for (let key in vueFilter){
    Vue.filter(key,vueFilter[key])
  }
  
  Vue.config.productionTip = false
  
  /* eslint-disable no-new */
  new Vue({
    el: '#app',
    router,
    components: { App },
    template: '<App/>'
  })