Blame view

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