1 | module.exports =
|
2 | (function(modules) {
|
3 |
|
4 | var installedModules = {};
|
5 |
|
6 |
|
7 | function __webpack_require__(moduleId) {
|
8 |
|
9 |
|
10 | if(installedModules[moduleId]) {
|
11 | return installedModules[moduleId].exports;
|
12 | }
|
13 |
|
14 | var module = installedModules[moduleId] = {
|
15 | i: moduleId,
|
16 | l: false,
|
17 | exports: {}
|
18 | };
|
19 |
|
20 |
|
21 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
22 |
|
23 |
|
24 | module.l = true;
|
25 |
|
26 |
|
27 | return module.exports;
|
28 | }
|
29 |
|
30 |
|
31 |
|
32 | __webpack_require__.m = modules;
|
33 |
|
34 |
|
35 | __webpack_require__.c = installedModules;
|
36 |
|
37 |
|
38 | __webpack_require__.d = function(exports, name, getter) {
|
39 | if(!__webpack_require__.o(exports, name)) {
|
40 | Object.defineProperty(exports, name, {
|
41 | configurable: false,
|
42 | enumerable: true,
|
43 | get: getter
|
44 | /******/ });
|
45 | /******/ }
|
46 | /******/ };
|
47 | /******/
|
48 | /******/ // getDefaultExport function for compatibility with non-harmony modules
|
49 | /******/ __webpack_require__.n = function(module) {
|
50 | var getter = module && module.__esModule ?
|
51 | function getDefault() { return module['default']; } :
|
52 | function getModuleExports() { return module; };
|
53 | __webpack_require__.d(getter, 'a', getter);
|
54 | return getter;
|
55 | };
|
56 |
|
57 |
|
58 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
59 |
|
60 |
|
61 | __webpack_require__.p = "/dist/";
|
62 |
|
63 |
|
64 | return __webpack_require__(__webpack_require__.s = 328);
|
65 | })
|
66 |
|
67 | ({
|
68 |
|
69 | 0:
|
70 | (function(module, exports) {
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 | module.exports = function normalizeComponent (
|
79 | rawScriptExports,
|
80 | compiledTemplate,
|
81 | functionalTemplate,
|
82 | injectStyles,
|
83 | scopeId,
|
84 | moduleIdentifier /* server only */
|
85 | ) {
|
86 | var esModule
|
87 | var scriptExports = rawScriptExports = rawScriptExports || {}
|
88 |
|
89 |
|
90 | var type = typeof rawScriptExports.default
|
91 | if (type === 'object' || type === 'function') {
|
92 | esModule = rawScriptExports
|
93 | scriptExports = rawScriptExports.default
|
94 | }
|
95 |
|
96 |
|
97 | var options = typeof scriptExports === 'function'
|
98 | ? scriptExports.options
|
99 | : scriptExports
|
100 |
|
101 |
|
102 | if (compiledTemplate) {
|
103 | options.render = compiledTemplate.render
|
104 | options.staticRenderFns = compiledTemplate.staticRenderFns
|
105 | options._compiled = true
|
106 | }
|
107 |
|
108 |
|
109 | if (functionalTemplate) {
|
110 | options.functional = true
|
111 | }
|
112 |
|
113 |
|
114 | if (scopeId) {
|
115 | options._scopeId = scopeId
|
116 | }
|
117 |
|
118 | var hook
|
119 | if (moduleIdentifier) {
|
120 | hook = function (context) {
|
121 |
|
122 | context =
|
123 | context ||
|
124 | (this.$vnode && this.$vnode.ssrContext) ||
|
125 | (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext)
|
126 |
|
127 | if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
128 | context = __VUE_SSR_CONTEXT__
|
129 | }
|
130 |
|
131 | if (injectStyles) {
|
132 | injectStyles.call(this, context)
|
133 | }
|
134 |
|
135 | if (context && context._registeredComponents) {
|
136 | context._registeredComponents.add(moduleIdentifier)
|
137 | }
|
138 | }
|
139 |
|
140 |
|
141 | options._ssrRegister = hook
|
142 | } else if (injectStyles) {
|
143 | hook = injectStyles
|
144 | }
|
145 |
|
146 | if (hook) {
|
147 | var functional = options.functional
|
148 | var existing = functional
|
149 | ? options.render
|
150 | : options.beforeCreate
|
151 |
|
152 | if (!functional) {
|
153 |
|
154 | options.beforeCreate = existing
|
155 | ? [].concat(existing, hook)
|
156 | : [hook]
|
157 | } else {
|
158 |
|
159 |
|
160 | options._injectStyles = hook
|
161 |
|
162 | options.render = function renderWithStyleInjection (h, context) {
|
163 | hook.call(context)
|
164 | return existing(h, context)
|
165 | }
|
166 | }
|
167 | }
|
168 |
|
169 | return {
|
170 | esModule: esModule,
|
171 | exports: scriptExports,
|
172 | options: options
|
173 | }
|
174 | }
|
175 |
|
176 |
|
177 | }),
|
178 |
|
179 | 328:
|
180 | (function(module, exports, __webpack_require__) {
|
181 |
|
182 | "use strict";
|
183 |
|
184 |
|
185 | exports.__esModule = true;
|
186 |
|
187 | var _step = __webpack_require__(329);
|
188 |
|
189 | var _step2 = _interopRequireDefault(_step);
|
190 |
|
191 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
192 |
|
193 |
|
194 | _step2.default.install = function (Vue) {
|
195 | Vue.component(_step2.default.name, _step2.default);
|
196 | };
|
197 |
|
198 | exports.default = _step2.default;
|
199 |
|
200 | }),
|
201 |
|
202 | 329:
|
203 | (function(module, __webpack_exports__, __webpack_require__) {
|
204 |
|
205 | "use strict";
|
206 | Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
207 | var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_step_vue__ = __webpack_require__(330);
|
208 | var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_step_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_step_vue__);
|
209 | var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_6521d5e0_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_step_vue__ = __webpack_require__(331);
|
210 | var normalizeComponent = __webpack_require__(0)
|
211 |
|
212 |
|
213 |
|
214 |
|
215 |
|
216 | var __vue_template_functional__ = false
|
217 |
|
218 | var __vue_styles__ = null
|
219 |
|
220 | var __vue_scopeId__ = null
|
221 |
|
222 | var __vue_module_identifier__ = null
|
223 | var Component = normalizeComponent(
|
224 | __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_step_vue___default.a,
|
225 | __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_6521d5e0_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_step_vue__["a" ],
|
226 | __vue_template_functional__,
|
227 | __vue_styles__,
|
228 | __vue_scopeId__,
|
229 | __vue_module_identifier__
|
230 | )
|
231 |
|
232 | __webpack_exports__["default"] = (Component.exports);
|
233 |
|
234 |
|
235 | }),
|
236 |
|
237 | 330:
|
238 | (function(module, exports, __webpack_require__) {
|
239 |
|
240 | "use strict";
|
241 |
|
242 |
|
243 | exports.__esModule = true;
|
244 |
|
245 |
|
246 |
|
247 |
|
248 |
|
249 |
|
250 |
|
251 |
|
252 |
|
253 |
|
254 |
|
255 |
|
256 |
|
257 |
|
258 |
|
259 |
|
260 |
|
261 |
|
262 |
|
263 |
|
264 |
|
265 |
|
266 |
|
267 |
|
268 |
|
269 |
|
270 |
|
271 |
|
272 |
|
273 |
|
274 |
|
275 |
|
276 |
|
277 |
|
278 |
|
279 |
|
280 |
|
281 |
|
282 |
|
283 |
|
284 |
|
285 |
|
286 |
|
287 |
|
288 |
|
289 |
|
290 |
|
291 |
|
292 |
|
293 |
|
294 |
|
295 |
|
296 |
|
297 |
|
298 |
|
299 |
|
300 | exports.default = {
|
301 | name: 'ElStep',
|
302 |
|
303 | props: {
|
304 | title: String,
|
305 | icon: String,
|
306 | description: String,
|
307 | status: String
|
308 | },
|
309 |
|
310 | data: function data() {
|
311 | return {
|
312 | index: -1,
|
313 | lineStyle: {},
|
314 | internalStatus: ''
|
315 | };
|
316 | },
|
317 | beforeCreate: function beforeCreate() {
|
318 | this.$parent.steps.push(this);
|
319 | },
|
320 | beforeDestroy: function beforeDestroy() {
|
321 | var steps = this.$parent.steps;
|
322 | var index = steps.indexOf(this);
|
323 | if (index >= 0) {
|
324 | steps.splice(index, 1);
|
325 | }
|
326 | },
|
327 |
|
328 |
|
329 | computed: {
|
330 | currentStatus: function currentStatus() {
|
331 | return this.status || this.internalStatus;
|
332 | },
|
333 | prevStatus: function prevStatus() {
|
334 | var prevStep = this.$parent.steps[this.index - 1];
|
335 | return prevStep ? prevStep.currentStatus : 'wait';
|
336 | },
|
337 | isCenter: function isCenter() {
|
338 | return this.$parent.alignCenter;
|
339 | },
|
340 | isVertical: function isVertical() {
|
341 | return this.$parent.direction === 'vertical';
|
342 | },
|
343 | isSimple: function isSimple() {
|
344 | return this.$parent.simple;
|
345 | },
|
346 | isLast: function isLast() {
|
347 | var parent = this.$parent;
|
348 | return parent.steps[parent.steps.length - 1] === this;
|
349 | },
|
350 | stepsCount: function stepsCount() {
|
351 | return this.$parent.steps.length;
|
352 | },
|
353 | space: function space() {
|
354 | var isSimple = this.isSimple,
|
355 | space = this.$parent.space;
|
356 |
|
357 | return isSimple ? '' : space;
|
358 | },
|
359 |
|
360 | style: function style() {
|
361 | var style = {};
|
362 | var parent = this.$parent;
|
363 | var len = parent.steps.length;
|
364 |
|
365 | var space = typeof this.space === 'number' ? this.space + 'px' : this.space ? this.space : 100 / (len - (this.isCenter ? 0 : 1)) + '%';
|
366 | style.flexBasis = space;
|
367 | if (this.isVertical) return style;
|
368 | if (this.isLast) {
|
369 | style.maxWidth = 100 / this.stepsCount + '%';
|
370 | } else {
|
371 | style.marginRight = -this.$parent.stepOffset + 'px';
|
372 | }
|
373 |
|
374 | return style;
|
375 | }
|
376 | },
|
377 |
|
378 | methods: {
|
379 | updateStatus: function updateStatus(val) {
|
380 | var prevChild = this.$parent.$children[this.index - 1];
|
381 |
|
382 | if (val > this.index) {
|
383 | this.internalStatus = this.$parent.finishStatus;
|
384 | } else if (val === this.index && this.prevStatus !== 'error') {
|
385 | this.internalStatus = this.$parent.processStatus;
|
386 | } else {
|
387 | this.internalStatus = 'wait';
|
388 | }
|
389 |
|
390 | if (prevChild) prevChild.calcProgress(this.internalStatus);
|
391 | },
|
392 | calcProgress: function calcProgress(status) {
|
393 | var step = 100;
|
394 | var style = {};
|
395 |
|
396 | style.transitionDelay = 150 * this.index + 'ms';
|
397 | if (status === this.$parent.processStatus) {
|
398 | step = this.currentStatus !== 'error' ? 0 : 0;
|
399 | } else if (status === 'wait') {
|
400 | step = 0;
|
401 | style.transitionDelay = -150 * this.index + 'ms';
|
402 | }
|
403 |
|
404 | style.borderWidth = step ? '1px' : 0;
|
405 | this.$parent.direction === 'vertical' ? style.height = step + '%' : style.width = step + '%';
|
406 |
|
407 | this.lineStyle = style;
|
408 | }
|
409 | },
|
410 |
|
411 | mounted: function mounted() {
|
412 | var _this = this;
|
413 |
|
414 | var unwatch = this.$watch('index', function (val) {
|
415 | _this.$watch('$parent.active', _this.updateStatus, { immediate: true });
|
416 | unwatch();
|
417 | });
|
418 | }
|
419 | };
|
420 |
|
421 | }),
|
422 |
|
423 | 331:
|
424 | (function(module, __webpack_exports__, __webpack_require__) {
|
425 |
|
426 | "use strict";
|
427 | var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"el-step",class:[
|
428 | !_vm.isSimple && ("is-" + (_vm.$parent.direction)),
|
429 | _vm.isSimple && 'is-simple',
|
430 | _vm.isLast && !_vm.space && !_vm.isCenter && 'is-flex',
|
431 | _vm.isCenter && !_vm.isVertical && !_vm.isSimple && 'is-center'
|
432 | ],style:(_vm.style)},[_c('div',{staticClass:"el-step__head",class:("is-" + _vm.currentStatus)},[_c('div',{staticClass:"el-step__line",style:(_vm.isLast ? '' : { marginRight: _vm.$parent.stepOffset + 'px' })},[_c('i',{staticClass:"el-step__line-inner",style:(_vm.lineStyle)})]),_c('div',{staticClass:"el-step__icon",class:("is-" + (_vm.icon ? 'icon' : 'text'))},[(_vm.currentStatus !== 'success' && _vm.currentStatus !== 'error')?_vm._t("icon",[(_vm.icon)?_c('i',{staticClass:"el-step__icon-inner",class:[_vm.icon]}):_vm._e(),(!_vm.icon && !_vm.isSimple)?_c('div',{staticClass:"el-step__icon-inner"},[_vm._v(_vm._s(_vm.index + 1))]):_vm._e()]):_c('i',{staticClass:"el-step__icon-inner is-status",class:['el-icon-' + (_vm.currentStatus === 'success' ? 'check' : 'close')]})],2)]),_c('div',{staticClass:"el-step__main"},[_c('div',{ref:"title",staticClass:"el-step__title",class:['is-' + _vm.currentStatus]},[_vm._t("title",[_vm._v(_vm._s(_vm.title))])],2),(_vm.isSimple)?_c('div',{staticClass:"el-step__arrow"}):_c('div',{staticClass:"el-step__description",class:['is-' + _vm.currentStatus]},[_vm._t("description",[_vm._v(_vm._s(_vm.description))])],2)])])}
|
433 | var staticRenderFns = []
|
434 | var esExports = { render: render, staticRenderFns: staticRenderFns }
|
435 | __webpack_exports__["a"] = (esExports);
|
436 |
|
437 | })
|
438 |
|
439 | }); |
\ | No newline at end of file |