Blame view

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