xianniu-ui 0.5.2-beta.1 → 0.5.2-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/lib/xianniu-ui.common.js +50276 -62
  2. package/lib/xianniu-ui.css +1 -0
  3. package/lib/xianniu-ui.umd.js +50287 -63
  4. package/lib/xianniu-ui.umd.min.js +16 -1
  5. package/package.json +1 -1
  6. package/lib/static/css/chunk-elementUI.0b417c2d.css +0 -1
  7. package/lib/static/css/xianniu-ui.common.5be6bd50.css +0 -1
  8. package/lib/static/css/xianniu-ui.umd.5be6bd50.css +0 -1
  9. package/lib/static/css/xianniu-ui.umd.min.5be6bd50.css +0 -1
  10. package/lib/xianniu-ui.common.chunk-elementUI.js +0 -1680
  11. package/lib/xianniu-ui.common.chunk-libs~253ae210.js +0 -2594
  12. package/lib/xianniu-ui.common.chunk-libs~31ecd969.js +0 -1250
  13. package/lib/xianniu-ui.common.chunk-libs~93acefaf.js +0 -3328
  14. package/lib/xianniu-ui.common.chunk-libs~af0f4b76.js +0 -17212
  15. package/lib/xianniu-ui.common.chunk-libs~d939e436.js +0 -2292
  16. package/lib/xianniu-ui.common.chunk-libs~dfe5688e.js +0 -4924
  17. package/lib/xianniu-ui.common.xianniu-ui.common.js +0 -17174
  18. package/lib/xianniu-ui.umd.chunk-elementUI.js +0 -1680
  19. package/lib/xianniu-ui.umd.chunk-libs~253ae210.js +0 -2594
  20. package/lib/xianniu-ui.umd.chunk-libs~31ecd969.js +0 -1250
  21. package/lib/xianniu-ui.umd.chunk-libs~93acefaf.js +0 -3328
  22. package/lib/xianniu-ui.umd.chunk-libs~af0f4b76.js +0 -17212
  23. package/lib/xianniu-ui.umd.chunk-libs~d939e436.js +0 -2292
  24. package/lib/xianniu-ui.umd.chunk-libs~dfe5688e.js +0 -4924
  25. package/lib/xianniu-ui.umd.min.chunk-elementUI.js +0 -1
  26. package/lib/xianniu-ui.umd.min.chunk-libs~253ae210.js +0 -1
  27. package/lib/xianniu-ui.umd.min.chunk-libs~31ecd969.js +0 -1
  28. package/lib/xianniu-ui.umd.min.chunk-libs~93acefaf.js +0 -1
  29. package/lib/xianniu-ui.umd.min.chunk-libs~af0f4b76.js +0 -9
  30. package/lib/xianniu-ui.umd.min.chunk-libs~d939e436.js +0 -1
  31. package/lib/xianniu-ui.umd.min.chunk-libs~dfe5688e.js +0 -8
  32. package/lib/xianniu-ui.umd.min.xianniu-ui.umd.min.js +0 -1
  33. package/lib/xianniu-ui.umd.xianniu-ui.umd.js +0 -17184
