Blame view

src/main.js 2.68 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'  // 引入公共样式
  
94c1e6a3   liuqimichale   微信公众号 个人页面集合
9
  
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
10
11
12
13
  // import MintUI from 'mint-ui'
  // import 'mint-ui/lib/style.css'
  // Vue.use(MintUI)  // 引入MintUI
  
002e5c7b   刘淇   添加车牌
14
  import Mint from 'mint-ui';
bb951693   liuqimichale   赤峰微信公众号 -- 临停支付
15
  import 'mint-ui/lib/style.css'
002e5c7b   刘淇   添加车牌
16
17
18
  Vue.use(Mint);
  
  
76b0bb3d   刘淇   车辆认证
19
20
21
  import { MessageBox } from 'mint-ui'
  // Vue.use(MessageBox)
  Vue.prototype.$msgbox = MessageBox
002e5c7b   刘淇   添加车牌
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
  
0c49c87e   liuqimichale   微信公众号 初始化
49
  
dcf54a32   刘淇   扬名微信公众号
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
  
  import {
    XHeader,
    XInput,
    Group,
    XButton,
    Tabbar,
    TabbarItem,
    Tab,
    TabItem,
    Cell,
    CellBox,
    Checklist,
    CheckIcon,
    Swiper,
    SwiperItem,
    Divider,
    TransferDom,
    Confirm,
fe11c22e   刘淇   开票
69
    Toast,
71ca44b6   刘淇   个人中心
70
    dateFormat,
76b0bb3d   刘淇   车辆认证
71
    Loading,
aabd3df4   刘淇   购买会员卡
72
    XDialog
dcf54a32   刘淇   扬名微信公众号
73
74
  }from 'vux'
  
aabd3df4   刘淇   购买会员卡
75
  Vue.component('x-dialog', XDialog)
71ca44b6   刘淇   个人中心
76
  Vue.component('loading', Loading)
dcf54a32   刘淇   扬名微信公众号
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
  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   刘淇   个人中心
97
98
  import  { LoadingPlugin } from 'vux'
  Vue.use(LoadingPlugin)
dcf54a32   刘淇   扬名微信公众号
99
100
101
102
  
  import  { ToastPlugin } from 'vux'
  Vue.use(ToastPlugin)
  
76b0bb3d   刘淇   车辆认证
103
104
105
  import  { ConfirmPlugin } from 'vux'
  Vue.use(ConfirmPlugin)
  
13b6a53a   刘淇   title
106
107
108
109
110
111
112
  router.beforeEach((to, from, next) => {
    if(to.meta.title){
      document.title = to.meta.title
    }
    next()
  })
  
0c49c87e   liuqimichale   微信公众号 初始化
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
  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/>'
  })