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, { enumerable: true, get: getter });
|
41 | }
|
42 | };
|
43 |
|
44 |
|
45 | __webpack_require__.r = function(exports) {
|
46 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
47 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
48 | }
|
49 | Object.defineProperty(exports, '__esModule', { value: true });
|
50 | };
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 | __webpack_require__.t = function(value, mode) {
|
58 | if(mode & 1) value = __webpack_require__(value);
|
59 | if(mode & 8) return value;
|
60 | if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
61 | var ns = Object.create(null);
|
62 | __webpack_require__.r(ns);
|
63 | Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
64 | if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
65 | return ns;
|
66 | };
|
67 |
|
68 |
|
69 | __webpack_require__.n = function(module) {
|
70 | var getter = module && module.__esModule ?
|
71 | function getDefault() { return module['default']; } :
|
72 | function getModuleExports() { return module; };
|
73 | __webpack_require__.d(getter, 'a', getter);
|
74 | return getter;
|
75 | };
|
76 |
|
77 |
|
78 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
79 |
|
80 |
|
81 | __webpack_require__.p = "/dist/";
|
82 |
|
83 |
|
84 |
|
85 | return __webpack_require__(__webpack_require__.s = 109);
|
86 | })
|
87 |
|
88 | ({
|
89 |
|
90 | 0:
|
91 | (function(module, __webpack_exports__, __webpack_require__) {
|
92 |
|
93 | "use strict";
|
94 | __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
95 |
|
96 |
|
97 |
|
98 |
|
99 |
|
100 |
|
101 | function normalizeComponent (
|
102 | scriptExports,
|
103 | render,
|
104 | staticRenderFns,
|
105 | functionalTemplate,
|
106 | injectStyles,
|
107 | scopeId,
|
108 | moduleIdentifier, /* server only */
|
109 | shadowMode /* vue-cli only */
|
110 | ) {
|
111 |
|
112 | var options = typeof scriptExports === 'function'
|
113 | ? scriptExports.options
|
114 | : scriptExports
|
115 |
|
116 |
|
117 | if (render) {
|
118 | options.render = render
|
119 | options.staticRenderFns = staticRenderFns
|
120 | options._compiled = true
|
121 | }
|
122 |
|
123 |
|
124 | if (functionalTemplate) {
|
125 | options.functional = true
|
126 | }
|
127 |
|
128 |
|
129 | if (scopeId) {
|
130 | options._scopeId = 'data-v-' + scopeId
|
131 | }
|
132 |
|
133 | var hook
|
134 | if (moduleIdentifier) {
|
135 | hook = function (context) {
|
136 |
|
137 | context =
|
138 | context ||
|
139 | (this.$vnode && this.$vnode.ssrContext) ||
|
140 | (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext)
|
141 |
|
142 | if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
143 | context = __VUE_SSR_CONTEXT__
|
144 | }
|
145 |
|
146 | if (injectStyles) {
|
147 | injectStyles.call(this, context)
|
148 | }
|
149 |
|
150 | if (context && context._registeredComponents) {
|
151 | context._registeredComponents.add(moduleIdentifier)
|
152 | }
|
153 | }
|
154 |
|
155 |
|
156 | options._ssrRegister = hook
|
157 | } else if (injectStyles) {
|
158 | hook = shadowMode
|
159 | ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
160 | : injectStyles
|
161 | }
|
162 |
|
163 | if (hook) {
|
164 | if (options.functional) {
|
165 |
|
166 |
|
167 | options._injectStyles = hook
|
168 |
|
169 | var originalRender = options.render
|
170 | options.render = function renderWithStyleInjection (h, context) {
|
171 | hook.call(context)
|
172 | return originalRender(h, context)
|
173 | }
|
174 | } else {
|
175 |
|
176 | var existing = options.beforeCreate
|
177 | options.beforeCreate = existing
|
178 | ? [].concat(existing, hook)
|
179 | : [hook]
|
180 | }
|
181 | }
|
182 |
|
183 | return {
|
184 | exports: scriptExports,
|
185 | options: options
|
186 | }
|
187 | }
|
188 |
|
189 |
|
190 | }),
|
191 |
|
192 | 109:
|
193 | (function(module, __webpack_exports__, __webpack_require__) {
|
194 |
|
195 | "use strict";
|
196 | __webpack_require__.r(__webpack_exports__);
|
197 |
|
198 |
|
199 | var render = function() {
|
200 | var _vm = this
|
201 | var _h = _vm.$createElement
|
202 | var _c = _vm._self._c || _h
|
203 | return _c(
|
204 | "div",
|
205 | {
|
206 | staticClass: "el-step",
|
207 | class: [
|
208 | !_vm.isSimple && "is-" + _vm.$parent.direction,
|
209 | _vm.isSimple && "is-simple",
|
210 | _vm.isLast && !_vm.space && !_vm.isCenter && "is-flex",
|
211 | _vm.isCenter && !_vm.isVertical && !_vm.isSimple && "is-center"
|
212 | ],
|
213 | style: _vm.style
|
214 | },
|
215 | [
|
216 | _c(
|
217 | "div",
|
218 | { staticClass: "el-step__head", class: "is-" + _vm.currentStatus },
|
219 | [
|
220 | _c(
|
221 | "div",
|
222 | {
|
223 | staticClass: "el-step__line",
|
224 | style: _vm.isLast
|
225 | ? ""
|
226 | : { marginRight: _vm.$parent.stepOffset + "px" }
|
227 | },
|
228 | [
|
229 | _c("i", {
|
230 | staticClass: "el-step__line-inner",
|
231 | style: _vm.lineStyle
|
232 | })
|
233 | ]
|
234 | ),
|
235 | _c(
|
236 | "div",
|
237 | {
|
238 | staticClass: "el-step__icon",
|
239 | class: "is-" + (_vm.icon ? "icon" : "text")
|
240 | },
|
241 | [
|
242 | _vm.currentStatus !== "success" && _vm.currentStatus !== "error"
|
243 | ? _vm._t("icon", [
|
244 | _vm.icon
|
245 | ? _c("i", {
|
246 | staticClass: "el-step__icon-inner",
|
247 | class: [_vm.icon]
|
248 | })
|
249 | : _vm._e(),
|
250 | !_vm.icon && !_vm.isSimple
|
251 | ? _c("div", { staticClass: "el-step__icon-inner" }, [
|
252 | _vm._v(_vm._s(_vm.index + 1))
|
253 | ])
|
254 | : _vm._e()
|
255 | ])
|
256 | : _c("i", {
|
257 | staticClass: "el-step__icon-inner is-status",
|
258 | class: [
|
259 | "el-icon-" +
|
260 | (_vm.currentStatus === "success" ? "check" : "close")
|
261 | ]
|
262 | })
|
263 | ],
|
264 | 2
|
265 | )
|
266 | ]
|
267 | ),
|
268 | _c("div", { staticClass: "el-step__main" }, [
|
269 | _c(
|
270 | "div",
|
271 | {
|
272 | ref: "title",
|
273 | staticClass: "el-step__title",
|
274 | class: ["is-" + _vm.currentStatus]
|
275 | },
|
276 | [_vm._t("title", [_vm._v(_vm._s(_vm.title))])],
|
277 | 2
|
278 | ),
|
279 | _vm.isSimple
|
280 | ? _c("div", { staticClass: "el-step__arrow" })
|
281 | : _c(
|
282 | "div",
|
283 | {
|
284 | staticClass: "el-step__description",
|
285 | class: ["is-" + _vm.currentStatus]
|
286 | },
|
287 | [_vm._t("description", [_vm._v(_vm._s(_vm.description))])],
|
288 | 2
|
289 | )
|
290 | ])
|
291 | ]
|
292 | )
|
293 | }
|
294 | var staticRenderFns = []
|
295 | render._withStripped = true
|
296 |
|
297 |
|
298 |
|
299 |
|
300 |
|
301 |
|
302 |
|
303 |
|
304 |
|
305 |
|
306 |
|
307 |
|
308 |
|
309 |
|
310 |
|
311 |
|
312 |
|
313 |
|
314 |
|
315 |
|
316 |
|
317 |
|
318 |
|
319 |
|
320 |
|
321 |
|
322 |
|
323 |
|
324 |
|
325 |
|
326 |
|
327 |
|
328 |
|
329 |
|
330 |
|
331 |
|
332 |
|
333 |
|
334 |
|
335 |
|
336 |
|
337 |
|
338 |
|
339 |
|
340 |
|
341 |
|
342 |
|
343 |
|
344 |
|
345 |
|
346 |
|
347 |
|
348 |
|
349 |
|
350 |
|
351 |
|
352 |
|
353 |
|
354 |
|
355 |
|
356 |
|
357 | var stepvue_type_script_lang_js_ = ({
|
358 | name: 'ElStep',
|
359 |
|
360 | props: {
|
361 | title: String,
|
362 | icon: String,
|
363 | description: String,
|
364 | status: String
|
365 | },
|
366 |
|
367 | data: function data() {
|
368 | return {
|
369 | index: -1,
|
370 | lineStyle: {},
|
371 | internalStatus: ''
|
372 | };
|
373 | },
|
374 | beforeCreate: function beforeCreate() {
|
375 | this.$parent.steps.push(this);
|
376 | },
|
377 | beforeDestroy: function beforeDestroy() {
|
378 | var steps = this.$parent.steps;
|
379 | var index = steps.indexOf(this);
|
380 | if (index >= 0) {
|
381 | steps.splice(index, 1);
|
382 | }
|
383 | },
|
384 |
|
385 |
|
386 | computed: {
|
387 | currentStatus: function currentStatus() {
|
388 | return this.status || this.internalStatus;
|
389 | },
|
390 | prevStatus: function prevStatus() {
|
391 | var prevStep = this.$parent.steps[this.index - 1];
|
392 | return prevStep ? prevStep.currentStatus : 'wait';
|
393 | },
|
394 | isCenter: function isCenter() {
|
395 | return this.$parent.alignCenter;
|
396 | },
|
397 | isVertical: function isVertical() {
|
398 | return this.$parent.direction === 'vertical';
|
399 | },
|
400 | isSimple: function isSimple() {
|
401 | return this.$parent.simple;
|
402 | },
|
403 | isLast: function isLast() {
|
404 | var parent = this.$parent;
|
405 | return parent.steps[parent.steps.length - 1] === this;
|
406 | },
|
407 | stepsCount: function stepsCount() {
|
408 | return this.$parent.steps.length;
|
409 | },
|
410 | space: function space() {
|
411 | var isSimple = this.isSimple,
|
412 | space = this.$parent.space;
|
413 |
|
414 | return isSimple ? '' : space;
|
415 | },
|
416 |
|
417 | style: function style() {
|
418 | var style = {};
|
419 | var parent = this.$parent;
|
420 | var len = parent.steps.length;
|
421 |
|
422 | var space = typeof this.space === 'number' ? this.space + 'px' : this.space ? this.space : 100 / (len - (this.isCenter ? 0 : 1)) + '%';
|
423 | style.flexBasis = space;
|
424 | if (this.isVertical) return style;
|
425 | if (this.isLast) {
|
426 | style.maxWidth = 100 / this.stepsCount + '%';
|
427 | } else {
|
428 | style.marginRight = -this.$parent.stepOffset + 'px';
|
429 | }
|
430 |
|
431 | return style;
|
432 | }
|
433 | },
|
434 |
|
435 | methods: {
|
436 | updateStatus: function updateStatus(val) {
|
437 | var prevChild = this.$parent.$children[this.index - 1];
|
438 |
|
439 | if (val > this.index) {
|
440 | this.internalStatus = this.$parent.finishStatus;
|
441 | } else if (val === this.index && this.prevStatus !== 'error') {
|
442 | this.internalStatus = this.$parent.processStatus;
|
443 | } else {
|
444 | this.internalStatus = 'wait';
|
445 | }
|
446 |
|
447 | if (prevChild) prevChild.calcProgress(this.internalStatus);
|
448 | },
|
449 | calcProgress: function calcProgress(status) {
|
450 | var step = 100;
|
451 | var style = {};
|
452 |
|
453 | style.transitionDelay = 150 * this.index + 'ms';
|
454 | if (status === this.$parent.processStatus) {
|
455 | step = this.currentStatus !== 'error' ? 0 : 0;
|
456 | } else if (status === 'wait') {
|
457 | step = 0;
|
458 | style.transitionDelay = -150 * this.index + 'ms';
|
459 | }
|
460 |
|
461 | style.borderWidth = step && !this.isSimple ? '1px' : 0;
|
462 | this.$parent.direction === 'vertical' ? style.height = step + '%' : style.width = step + '%';
|
463 |
|
464 | this.lineStyle = style;
|
465 | }
|
466 | },
|
467 |
|
468 | mounted: function mounted() {
|
469 | var _this = this;
|
470 |
|
471 | var unwatch = this.$watch('index', function (val) {
|
472 | _this.$watch('$parent.active', _this.updateStatus, { immediate: true });
|
473 | _this.$watch('$parent.processStatus', function () {
|
474 | var activeIndex = _this.$parent.active;
|
475 | _this.updateStatus(activeIndex);
|
476 | }, { immediate: true });
|
477 | unwatch();
|
478 | });
|
479 | }
|
480 | });
|
481 |
|
482 | var src_stepvue_type_script_lang_js_ = (stepvue_type_script_lang_js_);
|
483 |
|
484 | var componentNormalizer = __webpack_require__(0);
|
485 |
|
486 |
|
487 |
|
488 |
|
489 |
|
490 |
|
491 |
|
492 |
|
493 |
|
494 | var component = Object(componentNormalizer["a" ])(
|
495 | src_stepvue_type_script_lang_js_,
|
496 | render,
|
497 | staticRenderFns,
|
498 | false,
|
499 | null,
|
500 | null,
|
501 | null
|
502 |
|
503 | )
|
504 |
|
505 |
|
506 | if (false) { var api; }
|
507 | component.options.__file = "packages/steps/src/step.vue"
|
508 | var step = (component.exports);
|
509 |
|
510 |
|
511 |
|
512 |
|
513 | step.install = function (Vue) {
|
514 | Vue.component(step.name, step);
|
515 | };
|
516 |
|
517 | var packages_step = __webpack_exports__["default"] = (step);
|
518 |
|
519 | })
|
520 |
|
521 | }); |
\ | No newline at end of file |