@@ -1,1680 +0,0 @@
1
- ((typeof self !== 'undefined' ? self : this)["webpackJsonpxianniu_ui"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpxianniu_ui"] || []).push([[0],{
2
-
3
- /***/ "08a9":
4
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
5
-
6
- "use strict";
7
-
8
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"80f11ec6-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./node_modules/element-ui/packages/image/src/image-viewer.vue?vue&type=template&id=fda3c9b4&
9
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"name":"viewer-fade"}},[_c('div',{ref:"el-image-viewer__wrapper",staticClass:"el-image-viewer__wrapper",style:({ 'z-index': _vm.viewerZIndex }),attrs:{"tabindex":"-1"}},[_c('div',{staticClass:"el-image-viewer__mask",on:{"click":function($event){if($event.target !== $event.currentTarget){ return null; }return _vm.handleMaskClick.apply(null, arguments)}}}),_c('span',{staticClass:"el-image-viewer__btn el-image-viewer__close",on:{"click":_vm.hide}},[_c('i',{staticClass:"el-icon-close"})]),(!_vm.isSingle)?[_c('span',{staticClass:"el-image-viewer__btn el-image-viewer__prev",class:{ 'is-disabled': !_vm.infinite && _vm.isFirst },on:{"click":_vm.prev}},[_c('i',{staticClass:"el-icon-arrow-left"})]),_c('span',{staticClass:"el-image-viewer__btn el-image-viewer__next",class:{ 'is-disabled': !_vm.infinite && _vm.isLast },on:{"click":_vm.next}},[_c('i',{staticClass:"el-icon-arrow-right"})])]:_vm._e(),_c('div',{staticClass:"el-image-viewer__btn el-image-viewer__actions"},[_c('div',{staticClass:"el-image-viewer__actions__inner"},[_c('i',{staticClass:"el-icon-zoom-out",on:{"click":function($event){return _vm.handleActions('zoomOut')}}}),_c('i',{staticClass:"el-icon-zoom-in",on:{"click":function($event){return _vm.handleActions('zoomIn')}}}),_c('i',{staticClass:"el-image-viewer__actions__divider"}),_c('i',{class:_vm.mode.icon,on:{"click":_vm.toggleMode}}),_c('i',{staticClass:"el-image-viewer__actions__divider"}),_c('i',{staticClass:"el-icon-refresh-left",on:{"click":function($event){return _vm.handleActions('anticlocelise')}}}),_c('i',{staticClass:"el-icon-refresh-right",on:{"click":function($event){return _vm.handleActions('clocelise')}}})])]),_c('div',{staticClass:"el-image-viewer__canvas"},_vm._l((_vm.urlList),function(url,i){return (i === _vm.index)?_c('img',{key:url,ref:"img",refInFor:true,staticClass:"el-image-viewer__img",style:(_vm.imgStyle),attrs:{"src":_vm.currentImg,"referrerpolicy":"no-referrer"},on:{"load":_vm.handleImgLoad,"error":_vm.handleImgError,"mousedown":_vm.handleMouseDown}}):_vm._e()}),0)],2)])}
10
- var staticRenderFns = []
11
-
12
-
13
- // CONCATENATED MODULE: ./node_modules/element-ui/packages/image/src/image-viewer.vue?vue&type=template&id=fda3c9b4&
14
-
15
- // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
16
- var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
17
- var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
18
-
19
- // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/dom.js
20
- /* istanbul ignore next */
21
-
22
-
23
-
24
- const isServer = external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer;
25
- const SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
26
- const MOZ_HACK_REGEXP = /^moz([A-Z])/;
27
- const ieVersion = isServer ? 0 : Number(document.documentMode);
28
-
29
- /* istanbul ignore next */
30
- const trim = function(string) {
31
- return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
32
- };
33
- /* istanbul ignore next */
34
- const camelCase = function(name) {
35
- return name.replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
36
- return offset ? letter.toUpperCase() : letter;
37
- }).replace(MOZ_HACK_REGEXP, 'Moz$1');
38
- };
39
-
40
- /* istanbul ignore next */
41
- const on = (function() {
42
- if (!isServer && document.addEventListener) {
43
- return function(element, event, handler) {
44
- if (element && event && handler) {
45
- element.addEventListener(event, handler, false);
46
- }
47
- };
48
- } else {
49
- return function(element, event, handler) {
50
- if (element && event && handler) {
51
- element.attachEvent('on' + event, handler);
52
- }
53
- };
54
- }
55
- })();
56
-
57
- /* istanbul ignore next */
58
- const off = (function() {
59
- if (!isServer && document.removeEventListener) {
60
- return function(element, event, handler) {
61
- if (element && event) {
62
- element.removeEventListener(event, handler, false);
63
- }
64
- };
65
- } else {
66
- return function(element, event, handler) {
67
- if (element && event) {
68
- element.detachEvent('on' + event, handler);
69
- }
70
- };
71
- }
72
- })();
73
-
74
- /* istanbul ignore next */
75
- const once = function(el, event, fn) {
76
- var listener = function() {
77
- if (fn) {
78
- fn.apply(this, arguments);
79
- }
80
- off(el, event, listener);
81
- };
82
- on(el, event, listener);
83
- };
84
-
85
- /* istanbul ignore next */
86
- function hasClass(el, cls) {
87
- if (!el || !cls) return false;
88
- if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
89
- if (el.classList) {
90
- return el.classList.contains(cls);
91
- } else {
92
- return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
93
- }
94
- };
95
-
96
- /* istanbul ignore next */
97
- function addClass(el, cls) {
98
- if (!el) return;
99
- var curClass = el.className;
100
- var classes = (cls || '').split(' ');
101
-
102
- for (var i = 0, j = classes.length; i < j; i++) {
103
- var clsName = classes[i];
104
- if (!clsName) continue;
105
-
106
- if (el.classList) {
107
- el.classList.add(clsName);
108
- } else if (!hasClass(el, clsName)) {
109
- curClass += ' ' + clsName;
110
- }
111
- }
112
- if (!el.classList) {
113
- el.setAttribute('class', curClass);
114
- }
115
- };
116
-
117
- /* istanbul ignore next */
118
- function removeClass(el, cls) {
119
- if (!el || !cls) return;
120
- var classes = cls.split(' ');
121
- var curClass = ' ' + el.className + ' ';
122
-
123
- for (var i = 0, j = classes.length; i < j; i++) {
124
- var clsName = classes[i];
125
- if (!clsName) continue;
126
-
127
- if (el.classList) {
128
- el.classList.remove(clsName);
129
- } else if (hasClass(el, clsName)) {
130
- curClass = curClass.replace(' ' + clsName + ' ', ' ');
131
- }
132
- }
133
- if (!el.classList) {
134
- el.setAttribute('class', trim(curClass));
135
- }
136
- };
137
-
138
- /* istanbul ignore next */
139
- const getStyle = ieVersion < 9 ? function(element, styleName) {
140
- if (isServer) return;
141
- if (!element || !styleName) return null;
142
- styleName = camelCase(styleName);
143
- if (styleName === 'float') {
144
- styleName = 'styleFloat';
145
- }
146
- try {
147
- switch (styleName) {
148
- case 'opacity':
149
- try {
150
- return element.filters.item('alpha').opacity / 100;
151
- } catch (e) {
152
- return 1.0;
153
- }
154
- default:
155
- return (element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null);
156
- }
157
- } catch (e) {
158
- return element.style[styleName];
159
- }
160
- } : function(element, styleName) {
161
- if (isServer) return;
162
- if (!element || !styleName) return null;
163
- styleName = camelCase(styleName);
164
- if (styleName === 'float') {
165
- styleName = 'cssFloat';
166
- }
167
- try {
168
- var computed = document.defaultView.getComputedStyle(element, '');
169
- return element.style[styleName] || computed ? computed[styleName] : null;
170
- } catch (e) {
171
- return element.style[styleName];
172
- }
173
- };
174
-
175
- /* istanbul ignore next */
176
- function setStyle(element, styleName, value) {
177
- if (!element || !styleName) return;
178
-
179
- if (typeof styleName === 'object') {
180
- for (var prop in styleName) {
181
- if (styleName.hasOwnProperty(prop)) {
182
- setStyle(element, prop, styleName[prop]);
183
- }
184
- }
185
- } else {
186
- styleName = camelCase(styleName);
187
- if (styleName === 'opacity' && ieVersion < 9) {
188
- element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
189
- } else {
190
- element.style[styleName] = value;
191
- }
192
- }
193
- };
194
-
195
- const isScroll = (el, vertical) => {
196
- if (isServer) return;
197
-
198
- const determinedDirection = vertical !== null && vertical !== undefined;
199
- const overflow = determinedDirection
200
- ? vertical
201
- ? getStyle(el, 'overflow-y')
202
- : getStyle(el, 'overflow-x')
203
- : getStyle(el, 'overflow');
204
-
205
- return overflow.match(/(scroll|auto|overlay)/);
206
- };
207
-
208
- const getScrollContainer = (el, vertical) => {
209
- if (isServer) return;
210
-
211
- let parent = el;
212
- while (parent) {
213
- if ([window, document, document.documentElement].includes(parent)) {
214
- return window;
215
- }
216
- if (isScroll(parent, vertical)) {
217
- return parent;
218
- }
219
- parent = parent.parentNode;
220
- }
221
-
222
- return parent;
223
- };
224
-
225
- const isInContainer = (el, container) => {
226
- if (isServer || !el || !container) return false;
227
-
228
- const elRect = el.getBoundingClientRect();
229
- let containerRect;
230
-
231
- if ([window, document, document.documentElement, null, undefined].includes(container)) {
232
- containerRect = {
233
- top: 0,
234
- right: window.innerWidth,
235
- bottom: window.innerHeight,
236
- left: 0
237
- };
238
- } else {
239
- containerRect = container.getBoundingClientRect();
240
- }
241
-
242
- return elRect.top < containerRect.bottom &&
243
- elRect.bottom > containerRect.top &&
244
- elRect.right > containerRect.left &&
245
- elRect.left < containerRect.right;
246
- };
247
-
248
- // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/types.js
249
-
250
-
251
- function isString(obj) {
252
- return Object.prototype.toString.call(obj) === '[object String]';
253
- }
254
-
255
- function isObject(obj) {
256
- return Object.prototype.toString.call(obj) === '[object Object]';
257
- }
258
-
259
- function isHtmlElement(node) {
260
- return node && node.nodeType === Node.ELEMENT_NODE;
261
- }
262
-
263
- /**
264
- * - Inspired:
265
- * https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
266
- */
267
- let isFunction = (functionToCheck) => {
268
- var getType = {};
269
- return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
270
- };
271
-
272
- if ( true && typeof Int8Array !== 'object' && (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
273
- isFunction = function(obj) {
274
- return typeof obj === 'function' || false;
275
- };
276
- }
277
-
278
-
279
-
280
- const isUndefined = (val)=> {
281
- return val === void 0;
282
- };
283
-
284
- const isDefined = (val) => {
285
- return val !== undefined && val !== null;
286
- };
287
-
288
- // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/util.js
289
-
290
-
291
-
292
- const util_hasOwnProperty = Object.prototype.hasOwnProperty;
293
-
294
- function noop() {};
295
-
296
- function hasOwn(obj, key) {
297
- return util_hasOwnProperty.call(obj, key);
298
- };
299
-
300
- function extend(to, _from) {
301
- for (let key in _from) {
302
- to[key] = _from[key];
303
- }
304
- return to;
305
- };
306
-
307
- function toObject(arr) {
308
- var res = {};
309
- for (let i = 0; i < arr.length; i++) {
310
- if (arr[i]) {
311
- extend(res, arr[i]);
312
- }
313
- }
314
- return res;
315
- };
316
-
317
- const getValueByPath = function(object, prop) {
318
- prop = prop || '';
319
- const paths = prop.split('.');
320
- let current = object;
321
- let result = null;
322
- for (let i = 0, j = paths.length; i < j; i++) {
323
- const path = paths[i];
324
- if (!current) break;
325
-
326
- if (i === j - 1) {
327
- result = current[path];
328
- break;
329
- }
330
- current = current[path];
331
- }
332
- return result;
333
- };
334
-
335
- function getPropByPath(obj, path, strict) {
336
- let tempObj = obj;
337
- path = path.replace(/\[(\w+)\]/g, '.$1');
338
- path = path.replace(/^\./, '');
339
-
340
- let keyArr = path.split('.');
341
- let i = 0;
342
- for (let len = keyArr.length; i < len - 1; ++i) {
343
- if (!tempObj && !strict) break;
344
- let key = keyArr[i];
345
- if (key in tempObj) {
346
- tempObj = tempObj[key];
347
- } else {
348
- if (strict) {
349
- throw new Error('please transfer a valid prop path to form item!');
350
- }
351
- break;
352
- }
353
- }
354
- return {
355
- o: tempObj,
356
- k: keyArr[i],
357
- v: tempObj ? tempObj[keyArr[i]] : null
358
- };
359
- };
360
-
361
- const generateId = function() {
362
- return Math.floor(Math.random() * 10000);
363
- };
364
-
365
- const valueEquals = (a, b) => {
366
- // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
367
- if (a === b) return true;
368
- if (!(a instanceof Array)) return false;
369
- if (!(b instanceof Array)) return false;
370
- if (a.length !== b.length) return false;
371
- for (let i = 0; i !== a.length; ++i) {
372
- if (a[i] !== b[i]) return false;
373
- }
374
- return true;
375
- };
376
-
377
- const escapeRegexpString = (value = '') => String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
378
-
379
- // TODO: use native Array.find, Array.findIndex when IE support is dropped
380
- const arrayFindIndex = function(arr, pred) {
381
- for (let i = 0; i !== arr.length; ++i) {
382
- if (pred(arr[i])) {
383
- return i;
384
- }
385
- }
386
- return -1;
387
- };
388
-
389
- const arrayFind = function(arr, pred) {
390
- const idx = arrayFindIndex(arr, pred);
391
- return idx !== -1 ? arr[idx] : undefined;
392
- };
393
-
394
- // coerce truthy value to array
395
- const coerceTruthyValueToArray = function(val) {
396
- if (Array.isArray(val)) {
397
- return val;
398
- } else if (val) {
399
- return [val];
400
- } else {
401
- return [];
402
- }
403
- };
404
-
405
- const isIE = function() {
406
- return !external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
407
- };
408
-
409
- const isEdge = function() {
410
- return !external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
411
- };
412
-
413
- const isFirefox = function() {
414
- return !external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
415
- };
416
-
417
- const autoprefixer = function(style) {
418
- if (typeof style !== 'object') return style;
419
- const rules = ['transform', 'transition', 'animation'];
420
- const prefixes = ['ms-', 'webkit-'];
421
- rules.forEach(rule => {
422
- const value = style[rule];
423
- if (rule && value) {
424
- prefixes.forEach(prefix => {
425
- style[prefix + rule] = value;
426
- });
427
- }
428
- });
429
- return style;
430
- };
431
-
432
- const kebabCase = function(str) {
433
- const hyphenateRE = /([^-])([A-Z])/g;
434
- return str
435
- .replace(hyphenateRE, '$1-$2')
436
- .replace(hyphenateRE, '$1-$2')
437
- .toLowerCase();
438
- };
439
-
440
- const capitalize = function(str) {
441
- if (!isString(str)) return str;
442
- return str.charAt(0).toUpperCase() + str.slice(1);
443
- };
444
-
445
- const looseEqual = function(a, b) {
446
- const isObjectA = isObject(a);
447
- const isObjectB = isObject(b);
448
- if (isObjectA && isObjectB) {
449
- return JSON.stringify(a) === JSON.stringify(b);
450
- } else if (!isObjectA && !isObjectB) {
451
- return String(a) === String(b);
452
- } else {
453
- return false;
454
- }
455
- };
456
-
457
- const arrayEquals = function(arrayA, arrayB) {
458
- arrayA = arrayA || [];
459
- arrayB = arrayB || [];
460
-
461
- if (arrayA.length !== arrayB.length) {
462
- return false;
463
- }
464
-
465
- for (let i = 0; i < arrayA.length; i++) {
466
- if (!looseEqual(arrayA[i], arrayB[i])) {
467
- return false;
468
- }
469
- }
470
-
471
- return true;
472
- };
473
-
474
- const isEqual = function(value1, value2) {
475
- if (Array.isArray(value1) && Array.isArray(value2)) {
476
- return arrayEquals(value1, value2);
477
- }
478
- return looseEqual(value1, value2);
479
- };
480
-
481
- const isEmpty = function(val) {
482
- // null or undefined
483
- if (val == null) return true;
484
-
485
- if (typeof val === 'boolean') return false;
486
-
487
- if (typeof val === 'number') return !val;
488
-
489
- if (val instanceof Error) return val.message === '';
490
-
491
- switch (Object.prototype.toString.call(val)) {
492
- // String or Array
493
- case '[object String]':
494
- case '[object Array]':
495
- return !val.length;
496
-
497
- // Map or Set or File
498
- case '[object File]':
499
- case '[object Map]':
500
- case '[object Set]': {
501
- return !val.size;
502
- }
503
- // Plain Object
504
- case '[object Object]': {
505
- return !Object.keys(val).length;
506
- }
507
- }
508
-
509
- return false;
510
- };
511
-
512
- function rafThrottle(fn) {
513
- let locked = false;
514
- return function(...args) {
515
- if (locked) return;
516
- locked = true;
517
- window.requestAnimationFrame(_ => {
518
- fn.apply(this, args);
519
- locked = false;
520
- });
521
- };
522
- }
523
-
524
- function objToArray(obj) {
525
- if (Array.isArray(obj)) {
526
- return obj;
527
- }
528
- return isEmpty(obj) ? [] : [obj];
529
- }
530
-
531
- const isMac = function() {
532
- return !external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
533
- };
534
-
535
- // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/merge.js
536
- /* harmony default export */ var merge = (function(target) {
537
- for (let i = 1, j = arguments.length; i < j; i++) {
538
- let source = arguments[i] || {};
539
- for (let prop in source) {
540
- if (source.hasOwnProperty(prop)) {
541
- let value = source[prop];
542
- if (value !== undefined) {
543
- target[prop] = value;
544
- }
545
- }
546
- }
547
- }
548
-
549
- return target;
550
- });;
551
-
552
- // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/popup/popup-manager.js
553
-
554
-
555
-
556
- let hasModal = false;
557
- let hasInitZIndex = false;
558
- let popup_manager_zIndex;
559
-
560
- const getModal = function() {
561
- if (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer) return;
562
- let modalDom = PopupManager.modalDom;
563
- if (modalDom) {
564
- hasModal = true;
565
- } else {
566
- hasModal = false;
567
- modalDom = document.createElement('div');
568
- PopupManager.modalDom = modalDom;
569
-
570
- modalDom.addEventListener('touchmove', function(event) {
571
- event.preventDefault();
572
- event.stopPropagation();
573
- });
574
-
575
- modalDom.addEventListener('click', function() {
576
- PopupManager.doOnModalClick && PopupManager.doOnModalClick();
577
- });
578
- }
579
-
580
- return modalDom;
581
- };
582
-
583
- const instances = {};
584
-
585
- const PopupManager = {
586
- modalFade: true,
587
-
588
- getInstance: function(id) {
589
- return instances[id];
590
- },
591
-
592
- register: function(id, instance) {
593
- if (id && instance) {
594
- instances[id] = instance;
595
- }
596
- },
597
-
598
- deregister: function(id) {
599
- if (id) {
600
- instances[id] = null;
601
- delete instances[id];
602
- }
603
- },
604
-
605
- nextZIndex: function() {
606
- return PopupManager.zIndex++;
607
- },
608
-
609
- modalStack: [],
610
-
611
- doOnModalClick: function() {
612
- const topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
613
- if (!topItem) return;
614
-
615
- const instance = PopupManager.getInstance(topItem.id);
616
- if (instance && instance.closeOnClickModal) {
617
- instance.close();
618
- }
619
- },
620
-
621
- openModal: function(id, zIndex, dom, modalClass, modalFade) {
622
- if (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer) return;
623
- if (!id || zIndex === undefined) return;
624
- this.modalFade = modalFade;
625
-
626
- const modalStack = this.modalStack;
627
-
628
- for (let i = 0, j = modalStack.length; i < j; i++) {
629
- const item = modalStack[i];
630
- if (item.id === id) {
631
- return;
632
- }
633
- }
634
-
635
- const modalDom = getModal();
636
-
637
- addClass(modalDom, 'v-modal');
638
- if (this.modalFade && !hasModal) {
639
- addClass(modalDom, 'v-modal-enter');
640
- }
641
- if (modalClass) {
642
- let classArr = modalClass.trim().split(/\s+/);
643
- classArr.forEach(item => addClass(modalDom, item));
644
- }
645
- setTimeout(() => {
646
- removeClass(modalDom, 'v-modal-enter');
647
- }, 200);
648
-
649
- if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
650
- dom.parentNode.appendChild(modalDom);
651
- } else {
652
- document.body.appendChild(modalDom);
653
- }
654
-
655
- if (zIndex) {
656
- modalDom.style.zIndex = zIndex;
657
- }
658
- modalDom.tabIndex = 0;
659
- modalDom.style.display = '';
660
-
661
- this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
662
- },
663
-
664
- closeModal: function(id) {
665
- const modalStack = this.modalStack;
666
- const modalDom = getModal();
667
-
668
- if (modalStack.length > 0) {
669
- const topItem = modalStack[modalStack.length - 1];
670
- if (topItem.id === id) {
671
- if (topItem.modalClass) {
672
- let classArr = topItem.modalClass.trim().split(/\s+/);
673
- classArr.forEach(item => removeClass(modalDom, item));
674
- }
675
-
676
- modalStack.pop();
677
- if (modalStack.length > 0) {
678
- modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
679
- }
680
- } else {
681
- for (let i = modalStack.length - 1; i >= 0; i--) {
682
- if (modalStack[i].id === id) {
683
- modalStack.splice(i, 1);
684
- break;
685
- }
686
- }
687
- }
688
- }
689
-
690
- if (modalStack.length === 0) {
691
- if (this.modalFade) {
692
- addClass(modalDom, 'v-modal-leave');
693
- }
694
- setTimeout(() => {
695
- if (modalStack.length === 0) {
696
- if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
697
- modalDom.style.display = 'none';
698
- PopupManager.modalDom = undefined;
699
- }
700
- removeClass(modalDom, 'v-modal-leave');
701
- }, 200);
702
- }
703
- }
704
- };
705
-
706
- Object.defineProperty(PopupManager, 'zIndex', {
707
- configurable: true,
708
- get() {
709
- if (!hasInitZIndex) {
710
- popup_manager_zIndex = popup_manager_zIndex || (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
711
- hasInitZIndex = true;
712
- }
713
- return popup_manager_zIndex;
714
- },
715
- set(value) {
716
- popup_manager_zIndex = value;
717
- }
718
- });
719
-
720
- const getTopPopup = function() {
721
- if (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer) return;
722
- if (PopupManager.modalStack.length > 0) {
723
- const topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
724
- if (!topPopup) return;
725
- const instance = PopupManager.getInstance(topPopup.id);
726
-
727
- return instance;
728
- }
729
- };
730
-
731
- if (!external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer) {
732
- // handle `esc` key when the popup is shown
733
- window.addEventListener('keydown', function(event) {
734
- if (event.keyCode === 27) {
735
- const topPopup = getTopPopup();
736
-
737
- if (topPopup && topPopup.closeOnPressEscape) {
738
- topPopup.handleClose
739
- ? topPopup.handleClose()
740
- : (topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close());
741
- }
742
- }
743
- });
744
- }
745
-
746
- /* harmony default export */ var popup_manager = (PopupManager);
747
-
748
- // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/scrollbar-width.js
749
-
750
-
751
- let scrollBarWidth;
752
-
753
- /* harmony default export */ var scrollbar_width = (function() {
754
- if (external_commonjs_vue_commonjs2_vue_root_Vue_default.a.prototype.$isServer) return 0;
755
- if (scrollBarWidth !== undefined) return scrollBarWidth;
756
-
757
- const outer = document.createElement('div');
758
- outer.className = 'el-scrollbar__wrap';
759
- outer.style.visibility = 'hidden';
760
- outer.style.width = '100px';
761
- outer.style.position = 'absolute';
762
- outer.style.top = '-9999px';
763
- document.body.appendChild(outer);
764
-
765
- const widthNoScroll = outer.offsetWidth;
766
- outer.style.overflow = 'scroll';
767
-
768
- const inner = document.createElement('div');
769
- inner.style.width = '100%';
770
- outer.appendChild(inner);
771
-
772
- const widthWithScroll = inner.offsetWidth;
773
- outer.parentNode.removeChild(outer);
774
- scrollBarWidth = widthNoScroll - widthWithScroll;
775
-
776
- return scrollBarWidth;
777
- });;
778
-
779
- // CONCATENATED MODULE: ./node_modules/element-ui/src/utils/popup/index.js
780
-
781
-
782
-
783
-
784
-
785
-
786
- let idSeed = 1;
787
-
788
- let popup_scrollBarWidth;
789
-
790
- /* harmony default export */ var popup = ({
791
- props: {
792
- visible: {
793
- type: Boolean,
794
- default: false
795
- },
796
- openDelay: {},
797
- closeDelay: {},
798
- zIndex: {},
799
- modal: {
800
- type: Boolean,
801
- default: false
802
- },
803
- modalFade: {
804
- type: Boolean,
805
- default: true
806
- },
807
- modalClass: {},
808
- modalAppendToBody: {
809
- type: Boolean,
810
- default: false
811
- },
812
- lockScroll: {
813
- type: Boolean,
814
- default: true
815
- },
816
- closeOnPressEscape: {
817
- type: Boolean,
818
- default: false
819
- },
820
- closeOnClickModal: {
821
- type: Boolean,
822
- default: false
823
- }
824
- },
825
-
826
- beforeMount() {
827
- this._popupId = 'popup-' + idSeed++;
828
- popup_manager.register(this._popupId, this);
829
- },
830
-
831
- beforeDestroy() {
832
- popup_manager.deregister(this._popupId);
833
- popup_manager.closeModal(this._popupId);
834
-
835
- this.restoreBodyStyle();
836
- },
837
-
838
- data() {
839
- return {
840
- opened: false,
841
- bodyPaddingRight: null,
842
- computedBodyPaddingRight: 0,
843
- withoutHiddenClass: true,
844
- rendered: false
845
- };
846
- },
847
-
848
- watch: {
849
- visible(val) {
850
- if (val) {
851
- if (this._opening) return;
852
- if (!this.rendered) {
853
- this.rendered = true;
854
- external_commonjs_vue_commonjs2_vue_root_Vue_default.a.nextTick(() => {
855
- this.open();
856
- });
857
- } else {
858
- this.open();
859
- }
860
- } else {
861
- this.close();
862
- }
863
- }
864
- },
865
-
866
- methods: {
867
- open(options) {
868
- if (!this.rendered) {
869
- this.rendered = true;
870
- }
871
-
872
- const props = merge({}, this.$props || this, options);
873
-
874
- if (this._closeTimer) {
875
- clearTimeout(this._closeTimer);
876
- this._closeTimer = null;
877
- }
878
- clearTimeout(this._openTimer);
879
-
880
- const openDelay = Number(props.openDelay);
881
- if (openDelay > 0) {
882
- this._openTimer = setTimeout(() => {
883
- this._openTimer = null;
884
- this.doOpen(props);
885
- }, openDelay);
886
- } else {
887
- this.doOpen(props);
888
- }
889
- },
890
-
891
- doOpen(props) {
892
- if (this.$isServer) return;
893
- if (this.willOpen && !this.willOpen()) return;
894
- if (this.opened) return;
895
-
896
- this._opening = true;
897
-
898
- const dom = this.$el;
899
-
900
- const modal = props.modal;
901
-
902
- const zIndex = props.zIndex;
903
- if (zIndex) {
904
- popup_manager.zIndex = zIndex;
905
- }
906
-
907
- if (modal) {
908
- if (this._closing) {
909
- popup_manager.closeModal(this._popupId);
910
- this._closing = false;
911
- }
912
- popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
913
- if (props.lockScroll) {
914
- this.withoutHiddenClass = !hasClass(document.body, 'el-popup-parent--hidden');
915
- if (this.withoutHiddenClass) {
916
- this.bodyPaddingRight = document.body.style.paddingRight;
917
- this.computedBodyPaddingRight = parseInt(getStyle(document.body, 'paddingRight'), 10);
918
- }
919
- popup_scrollBarWidth = scrollbar_width();
920
- let bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
921
- let bodyOverflowY = getStyle(document.body, 'overflowY');
922
- if (popup_scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
923
- document.body.style.paddingRight = this.computedBodyPaddingRight + popup_scrollBarWidth + 'px';
924
- }
925
- addClass(document.body, 'el-popup-parent--hidden');
926
- }
927
- }
928
-
929
- if (getComputedStyle(dom).position === 'static') {
930
- dom.style.position = 'absolute';
931
- }
932
-
933
- dom.style.zIndex = popup_manager.nextZIndex();
934
- this.opened = true;
935
-
936
- this.onOpen && this.onOpen();
937
-
938
- this.doAfterOpen();
939
- },
940
-
941
- doAfterOpen() {
942
- this._opening = false;
943
- },
944
-
945
- close() {
946
- if (this.willClose && !this.willClose()) return;
947
-
948
- if (this._openTimer !== null) {
949
- clearTimeout(this._openTimer);
950
- this._openTimer = null;
951
- }
952
- clearTimeout(this._closeTimer);
953
-
954
- const closeDelay = Number(this.closeDelay);
955
-
956
- if (closeDelay > 0) {
957
- this._closeTimer = setTimeout(() => {
958
- this._closeTimer = null;
959
- this.doClose();
960
- }, closeDelay);
961
- } else {
962
- this.doClose();
963
- }
964
- },
965
-
966
- doClose() {
967
- this._closing = true;
968
-
969
- this.onClose && this.onClose();
970
-
971
- if (this.lockScroll) {
972
- setTimeout(this.restoreBodyStyle, 200);
973
- }
974
-
975
- this.opened = false;
976
-
977
- this.doAfterClose();
978
- },
979
-
980
- doAfterClose() {
981
- popup_manager.closeModal(this._popupId);
982
- this._closing = false;
983
- },
984
-
985
- restoreBodyStyle() {
986
- if (this.modal && this.withoutHiddenClass) {
987
- document.body.style.paddingRight = this.bodyPaddingRight;
988
- removeClass(document.body, 'el-popup-parent--hidden');
989
- }
990
- this.withoutHiddenClass = true;
991
- }
992
- }
993
- });
994
-
995
-
996
-
997
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/@vue/cli-service/node_modules/vue-loader/lib??vue-loader-options!./node_modules/element-ui/packages/image/src/image-viewer.vue?vue&type=script&lang=js&
998
- //
999
- //
1000
- //
1001
- //
1002
- //
1003
- //
1004
- //
1005
- //
1006
- //
1007
- //
1008
- //
1009
- //
1010
- //
1011
- //
1012
- //
1013
- //
1014
- //
1015
- //
1016
- //
1017
- //
1018
- //
1019
- //
1020
- //
1021
- //
1022
- //
1023
- //
1024
- //
1025
- //
1026
- //
1027
- //
1028
- //
1029
- //
1030
- //
1031
- //
1032
- //
1033
- //
1034
- //
1035
- //
1036
- //
1037
- //
1038
- //
1039
- //
1040
- //
1041
- //
1042
- //
1043
- //
1044
- //
1045
- //
1046
- //
1047
- //
1048
- //
1049
- //
1050
- //
1051
- //
1052
-
1053
-
1054
-
1055
-
1056
-
1057
- const Mode = {
1058
- CONTAIN: {
1059
- name: 'contain',
1060
- icon: 'el-icon-full-screen'
1061
- },
1062
- ORIGINAL: {
1063
- name: 'original',
1064
- icon: 'el-icon-c-scale-to-original'
1065
- }
1066
- };
1067
-
1068
- const mousewheelEventName = isFirefox() ? 'DOMMouseScroll' : 'mousewheel';
1069
-
1070
- /* harmony default export */ var image_viewervue_type_script_lang_js_ = ({
1071
- name: 'elImageViewer',
1072
-
1073
- props: {
1074
- urlList: {
1075
- type: Array,
1076
- default: () => []
1077
- },
1078
- zIndex: {
1079
- type: Number,
1080
- default: 2000
1081
- },
1082
- onSwitch: {
1083
- type: Function,
1084
- default: () => {}
1085
- },
1086
- onClose: {
1087
- type: Function,
1088
- default: () => {}
1089
- },
1090
- initialIndex: {
1091
- type: Number,
1092
- default: 0
1093
- },
1094
- appendToBody: {
1095
- type: Boolean,
1096
- default: true
1097
- },
1098
- maskClosable: {
1099
- type: Boolean,
1100
- default: true
1101
- }
1102
- },
1103
-
1104
- data() {
1105
- return {
1106
- index: this.initialIndex,
1107
- isShow: false,
1108
- infinite: true,
1109
- loading: false,
1110
- mode: Mode.CONTAIN,
1111
- transform: {
1112
- scale: 1,
1113
- deg: 0,
1114
- offsetX: 0,
1115
- offsetY: 0,
1116
- enableTransition: false
1117
- }
1118
- };
1119
- },
1120
- computed: {
1121
- isSingle() {
1122
- return this.urlList.length <= 1;
1123
- },
1124
- isFirst() {
1125
- return this.index === 0;
1126
- },
1127
- isLast() {
1128
- return this.index === this.urlList.length - 1;
1129
- },
1130
- currentImg() {
1131
- return this.urlList[this.index];
1132
- },
1133
- imgStyle() {
1134
- const { scale, deg, offsetX, offsetY, enableTransition } = this.transform;
1135
- const style = {
1136
- transform: `scale(${scale}) rotate(${deg}deg)`,
1137
- transition: enableTransition ? 'transform .3s' : '',
1138
- 'margin-left': `${offsetX}px`,
1139
- 'margin-top': `${offsetY}px`
1140
- };
1141
- if (this.mode === Mode.CONTAIN) {
1142
- style.maxWidth = style.maxHeight = '100%';
1143
- }
1144
- return style;
1145
- },
1146
- viewerZIndex() {
1147
- const nextZIndex = popup_manager.nextZIndex();
1148
- return this.zIndex > nextZIndex ? this.zIndex : nextZIndex;
1149
- }
1150
- },
1151
- watch: {
1152
- index: {
1153
- handler: function(val) {
1154
- this.reset();
1155
- this.onSwitch(val);
1156
- }
1157
- },
1158
- currentImg(val) {
1159
- this.$nextTick(_ => {
1160
- const $img = this.$refs.img[0];
1161
- if (!$img.complete) {
1162
- this.loading = true;
1163
- }
1164
- });
1165
- }
1166
- },
1167
- methods: {
1168
- hide() {
1169
- this.deviceSupportUninstall();
1170
- this.onClose();
1171
- },
1172
- deviceSupportInstall() {
1173
- this._keyDownHandler = e => {
1174
- e.stopPropagation();
1175
- const keyCode = e.keyCode;
1176
- switch (keyCode) {
1177
- // ESC
1178
- case 27:
1179
- this.hide();
1180
- break;
1181
- // SPACE
1182
- case 32:
1183
- this.toggleMode();
1184
- break;
1185
- // LEFT_ARROW
1186
- case 37:
1187
- this.prev();
1188
- break;
1189
- // UP_ARROW
1190
- case 38:
1191
- this.handleActions('zoomIn');
1192
- break;
1193
- // RIGHT_ARROW
1194
- case 39:
1195
- this.next();
1196
- break;
1197
- // DOWN_ARROW
1198
- case 40:
1199
- this.handleActions('zoomOut');
1200
- break;
1201
- }
1202
- };
1203
- this._mouseWheelHandler = rafThrottle(e => {
1204
- const delta = e.wheelDelta ? e.wheelDelta : -e.detail;
1205
- if (delta > 0) {
1206
- this.handleActions('zoomIn', {
1207
- zoomRate: 0.015,
1208
- enableTransition: false
1209
- });
1210
- } else {
1211
- this.handleActions('zoomOut', {
1212
- zoomRate: 0.015,
1213
- enableTransition: false
1214
- });
1215
- }
1216
- });
1217
- on(document, 'keydown', this._keyDownHandler);
1218
- on(document, mousewheelEventName, this._mouseWheelHandler);
1219
- },
1220
- deviceSupportUninstall() {
1221
- off(document, 'keydown', this._keyDownHandler);
1222
- off(document, mousewheelEventName, this._mouseWheelHandler);
1223
- this._keyDownHandler = null;
1224
- this._mouseWheelHandler = null;
1225
- },
1226
- handleImgLoad(e) {
1227
- this.loading = false;
1228
- },
1229
- handleImgError(e) {
1230
- this.loading = false;
1231
- e.target.alt = '加载失败';
1232
- },
1233
- handleMouseDown(e) {
1234
- if (this.loading || e.button !== 0) return;
1235
-
1236
- const { offsetX, offsetY } = this.transform;
1237
- const startX = e.pageX;
1238
- const startY = e.pageY;
1239
- this._dragHandler = rafThrottle(ev => {
1240
- this.transform.offsetX = offsetX + ev.pageX - startX;
1241
- this.transform.offsetY = offsetY + ev.pageY - startY;
1242
- });
1243
- on(document, 'mousemove', this._dragHandler);
1244
- on(document, 'mouseup', ev => {
1245
- off(document, 'mousemove', this._dragHandler);
1246
- });
1247
-
1248
- e.preventDefault();
1249
- },
1250
- handleMaskClick() {
1251
- if (this.maskClosable) {
1252
- this.hide();
1253
- }
1254
- },
1255
- reset() {
1256
- this.transform = {
1257
- scale: 1,
1258
- deg: 0,
1259
- offsetX: 0,
1260
- offsetY: 0,
1261
- enableTransition: false
1262
- };
1263
- },
1264
- toggleMode() {
1265
- if (this.loading) return;
1266
-
1267
- const modeNames = Object.keys(Mode);
1268
- const modeValues = Object.values(Mode);
1269
- const index = modeValues.indexOf(this.mode);
1270
- const nextIndex = (index + 1) % modeNames.length;
1271
- this.mode = Mode[modeNames[nextIndex]];
1272
- this.reset();
1273
- },
1274
- prev() {
1275
- if (this.isFirst && !this.infinite) return;
1276
- const len = this.urlList.length;
1277
- this.index = (this.index - 1 + len) % len;
1278
- },
1279
- next() {
1280
- if (this.isLast && !this.infinite) return;
1281
- const len = this.urlList.length;
1282
- this.index = (this.index + 1) % len;
1283
- },
1284
- handleActions(action, options = {}) {
1285
- if (this.loading) return;
1286
- const { zoomRate, rotateDeg, enableTransition } = {
1287
- zoomRate: 0.2,
1288
- rotateDeg: 90,
1289
- enableTransition: true,
1290
- ...options
1291
- };
1292
- const { transform } = this;
1293
- switch (action) {
1294
- case 'zoomOut':
1295
- if (transform.scale > 0.2) {
1296
- transform.scale = parseFloat((transform.scale - zoomRate).toFixed(3));
1297
- }
1298
- break;
1299
- case 'zoomIn':
1300
- transform.scale = parseFloat((transform.scale + zoomRate).toFixed(3));
1301
- break;
1302
- case 'clocelise':
1303
- transform.deg += rotateDeg;
1304
- break;
1305
- case 'anticlocelise':
1306
- transform.deg -= rotateDeg;
1307
- break;
1308
- }
1309
- transform.enableTransition = enableTransition;
1310
- }
1311
- },
1312
- mounted() {
1313
- this.deviceSupportInstall();
1314
- if (this.appendToBody) {
1315
- document.body.appendChild(this.$el);
1316
- }
1317
- // add tabindex then wrapper can be focusable via Javascript
1318
- // focus wrapper so arrow key can't cause inner scroll behavior underneath
1319
- this.$refs['el-image-viewer__wrapper'].focus();
1320
- },
1321
- destroyed() {
1322
- // if appendToBody is true, remove DOM node after destroy
1323
- if (this.appendToBody && this.$el && this.$el.parentNode) {
1324
- this.$el.parentNode.removeChild(this.$el);
1325
- }
1326
- }
1327
- });
1328
-
1329
- // CONCATENATED MODULE: ./node_modules/element-ui/packages/image/src/image-viewer.vue?vue&type=script&lang=js&
1330
- /* harmony default export */ var src_image_viewervue_type_script_lang_js_ = (image_viewervue_type_script_lang_js_);
1331
- // EXTERNAL MODULE: ./node_modules/@vue/cli-service/node_modules/vue-loader/lib/runtime/componentNormalizer.js
1332
- var componentNormalizer = __webpack_require__("0c7c");
1333
-
1334
- // CONCATENATED MODULE: ./node_modules/element-ui/packages/image/src/image-viewer.vue
1335
-
1336
-
1337
-
1338
-
1339
-
1340
- /* normalize component */
1341
-
1342
- var component = Object(componentNormalizer["a" /* default */])(
1343
- src_image_viewervue_type_script_lang_js_,
1344
- render,
1345
- staticRenderFns,
1346
- false,
1347
- null,
1348
- null,
1349
- null
1350
-
1351
- )
1352
-
1353
- /* harmony default export */ var image_viewer = __webpack_exports__["a"] = (component.exports);
1354
-
1355
- /***/ }),
1356
-
1357
- /***/ "450d":
1358
- /***/ (function(module, exports, __webpack_require__) {
1359
-
1360
- // extracted by mini-css-extract-plugin
1361
-
1362
- /***/ }),
1363
-
1364
- /***/ "8bbc":
1365
- /***/ (function(module, exports, __webpack_require__) {
1366
-
1367
- module.exports =
1368
- /******/ (function(modules) { // webpackBootstrap
1369
- /******/ // The module cache
1370
- /******/ var installedModules = {};
1371
- /******/
1372
- /******/ // The require function
1373
- /******/ function __webpack_require__(moduleId) {
1374
- /******/
1375
- /******/ // Check if module is in cache
1376
- /******/ if(installedModules[moduleId]) {
1377
- /******/ return installedModules[moduleId].exports;
1378
- /******/ }
1379
- /******/ // Create a new module (and put it into the cache)
1380
- /******/ var module = installedModules[moduleId] = {
1381
- /******/ i: moduleId,
1382
- /******/ l: false,
1383
- /******/ exports: {}
1384
- /******/ };
1385
- /******/
1386
- /******/ // Execute the module function
1387
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
1388
- /******/
1389
- /******/ // Flag the module as loaded
1390
- /******/ module.l = true;
1391
- /******/
1392
- /******/ // Return the exports of the module
1393
- /******/ return module.exports;
1394
- /******/ }
1395
- /******/
1396
- /******/
1397
- /******/ // expose the modules object (__webpack_modules__)
1398
- /******/ __webpack_require__.m = modules;
1399
- /******/
1400
- /******/ // expose the module cache
1401
- /******/ __webpack_require__.c = installedModules;
1402
- /******/
1403
- /******/ // define getter function for harmony exports
1404
- /******/ __webpack_require__.d = function(exports, name, getter) {
1405
- /******/ if(!__webpack_require__.o(exports, name)) {
1406
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
1407
- /******/ }
1408
- /******/ };
1409
- /******/
1410
- /******/ // define __esModule on exports
1411
- /******/ __webpack_require__.r = function(exports) {
1412
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1413
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1414
- /******/ }
1415
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
1416
- /******/ };
1417
- /******/
1418
- /******/ // create a fake namespace object
1419
- /******/ // mode & 1: value is a module id, require it
1420
- /******/ // mode & 2: merge all properties of value into the ns
1421
- /******/ // mode & 4: return value when already ns object
1422
- /******/ // mode & 8|1: behave like require
1423
- /******/ __webpack_require__.t = function(value, mode) {
1424
- /******/ if(mode & 1) value = __webpack_require__(value);
1425
- /******/ if(mode & 8) return value;
1426
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
1427
- /******/ var ns = Object.create(null);
1428
- /******/ __webpack_require__.r(ns);
1429
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
1430
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
1431
- /******/ return ns;
1432
- /******/ };
1433
- /******/
1434
- /******/ // getDefaultExport function for compatibility with non-harmony modules
1435
- /******/ __webpack_require__.n = function(module) {
1436
- /******/ var getter = module && module.__esModule ?
1437
- /******/ function getDefault() { return module['default']; } :
1438
- /******/ function getModuleExports() { return module; };
1439
- /******/ __webpack_require__.d(getter, 'a', getter);
1440
- /******/ return getter;
1441
- /******/ };
1442
- /******/
1443
- /******/ // Object.prototype.hasOwnProperty.call
1444
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
1445
- /******/
1446
- /******/ // __webpack_public_path__
1447
- /******/ __webpack_require__.p = "/dist/";
1448
- /******/
1449
- /******/
1450
- /******/ // Load entry module and return exports
1451
- /******/ return __webpack_require__(__webpack_require__.s = 132);
1452
- /******/ })
1453
- /************************************************************************/
1454
- /******/ ({
1455
-
1456
- /***/ 0:
1457
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1458
-
1459
- "use strict";
1460
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
1461
- /* globals __VUE_SSR_CONTEXT__ */
1462
-
1463
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
1464
- // This module is a runtime utility for cleaner component module output and will
1465
- // be included in the final webpack user bundle.
1466
-
1467
- function normalizeComponent (
1468
- scriptExports,
1469
- render,
1470
- staticRenderFns,
1471
- functionalTemplate,
1472
- injectStyles,
1473
- scopeId,
1474
- moduleIdentifier, /* server only */
1475
- shadowMode /* vue-cli only */
1476
- ) {
1477
- // Vue.extend constructor export interop
1478
- var options = typeof scriptExports === 'function'
1479
- ? scriptExports.options
1480
- : scriptExports
1481
-
1482
- // render functions
1483
- if (render) {
1484
- options.render = render
1485
- options.staticRenderFns = staticRenderFns
1486
- options._compiled = true
1487
- }
1488
-
1489
- // functional template
1490
- if (functionalTemplate) {
1491
- options.functional = true
1492
- }
1493
-
1494
- // scopedId
1495
- if (scopeId) {
1496
- options._scopeId = 'data-v-' + scopeId
1497
- }
1498
-
1499
- var hook
1500
- if (moduleIdentifier) { // server build
1501
- hook = function (context) {
1502
- // 2.3 injection
1503
- context =
1504
- context || // cached call
1505
- (this.$vnode && this.$vnode.ssrContext) || // stateful
1506
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
1507
- // 2.2 with runInNewContext: true
1508
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
1509
- context = __VUE_SSR_CONTEXT__
1510
- }
1511
- // inject component styles
1512
- if (injectStyles) {
1513
- injectStyles.call(this, context)
1514
- }
1515
- // register component module identifier for async chunk inferrence
1516
- if (context && context._registeredComponents) {
1517
- context._registeredComponents.add(moduleIdentifier)
1518
- }
1519
- }
1520
- // used by ssr in case component is cached and beforeCreate
1521
- // never gets called
1522
- options._ssrRegister = hook
1523
- } else if (injectStyles) {
1524
- hook = shadowMode
1525
- ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
1526
- : injectStyles
1527
- }
1528
-
1529
- if (hook) {
1530
- if (options.functional) {
1531
- // for template-only hot-reload because in that case the render fn doesn't
1532
- // go through the normalizer
1533
- options._injectStyles = hook
1534
- // register for functioal component in vue file
1535
- var originalRender = options.render
1536
- options.render = function renderWithStyleInjection (h, context) {
1537
- hook.call(context)
1538
- return originalRender(h, context)
1539
- }
1540
- } else {
1541
- // inject component registration as beforeCreate hook
1542
- var existing = options.beforeCreate
1543
- options.beforeCreate = existing
1544
- ? [].concat(existing, hook)
1545
- : [hook]
1546
- }
1547
- }
1548
-
1549
- return {
1550
- exports: scriptExports,
1551
- options: options
1552
- }
1553
- }
1554
-
1555
-
1556
- /***/ }),
1557
-
1558
- /***/ 132:
1559
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1560
-
1561
- "use strict";
1562
- __webpack_require__.r(__webpack_exports__);
1563
-
1564
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tag/src/tag.vue?vue&type=script&lang=js&
1565
-
1566
- /* harmony default export */ var tagvue_type_script_lang_js_ = ({
1567
- name: 'ElTag',
1568
- props: {
1569
- text: String,
1570
- closable: Boolean,
1571
- type: String,
1572
- hit: Boolean,
1573
- disableTransitions: Boolean,
1574
- color: String,
1575
- size: String,
1576
- effect: {
1577
- type: String,
1578
- default: 'light',
1579
- validator: function validator(val) {
1580
- return ['dark', 'light', 'plain'].indexOf(val) !== -1;
1581
- }
1582
- }
1583
- },
1584
- methods: {
1585
- handleClose: function handleClose(event) {
1586
- event.stopPropagation();
1587
- this.$emit('close', event);
1588
- },
1589
- handleClick: function handleClick(event) {
1590
- this.$emit('click', event);
1591
- }
1592
- },
1593
- computed: {
1594
- tagSize: function tagSize() {
1595
- return this.size || (this.$ELEMENT || {}).size;
1596
- }
1597
- },
1598
- render: function render(h) {
1599
- var type = this.type,
1600
- tagSize = this.tagSize,
1601
- hit = this.hit,
1602
- effect = this.effect;
1603
-
1604
- var classes = ['el-tag', type ? 'el-tag--' + type : '', tagSize ? 'el-tag--' + tagSize : '', effect ? 'el-tag--' + effect : '', hit && 'is-hit'];
1605
- var tagEl = h(
1606
- 'span',
1607
- {
1608
- 'class': classes,
1609
- style: { backgroundColor: this.color },
1610
- on: {
1611
- 'click': this.handleClick
1612
- }
1613
- },
1614
- [this.$slots.default, this.closable && h('i', { 'class': 'el-tag__close el-icon-close', on: {
1615
- 'click': this.handleClose
1616
- }
1617
- })]
1618
- );
1619
-
1620
- return this.disableTransitions ? tagEl : h(
1621
- 'transition',
1622
- {
1623
- attrs: { name: 'el-zoom-in-center' }
1624
- },
1625
- [tagEl]
1626
- );
1627
- }
1628
- });
1629
- // CONCATENATED MODULE: ./packages/tag/src/tag.vue?vue&type=script&lang=js&
1630
- /* harmony default export */ var src_tagvue_type_script_lang_js_ = (tagvue_type_script_lang_js_);
1631
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
1632
- var componentNormalizer = __webpack_require__(0);
1633
-
1634
- // CONCATENATED MODULE: ./packages/tag/src/tag.vue
1635
- var render, staticRenderFns
1636
-
1637
-
1638
-
1639
-
1640
- /* normalize component */
1641
-
1642
- var component = Object(componentNormalizer["a" /* default */])(
1643
- src_tagvue_type_script_lang_js_,
1644
- render,
1645
- staticRenderFns,
1646
- false,
1647
- null,
1648
- null,
1649
- null
1650
-
1651
- )
1652
-
1653
- /* hot reload */
1654
- if (false) { var api; }
1655
- component.options.__file = "packages/tag/src/tag.vue"
1656
- /* harmony default export */ var tag = (component.exports);
1657
- // CONCATENATED MODULE: ./packages/tag/index.js
1658
-
1659
-
1660
- /* istanbul ignore next */
1661
- tag.install = function (Vue) {
1662
- Vue.component(tag.name, tag);
1663
- };
1664
-
1665
- /* harmony default export */ var packages_tag = __webpack_exports__["default"] = (tag);
1666
-
1667
- /***/ })
1668
-
1669
- /******/ });
1670
-
1671
- /***/ }),
1672
-
1673
- /***/ "cbb5":
1674
- /***/ (function(module, exports, __webpack_require__) {
1675
-
1676
- // extracted by mini-css-extract-plugin
1677
-
1678
- /***/ })
1679
-
1680
- }]);