main.js
2.33 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/**
* Created by aresn on 16/6/20.
*/
import Vue from 'vue';
import VueRouter from 'vue-router';
import App from './app.vue';
import iView from '../src/index';
// import locale from '../src/locale/lang/en-US';
import locale from '../src/locale/lang/zh-CN';
Vue.use(VueRouter);
Vue.use(iView, { locale });
// 开启debug模式
Vue.config.debug = true;
// 路由配置
const router = new VueRouter({
routes: [
{
path: '/affix',
component: require('./routers/affix.vue')
},
{
path: '/grid',
component: require('./routers/grid.vue')
},
{
path: '/button',
component: require('./routers/button.vue')
},
{
path: '/input',
component: require('./routers/input.vue')
},
{
path: '/radio',
component: require('./routers/radio.vue')
},
{
path: '/checkbox',
component: require('./routers/checkbox.vue')
},
{
path: '/steps',
component: require('./routers/steps.vue')
},
{
path: '/timeline',
component: require('./routers/timeline.vue')
},
{
path: '/switch',
component: require('./routers/switch.vue')
},
{
path: '/alert',
component: require('./routers/alert.vue')
},
{
path: '/badge',
component: require('./routers/badge.vue')
},
{
path: '/tag',
component: require('./routers/tag.vue')
},
{
path: '/input-number',
component: require('./routers/input-number.vue')
},
{
path: '/upload',
component: require('./routers/upload.vue')
},
{
path: '/progress',
component: require('./routers/progress.vue')
},
{
path: '/collapse',
component: require('./routers/collapse.vue')
},
{
path: '/carousel',
component: require('./routers/carousel.vue')
},
{
path: '/tree',
component: require('./routers/tree.vue')
}
]
});
new Vue({
el: '#app',
router: router,
render: h => h(App)
});