Blame view

examples/main.js 6.35 KB
7fa943eb   梁灏   init
1
2
3
4
5
  /**
   * Created by aresn on 16/6/20.
   */
  import Vue from 'vue';
  import VueRouter from 'vue-router';
4df4ea19   jingsam   optimize project ...
6
  import App from './app.vue';
c571d9ec   梁灏   add a dialog to f...
7
  import iView from '../src/index';
d509d2b2   梁灏   fixed #192
8
  // import locale from '../src/locale/lang/en-US';
e5ac7925   梁灏   update Rate
9
  import locale from '../src/locale/lang/zh-CN';
7fa943eb   梁灏   init
10
11
  
  Vue.use(VueRouter);
e5ac7925   梁灏   update Rate
12
  Vue.use(iView, { locale });
7fa943eb   梁灏   init
13
14
15
16
17
  
  // 开启debug模式
  Vue.config.debug = true;
  
  // 路由配置
1f561319   梁灏   update webpack co...
18
  const router = new VueRouter({
11867c87   梁灏   update vue-loader...
19
      esModule: false,
1f561319   梁灏   update webpack co...
20
21
      routes: [
          {
a2eb0287   zhigang.li   add layout compon...
22
              path: '/layout',
11867c87   梁灏   update vue-loader...
23
              component: (resolve) => require(['./routers/layout.vue'], resolve)
a2eb0287   zhigang.li   add layout compon...
24
25
          },
          {
1f561319   梁灏   update webpack co...
26
              path: '/affix',
11867c87   梁灏   update vue-loader...
27
              component: (resolve) => require(['./routers/affix.vue'], resolve)
c755733a   梁灏   support Grid
28
29
30
          },
          {
              path: '/grid',
11867c87   梁灏   update vue-loader...
31
              component: (resolve) => require(['./routers/grid.vue'], resolve)
d47ea998   梁灏   support Button an...
32
33
34
          },
          {
              path: '/button',
11867c87   梁灏   update vue-loader...
35
              component: (resolve) => require(['./routers/button.vue'], resolve)
fc7ef072   梁灏   support Input
36
37
38
          },
          {
              path: '/input',
11867c87   梁灏   update vue-loader...
39
              component: (resolve) => require(['./routers/input.vue'], resolve)
06322514   梁灏   support Radio
40
41
42
          },
          {
              path: '/radio',
11867c87   梁灏   update vue-loader...
43
              component: (resolve) => require(['./routers/radio.vue'], resolve)
cbe03a12   梁灏   support Checkbox
44
45
46
          },
          {
              path: '/checkbox',
11867c87   梁灏   update vue-loader...
47
              component: (resolve) => require(['./routers/checkbox.vue'], resolve)
bd596e7a   huixisheng   support Steps
48
49
          },
          {
257f80f1   梁灏   support Form
50
              path: '/steps',
11867c87   梁灏   update vue-loader...
51
              component: (resolve) => require(['./routers/steps.vue'], resolve)
6c9e0282   huixisheng   Support timeline
52
53
          },
          {
257f80f1   梁灏   support Form
54
              path: '/timeline',
11867c87   梁灏   update vue-loader...
55
              component: (resolve) => require(['./routers/timeline.vue'], resolve)
2d5ba278   梁灏   support Switch
56
57
58
          },
          {
              path: '/switch',
11867c87   梁灏   update vue-loader...
59
              component: (resolve) => require(['./routers/switch.vue'], resolve)
5d122b37   梁灏   support Alert
60
61
62
          },
          {
              path: '/alert',
11867c87   梁灏   update vue-loader...
63
              component: (resolve) => require(['./routers/alert.vue'], resolve)
15368be1   梁灏   Support Badge
64
65
66
          },
          {
              path: '/badge',
11867c87   梁灏   update vue-loader...
67
              component: (resolve) => require(['./routers/badge.vue'], resolve)
456daf34   梁灏   support Tag
68
69
70
          },
          {
              path: '/tag',
11867c87   梁灏   update vue-loader...
71
              component: (resolve) => require(['./routers/tag.vue'], resolve)
c97c42ab   梁灏   support InputNumber
72
73
74
          },
          {
              path: '/input-number',
11867c87   梁灏   update vue-loader...
75
              component: (resolve) => require(['./routers/input-number.vue'], resolve)
5d08ddf2   梁灏   support Progress ...
76
77
78
          },
          {
              path: '/upload',
11867c87   梁灏   update vue-loader...
79
              component: (resolve) => require(['./routers/upload.vue'], resolve)
5d08ddf2   梁灏   support Progress ...
80
81
82
          },
          {
              path: '/progress',
11867c87   梁灏   update vue-loader...
83
              component: (resolve) => require(['./routers/progress.vue'], resolve)
a190ce84   梁灏   support Collapse
84
85
86
          },
          {
              path: '/collapse',
11867c87   梁灏   update vue-loader...
87
              component: (resolve) => require(['./routers/collapse.vue'], resolve)
bb71140e   梁灏   support Carousel
88
89
90
          },
          {
              path: '/carousel',
11867c87   梁灏   update vue-loader...
91
              component: (resolve) => require(['./routers/carousel.vue'], resolve)
a8cb711c   huixisheng   Support Card
92
93
94
          },
          {
              path: '/card',
11867c87   梁灏   update vue-loader...
95
              component: (resolve) => require(['./routers/card.vue'], resolve)
49dd45f4   huixisheng   Merge branch '2.0...
96
97
          },
          {
34ee7b4a   梁灏   support Tree & ad...
98
              path: '/tree',
11867c87   梁灏   update vue-loader...
99
              component: (resolve) => require(['./routers/tree.vue'], resolve)
6aa72722   huixisheng   Support rate
100
101
102
          },
          {
              path: '/rate',
11867c87   梁灏   update vue-loader...
103
              component: (resolve) => require(['./routers/rate.vue'], resolve)
b2d29401   梁灏   support Circle
104
105
106
          },
          {
              path: '/circle',
11867c87   梁灏   update vue-loader...
107
              component: (resolve) => require(['./routers/circle.vue'], resolve)
30510c3d   梁灏   support Tabs
108
109
110
          },
          {
              path: '/tabs',
11867c87   梁灏   update vue-loader...
111
              component: (resolve) => require(['./routers/tabs.vue'], resolve)
d6f644e1   梁灏   support Tooltip
112
113
114
          },
          {
              path: '/tooltip',
11867c87   梁灏   update vue-loader...
115
              component: (resolve) => require(['./routers/tooltip.vue'], resolve)
d6f644e1   梁灏   support Tooltip
116
117
          },
          {
79288d43   梁灏   support Poptip & ...
118
              path: '/poptip',
11867c87   梁灏   update vue-loader...
119
              component: (resolve) => require(['./routers/poptip.vue'], resolve)
79288d43   梁灏   support Poptip & ...
120
121
          },
          {
d6f644e1   梁灏   support Tooltip
122
              path: '/slider',
11867c87   梁灏   update vue-loader...
123
              component: (resolve) => require(['./routers/slider.vue'], resolve)
b1c118d8   梁灏   support Dropdown
124
125
126
          },
          {
              path: '/dropdown',
11867c87   梁灏   update vue-loader...
127
              component: (resolve) => require(['./routers/dropdown.vue'], resolve)
c06e99d0   huixisheng   Support Breadcrumb
128
129
130
          },
          {
              path: '/breadcrumb',
11867c87   梁灏   update vue-loader...
131
              component: (resolve) => require(['./routers/breadcrumb.vue'], resolve)
fd1582c5   梁灏   support Menu & La...
132
133
134
          },
          {
              path: '/menu',
11867c87   梁灏   update vue-loader...
135
              component: (resolve) => require(['./routers/menu.vue'], resolve)
2d43f26b   梁灏   support Spin
136
137
138
          },
          {
              path: '/spin',
11867c87   梁灏   update vue-loader...
139
              component: (resolve) => require(['./routers/spin.vue'], resolve)
47a7f21d   梁灏   support Cascader
140
141
142
          },
          {
              path: '/cascader',
11867c87   梁灏   update vue-loader...
143
              component: (resolve) => require(['./routers/cascader.vue'], resolve)
4aec6a66   梁灏   support Select
144
145
146
          },
          {
              path: '/select',
11867c87   梁灏   update vue-loader...
147
              component: (resolve) => require(['./routers/select.vue'], resolve)
1d8f7767   mod   support BackTop t...
148
149
150
          },
          {
              path: '/backtop',
11867c87   梁灏   update vue-loader...
151
              component: (resolve) => require(['./routers/back-top.vue'], resolve)
7d535fc9   Aresn   Merge branch '2.0...
152
153
          },
          {
87c51597   梁灏   support Page
154
              path: '/page',
11867c87   梁灏   update vue-loader...
155
              component: (resolve) => require(['./routers/page.vue'], resolve)
5b19b5f5   梁灏   support Transfer
156
157
158
          },
          {
              path: '/transfer',
11867c87   梁灏   update vue-loader...
159
              component: (resolve) => require(['./routers/transfer.vue'], resolve)
531cd165   梁灏   support DatePicke...
160
161
162
          },
          {
              path: '/date',
11867c87   梁灏   update vue-loader...
163
              component: (resolve) => require(['./routers/date.vue'], resolve)
257f80f1   梁灏   support Form
164
165
166
          },
          {
              path: '/form',
11867c87   梁灏   update vue-loader...
167
              component: (resolve) => require(['./routers/form.vue'], resolve)
257f80f1   梁灏   support Form
168
          },
486d4fda   梁灏   update Table
169
170
          {
              path: '/table',
11867c87   梁灏   update vue-loader...
171
              component: (resolve) => require(['./routers/table.vue'], resolve)
486d4fda   梁灏   update Table
172
          },
f97e5bb0   梁灏   support LoadingBar
173
174
          {
              path: '/loading-bar',
11867c87   梁灏   update vue-loader...
175
              component: (resolve) => require(['./routers/loading-bar.vue'], resolve)
6259471f   梁灏   support Modal
176
177
178
          },
          {
              path: '/modal',
11867c87   梁灏   update vue-loader...
179
              component: (resolve) => require(['./routers/modal.vue'], resolve)
6cadeba4   梁灏   support Message
180
181
182
          },
          {
              path: '/message',
11867c87   梁灏   update vue-loader...
183
              component: (resolve) => require(['./routers/message.vue'], resolve)
833501a4   梁灏   support Notice
184
185
186
          },
          {
              path: '/notice',
11867c87   梁灏   update vue-loader...
187
              component: (resolve) => require(['./routers/notice.vue'], resolve)
2c5faf30   梁灏   init Avatar compo...
188
189
190
          },
          {
              path: '/avatar',
11867c87   梁灏   update vue-loader...
191
              component: (resolve) => require(['./routers/avatar.vue'], resolve)
c6faec44   梁灏   init ColorPicker
192
193
194
          },
          {
              path: '/color-picker',
11867c87   梁灏   update vue-loader...
195
              component: (resolve) => require(['./routers/color-picker.vue'], resolve)
fed3e09d   梁灏   add AutoComplete ...
196
197
198
          },
          {
              path: '/auto-complete',
11867c87   梁灏   update vue-loader...
199
              component: (resolve) => require(['./routers/auto-complete.vue'], resolve)
c6487ddf   梁灏   update dependencies
200
201
202
          },
          {
              path: '/scroll',
11867c87   梁灏   update vue-loader...
203
              component: (resolve) => require(['./routers/scroll.vue'], resolve)
f97e5bb0   梁灏   support LoadingBar
204
          }
1f561319   梁灏   update webpack co...
205
      ]
7fa943eb   梁灏   init
206
207
  });
  
11867c87   梁灏   update vue-loader...
208
  const app = new Vue({
1f561319   梁灏   update webpack co...
209
210
      router: router,
      render: h => h(App)
11867c87   梁灏   update vue-loader...
211
  }).$mount('#app');