dpzvc-ui 1.2.2 → 1.2.4
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.
- package/build-style.js +11 -22
- package/dist/dpzvc.esm.js +471 -555
- package/dist/dpzvc.esm.js.map +1 -1
- package/dist/dpzvc.esm.min.js +1 -1
- package/dist/dpzvc.esm.min.js.map +1 -1
- package/dist/dpzvc.js +449 -574
- package/dist/dpzvc.js.map +1 -1
- package/dist/dpzvc.min.js +1 -1
- package/dist/dpzvc.min.js.map +1 -1
- package/dist-prod/445.02e4c5b08288b0d23ede.js +3 -0
- package/dist-prod/445.02e4c5b08288b0d23ede.js.LICENSE.txt +5 -0
- package/dist-prod/445.02e4c5b08288b0d23ede.js.map +1 -0
- package/dist-prod/index.html +1 -1
- package/dist-prod/main.992de223adbd07b6b84b.js +2 -0
- package/dist-prod/main.992de223adbd07b6b84b.js.map +1 -0
- package/dist-prod/rater.2a701809bfde6325d1a2.chunk.js +2 -0
- package/dist-prod/rater.2a701809bfde6325d1a2.chunk.js.map +1 -0
- package/package.json +2 -1
- package/src/components/Indicator/index.js +58 -123
- package/src/components/modal/confirm.js +106 -153
- package/src/components/prompt/confirm.js +70 -169
- package/src/components/upload/upload.vue +1 -1
- package/src/lib/MegaPixImage.js +126 -122
- package/src/lib/MegaPixImageOld.js +157 -0
package/dist/dpzvc.js
CHANGED
|
@@ -11,244 +11,6 @@
|
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
14
|
-
/***/ 37
|
|
15
|
-
(module, __webpack_exports__, __webpack_require__) {
|
|
16
|
-
|
|
17
|
-
"use strict";
|
|
18
|
-
__webpack_require__.r(__webpack_exports__);
|
|
19
|
-
/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(284);
|
|
20
|
-
/* module decorator */ module = __webpack_require__.hmd(module);
|
|
21
|
-
|
|
22
|
-
// MegaPixImage.js
|
|
23
|
-
(function (global, factory) {
|
|
24
|
-
if (( false ? 0 : (0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(module)) === 'object' && (0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(module.exports) === 'object') {
|
|
25
|
-
module.exports = factory(); // CommonJS
|
|
26
|
-
} else if (typeof define === 'function' && __webpack_require__.amdO) {
|
|
27
|
-
define([], factory); // AMD
|
|
28
|
-
} else {
|
|
29
|
-
global.MegaPixImage = factory(); // Browser global
|
|
30
|
-
}
|
|
31
|
-
})(typeof window !== 'undefined' ? window : undefined, function () {
|
|
32
|
-
// -------------------------
|
|
33
|
-
// Helper functions
|
|
34
|
-
// -------------------------
|
|
35
|
-
function detectSubsampling(img) {
|
|
36
|
-
var iw = img.naturalWidth,
|
|
37
|
-
ih = img.naturalHeight;
|
|
38
|
-
if (iw * ih > 1024 * 1024) {
|
|
39
|
-
var canvas = document.createElement('canvas');
|
|
40
|
-
canvas.width = canvas.height = 1;
|
|
41
|
-
var ctx = canvas.getContext('2d');
|
|
42
|
-
ctx.drawImage(img, -iw + 1, 0);
|
|
43
|
-
return ctx.getImageData(0, 0, 1, 1).data[3] === 0;
|
|
44
|
-
} else {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
function detectVerticalSquash(img, iw, ih) {
|
|
49
|
-
var canvas = document.createElement('canvas');
|
|
50
|
-
canvas.width = 1;
|
|
51
|
-
canvas.height = ih;
|
|
52
|
-
var ctx = canvas.getContext('2d');
|
|
53
|
-
ctx.drawImage(img, 0, 0);
|
|
54
|
-
var data = ctx.getImageData(0, 0, 1, ih).data;
|
|
55
|
-
var sy = 0,
|
|
56
|
-
ey = ih,
|
|
57
|
-
py = ih;
|
|
58
|
-
while (py > sy) {
|
|
59
|
-
var alpha = data[(py - 1) * 4 + 3];
|
|
60
|
-
if (alpha === 0) {
|
|
61
|
-
ey = py;
|
|
62
|
-
} else {
|
|
63
|
-
sy = py;
|
|
64
|
-
}
|
|
65
|
-
py = ey + sy >> 1;
|
|
66
|
-
}
|
|
67
|
-
var ratio = py / ih;
|
|
68
|
-
return ratio === 0 ? 1 : ratio;
|
|
69
|
-
}
|
|
70
|
-
function renderImageToDataURL(img, options, doSquash) {
|
|
71
|
-
var canvas = document.createElement('canvas');
|
|
72
|
-
renderImageToCanvas(img, canvas, options, doSquash);
|
|
73
|
-
return canvas.toDataURL("image/jpeg", options.quality || 0.8);
|
|
74
|
-
}
|
|
75
|
-
function renderImageToCanvas(img, canvas, options, doSquash) {
|
|
76
|
-
var iw = img.naturalWidth,
|
|
77
|
-
ih = img.naturalHeight;
|
|
78
|
-
if (!(iw + ih)) return;
|
|
79
|
-
var width = options.width,
|
|
80
|
-
height = options.height;
|
|
81
|
-
var ctx = canvas.getContext('2d');
|
|
82
|
-
ctx.save();
|
|
83
|
-
transformCoordinate(canvas, ctx, width, height, options.orientation);
|
|
84
|
-
var subsampled = detectSubsampling(img);
|
|
85
|
-
if (subsampled) {
|
|
86
|
-
iw /= 2;
|
|
87
|
-
ih /= 2;
|
|
88
|
-
}
|
|
89
|
-
var d = 1024;
|
|
90
|
-
var tmpCanvas = document.createElement('canvas');
|
|
91
|
-
tmpCanvas.width = tmpCanvas.height = d;
|
|
92
|
-
var tmpCtx = tmpCanvas.getContext('2d');
|
|
93
|
-
var vertSquashRatio = doSquash ? detectVerticalSquash(img, iw, ih) : 1;
|
|
94
|
-
var dw = Math.ceil(d * width / iw);
|
|
95
|
-
var dh = Math.ceil(d * height / ih / vertSquashRatio);
|
|
96
|
-
var sy = 0,
|
|
97
|
-
dy = 0;
|
|
98
|
-
while (sy < ih) {
|
|
99
|
-
var sx = 0,
|
|
100
|
-
dx = 0;
|
|
101
|
-
while (sx < iw) {
|
|
102
|
-
tmpCtx.clearRect(0, 0, d, d);
|
|
103
|
-
tmpCtx.drawImage(img, -sx, -sy);
|
|
104
|
-
ctx.drawImage(tmpCanvas, 0, 0, d, d, dx, dy, dw, dh);
|
|
105
|
-
sx += d;
|
|
106
|
-
dx += dw;
|
|
107
|
-
}
|
|
108
|
-
sy += d;
|
|
109
|
-
dy += dh;
|
|
110
|
-
}
|
|
111
|
-
ctx.restore();
|
|
112
|
-
tmpCanvas = tmpCtx = null;
|
|
113
|
-
}
|
|
114
|
-
function transformCoordinate(canvas, ctx, width, height, orientation) {
|
|
115
|
-
switch (orientation) {
|
|
116
|
-
case 5:
|
|
117
|
-
case 6:
|
|
118
|
-
case 7:
|
|
119
|
-
case 8:
|
|
120
|
-
canvas.width = height;
|
|
121
|
-
canvas.height = width;
|
|
122
|
-
break;
|
|
123
|
-
default:
|
|
124
|
-
canvas.width = width;
|
|
125
|
-
canvas.height = height;
|
|
126
|
-
}
|
|
127
|
-
switch (orientation) {
|
|
128
|
-
case 2:
|
|
129
|
-
ctx.translate(width, 0);
|
|
130
|
-
ctx.scale(-1, 1);
|
|
131
|
-
break;
|
|
132
|
-
case 3:
|
|
133
|
-
ctx.translate(width, height);
|
|
134
|
-
ctx.rotate(Math.PI);
|
|
135
|
-
break;
|
|
136
|
-
case 4:
|
|
137
|
-
ctx.translate(0, height);
|
|
138
|
-
ctx.scale(1, -1);
|
|
139
|
-
break;
|
|
140
|
-
case 5:
|
|
141
|
-
ctx.rotate(0.5 * Math.PI);
|
|
142
|
-
ctx.scale(1, -1);
|
|
143
|
-
break;
|
|
144
|
-
case 6:
|
|
145
|
-
ctx.rotate(0.5 * Math.PI);
|
|
146
|
-
ctx.translate(0, -height);
|
|
147
|
-
break;
|
|
148
|
-
case 7:
|
|
149
|
-
ctx.rotate(0.5 * Math.PI);
|
|
150
|
-
ctx.translate(width, -height);
|
|
151
|
-
ctx.scale(-1, 1);
|
|
152
|
-
break;
|
|
153
|
-
case 8:
|
|
154
|
-
ctx.rotate(-0.5 * Math.PI);
|
|
155
|
-
ctx.translate(-width, 0);
|
|
156
|
-
break;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
var URL = window.URL && window.URL.createObjectURL ? window.URL : window.webkitURL && window.webkitURL.createObjectURL ? window.webkitURL : null;
|
|
160
|
-
|
|
161
|
-
// -------------------------
|
|
162
|
-
// MegaPixImage class
|
|
163
|
-
// -------------------------
|
|
164
|
-
function MegaPixImage(srcImage) {
|
|
165
|
-
if (window.Blob && srcImage instanceof Blob) {
|
|
166
|
-
if (!URL) {
|
|
167
|
-
throw Error("No createObjectURL function found");
|
|
168
|
-
}
|
|
169
|
-
var img = new Image();
|
|
170
|
-
img.src = URL.createObjectURL(srcImage);
|
|
171
|
-
this.blob = srcImage;
|
|
172
|
-
srcImage = img;
|
|
173
|
-
}
|
|
174
|
-
if (!srcImage.naturalWidth && !srcImage.naturalHeight) {
|
|
175
|
-
var _this = this;
|
|
176
|
-
srcImage.onload = srcImage.onerror = function () {
|
|
177
|
-
var listeners = _this.imageLoadListeners;
|
|
178
|
-
if (listeners) {
|
|
179
|
-
_this.imageLoadListeners = null;
|
|
180
|
-
for (var i = 0; i < listeners.length; i++) {
|
|
181
|
-
listeners[i]();
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
this.imageLoadListeners = [];
|
|
186
|
-
}
|
|
187
|
-
this.srcImage = srcImage;
|
|
188
|
-
}
|
|
189
|
-
MegaPixImage.prototype.render = function (target, options, callback) {
|
|
190
|
-
if (this.imageLoadListeners) {
|
|
191
|
-
var _this = this;
|
|
192
|
-
this.imageLoadListeners.push(function () {
|
|
193
|
-
_this.render(target, options, callback);
|
|
194
|
-
});
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
options = options || {};
|
|
198
|
-
var imgWidth = this.srcImage.naturalWidth,
|
|
199
|
-
imgHeight = this.srcImage.naturalHeight,
|
|
200
|
-
width = options.width,
|
|
201
|
-
height = options.height,
|
|
202
|
-
maxWidth = options.maxWidth,
|
|
203
|
-
maxHeight = options.maxHeight,
|
|
204
|
-
doSquash = !this.blob || this.blob.type === 'image/jpeg';
|
|
205
|
-
if (width && !height) {
|
|
206
|
-
height = imgHeight * width / imgWidth << 0;
|
|
207
|
-
} else if (height && !width) {
|
|
208
|
-
width = imgWidth * height / imgHeight << 0;
|
|
209
|
-
} else {
|
|
210
|
-
width = imgWidth;
|
|
211
|
-
height = imgHeight;
|
|
212
|
-
}
|
|
213
|
-
if (maxWidth && width > maxWidth) {
|
|
214
|
-
width = maxWidth;
|
|
215
|
-
height = imgHeight * width / imgWidth << 0;
|
|
216
|
-
}
|
|
217
|
-
if (maxHeight && height > maxHeight) {
|
|
218
|
-
height = maxHeight;
|
|
219
|
-
width = imgWidth * height / imgHeight << 0;
|
|
220
|
-
}
|
|
221
|
-
var opt = {
|
|
222
|
-
width: width,
|
|
223
|
-
height: height
|
|
224
|
-
};
|
|
225
|
-
for (var k in options) opt[k] = options[k];
|
|
226
|
-
var tagName = target.tagName.toLowerCase();
|
|
227
|
-
if (tagName === 'img') {
|
|
228
|
-
target.src = renderImageToDataURL(this.srcImage, opt, doSquash);
|
|
229
|
-
} else if (tagName === 'canvas') {
|
|
230
|
-
renderImageToCanvas(this.srcImage, target, opt, doSquash);
|
|
231
|
-
}
|
|
232
|
-
if (typeof this.onrender === 'function') {
|
|
233
|
-
this.onrender(target);
|
|
234
|
-
}
|
|
235
|
-
if (callback) {
|
|
236
|
-
callback();
|
|
237
|
-
}
|
|
238
|
-
if (this.blob) {
|
|
239
|
-
this.blob = null;
|
|
240
|
-
URL.revokeObjectURL(this.srcImage.src);
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
// -------------------------
|
|
245
|
-
// Export as ESM default
|
|
246
|
-
// -------------------------
|
|
247
|
-
return MegaPixImage;
|
|
248
|
-
});
|
|
249
|
-
|
|
250
|
-
/***/ },
|
|
251
|
-
|
|
252
14
|
/***/ 49
|
|
253
15
|
(module) {
|
|
254
16
|
|
|
@@ -4281,26 +4043,6 @@ ___CSS_LOADER_EXPORT___.push([module.id, `.dpzvc-rater-star {
|
|
|
4281
4043
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
4282
4044
|
|
|
4283
4045
|
|
|
4284
|
-
/***/ },
|
|
4285
|
-
|
|
4286
|
-
/***/ 284
|
|
4287
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
4288
|
-
|
|
4289
|
-
"use strict";
|
|
4290
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4291
|
-
/* harmony export */ A: () => (/* binding */ _typeof)
|
|
4292
|
-
/* harmony export */ });
|
|
4293
|
-
function _typeof(o) {
|
|
4294
|
-
"@babel/helpers - typeof";
|
|
4295
|
-
|
|
4296
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
4297
|
-
return typeof o;
|
|
4298
|
-
} : function (o) {
|
|
4299
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
4300
|
-
}, _typeof(o);
|
|
4301
|
-
}
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
4046
|
/***/ },
|
|
4305
4047
|
|
|
4306
4048
|
/***/ 314
|
|
@@ -5508,7 +5250,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `
|
|
|
5508
5250
|
justify-content: center;
|
|
5509
5251
|
flex-direction: column;
|
|
5510
5252
|
}
|
|
5511
|
-
`, "",{"version":3,"sources":["webpack://./checkbox-group.vue"],"names":[],"mappings":";AA4EA;IACA,aAAA;IACA,uBAAA;IACA,sBAAA;AACA","sourcesContent":["<template>\n <div :class=\"['dpzvc-checkBoxGroup',vertical?'dpzvc-checkBoxGroup-vertical':'']\" >\n <slot></slot>\n </div>\n</template>\n\n<script>\n\n import {findComponentsDownward} from '../../utils/util'\n import Emitter from '../../mixin/emitter'\n export default {\n name:'checkBoxGroup',\n mixins:[Emitter],\n props:{\n value:{\n type:Array,\n default:()=>[]\n },\n single:{\n type:Boolean,\n default:false\n },\n vertical:{\n type:Boolean,\n default:false\n }\n\n },\n data(){\n return {\n currentValue:this.value,\n childrens:[]\n }\n },\n methods:{\n change(data){\n console.log(data)\n this.currentValue = data;\n this.$emit('input', data);\n this.$emit('on-change',data);\n this.dispatch('on-form-change',data)\n },\n updateModel(){\n let model = this.value;\n this.childrens = findComponentsDownward(this,'checkBox');\n if(this.childrens) {\n this.childrens.forEach((child)=>{\n\n child.model = model;\n child.currentValue = model.indexOf(child.label) >= 0;\n child.isGroup = true;\n })\n }\n\n }\n },\n mounted(){\n\n this.updateModel()\n },\n watch:{\n value(){\n this.updateModel()\n }\n }\n }\n</script>\n\n\n<style scoped>\n .dpzvc-checkBoxGroup-vertical {\n display: flex;\n justify-content: center;\n flex-direction: column;\n }\n</style>"],"sourceRoot":""}]);
|
|
5253
|
+
`, "",{"version":3,"sources":["webpack://./src/components/checkBox/checkbox-group.vue"],"names":[],"mappings":";AA4EA;IACA,aAAA;IACA,uBAAA;IACA,sBAAA;AACA","sourcesContent":["<template>\n <div :class=\"['dpzvc-checkBoxGroup',vertical?'dpzvc-checkBoxGroup-vertical':'']\" >\n <slot></slot>\n </div>\n</template>\n\n<script>\n\n import {findComponentsDownward} from '../../utils/util'\n import Emitter from '../../mixin/emitter'\n export default {\n name:'checkBoxGroup',\n mixins:[Emitter],\n props:{\n value:{\n type:Array,\n default:()=>[]\n },\n single:{\n type:Boolean,\n default:false\n },\n vertical:{\n type:Boolean,\n default:false\n }\n\n },\n data(){\n return {\n currentValue:this.value,\n childrens:[]\n }\n },\n methods:{\n change(data){\n console.log(data)\n this.currentValue = data;\n this.$emit('input', data);\n this.$emit('on-change',data);\n this.dispatch('on-form-change',data)\n },\n updateModel(){\n let model = this.value;\n this.childrens = findComponentsDownward(this,'checkBox');\n if(this.childrens) {\n this.childrens.forEach((child)=>{\n\n child.model = model;\n child.currentValue = model.indexOf(child.label) >= 0;\n child.isGroup = true;\n })\n }\n\n }\n },\n mounted(){\n\n this.updateModel()\n },\n watch:{\n value(){\n this.updateModel()\n }\n }\n }\n</script>\n\n\n<style scoped>\n .dpzvc-checkBoxGroup-vertical {\n display: flex;\n justify-content: center;\n flex-direction: column;\n }\n</style>"],"sourceRoot":""}]);
|
|
5512
5254
|
// Exports
|
|
5513
5255
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
5514
5256
|
|
|
@@ -5804,7 +5546,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `
|
|
|
5804
5546
|
justify-content: center;
|
|
5805
5547
|
flex-direction: column;
|
|
5806
5548
|
}
|
|
5807
|
-
`, "",{"version":3,"sources":["webpack://./radiobox-group.vue"],"names":[],"mappings":";AA0EA;IACA,aAAA;IACA,uBAAA;IACA,sBAAA;AACA","sourcesContent":["<template>\n <div :class=\"classes\">\n <slot></slot>\n </div>\n</template>\n\n<script>\n\n import {findComponentsDownward} from \"../../utils/util\"\n const prefixCls = 'dpzvc-radioBoxGroup'\n export default {\n name:'radioBoxGroup',\n props:{\n value:{\n type:[String,Boolean,Number]\n },\n vertical:{\n type:Boolean,\n default:false\n }\n },\n mounted(){\n this.updateModel()\n },\n data(){\n return {\n currentValue:this.value,\n children:findComponentsDownward(this,'radioBox')\n }\n },\n computed:{\n classes(){\n return [\n `${prefixCls}`,\n {\n [`${prefixCls}-vertical`]:this.vertical\n }\n ]\n\n }\n },\n methods:{\n change(data){\n this.currentValue = data.value;\n this.updateModel();\n this.$emit('input',data.value);\n this.$emit('on-change',data.value);\n this.$emit('on-form-change',data.value)\n },\n updateModel(){\n let value = this.value;\n this.children = findComponentsDownward(this,'radioBox');\n this.children.forEach((child)=>{\n child.model = value == child.label;\n child.isGroup = true;\n\n })\n }\n },\n watch:{\n value(){\n this.updateModel();\n },\n }\n }\n</script>\n\n<style scoped >\n .dpzvc-radioBoxGroup-vertical {\n display: flex;\n justify-content: center;\n flex-direction: column;\n }\n</style>"],"sourceRoot":""}]);
|
|
5549
|
+
`, "",{"version":3,"sources":["webpack://./src/components/radioBox/radiobox-group.vue"],"names":[],"mappings":";AA0EA;IACA,aAAA;IACA,uBAAA;IACA,sBAAA;AACA","sourcesContent":["<template>\n <div :class=\"classes\">\n <slot></slot>\n </div>\n</template>\n\n<script>\n\n import {findComponentsDownward} from \"../../utils/util\"\n const prefixCls = 'dpzvc-radioBoxGroup'\n export default {\n name:'radioBoxGroup',\n props:{\n value:{\n type:[String,Boolean,Number]\n },\n vertical:{\n type:Boolean,\n default:false\n }\n },\n mounted(){\n this.updateModel()\n },\n data(){\n return {\n currentValue:this.value,\n children:findComponentsDownward(this,'radioBox')\n }\n },\n computed:{\n classes(){\n return [\n `${prefixCls}`,\n {\n [`${prefixCls}-vertical`]:this.vertical\n }\n ]\n\n }\n },\n methods:{\n change(data){\n this.currentValue = data.value;\n this.updateModel();\n this.$emit('input',data.value);\n this.$emit('on-change',data.value);\n this.$emit('on-form-change',data.value)\n },\n updateModel(){\n let value = this.value;\n this.children = findComponentsDownward(this,'radioBox');\n this.children.forEach((child)=>{\n child.model = value == child.label;\n child.isGroup = true;\n\n })\n }\n },\n watch:{\n value(){\n this.updateModel();\n },\n }\n }\n</script>\n\n<style scoped >\n .dpzvc-radioBoxGroup-vertical {\n display: flex;\n justify-content: center;\n flex-direction: column;\n }\n</style>"],"sourceRoot":""}]);
|
|
5808
5550
|
// Exports
|
|
5809
5551
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
5810
5552
|
|
|
@@ -5874,26 +5616,18 @@ var update = add("7918d0f5", content, true, {});
|
|
|
5874
5616
|
/******/ // Create a new module (and put it into the cache)
|
|
5875
5617
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
5876
5618
|
/******/ id: moduleId,
|
|
5877
|
-
/******/ loaded
|
|
5619
|
+
/******/ // no module.loaded needed
|
|
5878
5620
|
/******/ exports: {}
|
|
5879
5621
|
/******/ };
|
|
5880
5622
|
/******/
|
|
5881
5623
|
/******/ // Execute the module function
|
|
5882
5624
|
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
5883
5625
|
/******/
|
|
5884
|
-
/******/ // Flag the module as loaded
|
|
5885
|
-
/******/ module.loaded = true;
|
|
5886
|
-
/******/
|
|
5887
5626
|
/******/ // Return the exports of the module
|
|
5888
5627
|
/******/ return module.exports;
|
|
5889
5628
|
/******/ }
|
|
5890
5629
|
/******/
|
|
5891
5630
|
/************************************************************************/
|
|
5892
|
-
/******/ /* webpack/runtime/amd options */
|
|
5893
|
-
/******/ (() => {
|
|
5894
|
-
/******/ __webpack_require__.amdO = {};
|
|
5895
|
-
/******/ })();
|
|
5896
|
-
/******/
|
|
5897
5631
|
/******/ /* webpack/runtime/compat get default export */
|
|
5898
5632
|
/******/ (() => {
|
|
5899
5633
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
@@ -5918,21 +5652,6 @@ var update = add("7918d0f5", content, true, {});
|
|
|
5918
5652
|
/******/ };
|
|
5919
5653
|
/******/ })();
|
|
5920
5654
|
/******/
|
|
5921
|
-
/******/ /* webpack/runtime/harmony module decorator */
|
|
5922
|
-
/******/ (() => {
|
|
5923
|
-
/******/ __webpack_require__.hmd = (module) => {
|
|
5924
|
-
/******/ module = Object.create(module);
|
|
5925
|
-
/******/ if (!module.children) module.children = [];
|
|
5926
|
-
/******/ Object.defineProperty(module, 'exports', {
|
|
5927
|
-
/******/ enumerable: true,
|
|
5928
|
-
/******/ set: () => {
|
|
5929
|
-
/******/ throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);
|
|
5930
|
-
/******/ }
|
|
5931
|
-
/******/ });
|
|
5932
|
-
/******/ return module;
|
|
5933
|
-
/******/ };
|
|
5934
|
-
/******/ })();
|
|
5935
|
-
/******/
|
|
5936
5655
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
5937
5656
|
/******/ (() => {
|
|
5938
5657
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
@@ -5969,7 +5688,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
5969
5688
|
Indicator: () => (/* reexport */ components_Indicator),
|
|
5970
5689
|
LoadMore: () => (/* reexport */ loadMore),
|
|
5971
5690
|
Message: () => (/* reexport */ components_message),
|
|
5972
|
-
Modal: () => (/* reexport */
|
|
5691
|
+
Modal: () => (/* reexport */ components_modal),
|
|
5973
5692
|
Picker: () => (/* reexport */ components_picker),
|
|
5974
5693
|
Popup: () => (/* reexport */ components_popup),
|
|
5975
5694
|
Progress: () => (/* reexport */ components_progress),
|
|
@@ -6026,16 +5745,25 @@ var render = function render() {
|
|
|
6026
5745
|
};
|
|
6027
5746
|
var staticRenderFns = [];
|
|
6028
5747
|
|
|
6029
|
-
|
|
6030
|
-
|
|
5748
|
+
;// ./node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
5749
|
+
function _typeof(o) {
|
|
5750
|
+
"@babel/helpers - typeof";
|
|
5751
|
+
|
|
5752
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
5753
|
+
return typeof o;
|
|
5754
|
+
} : function (o) {
|
|
5755
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
5756
|
+
}, _typeof(o);
|
|
5757
|
+
}
|
|
5758
|
+
|
|
6031
5759
|
;// ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
6032
5760
|
|
|
6033
5761
|
function toPrimitive(t, r) {
|
|
6034
|
-
if ("object" != (
|
|
5762
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
6035
5763
|
var e = t[Symbol.toPrimitive];
|
|
6036
5764
|
if (void 0 !== e) {
|
|
6037
5765
|
var i = e.call(t, r || "default");
|
|
6038
|
-
if ("object" != (
|
|
5766
|
+
if ("object" != _typeof(i)) return i;
|
|
6039
5767
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
6040
5768
|
}
|
|
6041
5769
|
return ("string" === r ? String : Number)(t);
|
|
@@ -6046,7 +5774,7 @@ function toPrimitive(t, r) {
|
|
|
6046
5774
|
|
|
6047
5775
|
function toPropertyKey(t) {
|
|
6048
5776
|
var i = toPrimitive(t, "string");
|
|
6049
|
-
return "symbol" == (
|
|
5777
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
6050
5778
|
}
|
|
6051
5779
|
|
|
6052
5780
|
;// ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
@@ -8072,57 +7800,96 @@ var modal_component = normalizeComponent(
|
|
|
8072
7800
|
|
|
8073
7801
|
)
|
|
8074
7802
|
|
|
8075
|
-
/* harmony default export */ const
|
|
7803
|
+
/* harmony default export */ const modal = (modal_component.exports);
|
|
8076
7804
|
;// ./src/components/modal/confirm.js
|
|
8077
7805
|
/**
|
|
8078
|
-
*
|
|
7806
|
+
* confirm.js - 适配 Vue 2.7 runtime-only
|
|
8079
7807
|
*/
|
|
8080
7808
|
|
|
8081
7809
|
|
|
8082
7810
|
|
|
8083
7811
|
|
|
8084
7812
|
var confirm_prefixCls = 'dpzvc-modal';
|
|
8085
|
-
|
|
8086
|
-
var
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
props += ' :' + camelcaseToHyphen(prop) + '=' + prop;
|
|
8090
|
-
});
|
|
8091
|
-
var div = document.createElement('div');
|
|
8092
|
-
document.body.appendChild(div);
|
|
8093
|
-
var modal = new (external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default())({
|
|
8094
|
-
el: div,
|
|
8095
|
-
template: "<Modal ".concat(props, " v-model=\"visible\" :width=\"width\" >\n <div class=\"").concat(confirm_prefixCls, "-header-inner ellipse-fir\" v-html=\"title\" slot=\"header\"></div>\n <div class=\"").concat(confirm_prefixCls, "-body-inner\" v-html=\"body\" slot=\"body\"></div>\n <template slot=\"footer\">\n <v-button type=\"primary\" :radius=\"false\" @click=\"cancle\" v-if=\"showCancle\">{{cancleText}}</v-button>\n <v-button type=\"normal\" :radius=\"false\" @click=\"ok\" :loading=\"buttonLoading\">{{okText}}</v-button>\n </template>\n </Modal>"),
|
|
7813
|
+
modal.newInstance = function () {
|
|
7814
|
+
var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7815
|
+
// 创建一个新的 Vue 构造函数
|
|
7816
|
+
var ModalConstructor = external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default().extend({
|
|
8096
7817
|
components: {
|
|
8097
|
-
Modal:
|
|
7818
|
+
Modal: modal,
|
|
8098
7819
|
VButton: components_button
|
|
8099
7820
|
},
|
|
8100
|
-
data:
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
|
|
8104
|
-
|
|
8105
|
-
|
|
8106
|
-
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
7821
|
+
data: function data() {
|
|
7822
|
+
return Object.assign({
|
|
7823
|
+
visible: false,
|
|
7824
|
+
width: '70%',
|
|
7825
|
+
body: '',
|
|
7826
|
+
title: '',
|
|
7827
|
+
okText: '确定',
|
|
7828
|
+
cancleText: '取消',
|
|
7829
|
+
loading: false,
|
|
7830
|
+
buttonLoading: false,
|
|
7831
|
+
showCancle: true,
|
|
7832
|
+
showHead: true,
|
|
7833
|
+
onOk: function onOk() {},
|
|
7834
|
+
onCancle: function onCancle() {},
|
|
7835
|
+
onRemove: function onRemove() {}
|
|
7836
|
+
}, properties);
|
|
7837
|
+
},
|
|
7838
|
+
render: function render(h) {
|
|
7839
|
+
var footer = [this.showCancle ? h('v-button', {
|
|
7840
|
+
props: {
|
|
7841
|
+
type: 'primary',
|
|
7842
|
+
radius: false
|
|
7843
|
+
},
|
|
7844
|
+
on: {
|
|
7845
|
+
click: this.cancle
|
|
7846
|
+
}
|
|
7847
|
+
}, this.cancleText) : null, h('v-button', {
|
|
7848
|
+
props: {
|
|
7849
|
+
type: 'normal',
|
|
7850
|
+
radius: false,
|
|
7851
|
+
loading: this.buttonLoading
|
|
7852
|
+
},
|
|
7853
|
+
on: {
|
|
7854
|
+
click: this.ok
|
|
7855
|
+
}
|
|
7856
|
+
}, this.okText)];
|
|
7857
|
+
return h(modal, {
|
|
7858
|
+
props: {
|
|
7859
|
+
value: this.visible,
|
|
7860
|
+
width: this.width,
|
|
7861
|
+
showHead: this.showHead,
|
|
7862
|
+
footerHide: false
|
|
7863
|
+
},
|
|
7864
|
+
on: {
|
|
7865
|
+
'on-ok': this.ok,
|
|
7866
|
+
'on-cancle': this.cancle
|
|
7867
|
+
}
|
|
7868
|
+
}, [h('div', {
|
|
7869
|
+
slot: 'header',
|
|
7870
|
+
domProps: {
|
|
7871
|
+
innerHTML: this.title
|
|
7872
|
+
},
|
|
7873
|
+
"class": "".concat(confirm_prefixCls, "-header-inner ellipse-fir")
|
|
7874
|
+
}), h('div', {
|
|
7875
|
+
slot: 'body',
|
|
7876
|
+
domProps: {
|
|
7877
|
+
innerHTML: this.body
|
|
7878
|
+
},
|
|
7879
|
+
"class": "".concat(confirm_prefixCls, "-body-inner")
|
|
7880
|
+
}), h('template', {
|
|
7881
|
+
slot: 'footer'
|
|
7882
|
+
}, footer)]);
|
|
7883
|
+
},
|
|
8115
7884
|
methods: {
|
|
8116
7885
|
cancle: function cancle() {
|
|
8117
|
-
this
|
|
7886
|
+
this.visible = false;
|
|
8118
7887
|
this.onCancle();
|
|
8119
7888
|
this.remove();
|
|
8120
7889
|
},
|
|
8121
7890
|
ok: function ok() {
|
|
8122
|
-
console.log('asd');
|
|
8123
7891
|
if (this.loading) {
|
|
8124
7892
|
this.buttonLoading = true;
|
|
8125
|
-
this.$children[0].buttonLoading = true;
|
|
8126
7893
|
} else {
|
|
8127
7894
|
this.visible = false;
|
|
8128
7895
|
this.remove();
|
|
@@ -8131,73 +7898,42 @@ modal_modal.newInstance = function (properties) {
|
|
|
8131
7898
|
},
|
|
8132
7899
|
remove: function remove() {
|
|
8133
7900
|
var _this = this;
|
|
8134
|
-
this
|
|
7901
|
+
this.visible = false;
|
|
8135
7902
|
setTimeout(function () {
|
|
8136
|
-
_this.destroy();
|
|
7903
|
+
return _this.destroy();
|
|
8137
7904
|
}, 300);
|
|
8138
7905
|
},
|
|
8139
7906
|
destroy: function destroy() {
|
|
8140
7907
|
this.$destroy();
|
|
8141
|
-
|
|
7908
|
+
if (this.$el && this.$el.parentNode) {
|
|
7909
|
+
this.$el.parentNode.removeChild(this.$el);
|
|
7910
|
+
}
|
|
8142
7911
|
this.onRemove();
|
|
8143
7912
|
}
|
|
8144
7913
|
}
|
|
8145
|
-
})
|
|
7914
|
+
});
|
|
7915
|
+
|
|
7916
|
+
// 实例化并挂载到 DOM
|
|
7917
|
+
var div = document.createElement('div');
|
|
7918
|
+
document.body.appendChild(div);
|
|
7919
|
+
var instance = new ModalConstructor().$mount(div);
|
|
8146
7920
|
return {
|
|
8147
|
-
show: function show(
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
|
|
8152
|
-
|
|
8153
|
-
// modal.$parent.title = props.title
|
|
8154
|
-
// }
|
|
8155
|
-
//
|
|
8156
|
-
// if ('showHead' in props) {
|
|
8157
|
-
// modal.$parent.showHead = props.showHead
|
|
8158
|
-
// }
|
|
8159
|
-
//
|
|
8160
|
-
// if ('okText' in props) {
|
|
8161
|
-
// modal.$parent.okText = props.okText
|
|
8162
|
-
// }
|
|
8163
|
-
//
|
|
8164
|
-
// if ('cancleText' in props) {
|
|
8165
|
-
// modal.$parent.cancleText = props.cancleText
|
|
8166
|
-
// }
|
|
8167
|
-
//
|
|
8168
|
-
//
|
|
8169
|
-
// if ('onCancle' in props) {
|
|
8170
|
-
// modal.$parent.onCancle = props.onCancle
|
|
8171
|
-
// }
|
|
8172
|
-
//
|
|
8173
|
-
// if ('onOk' in props) {
|
|
8174
|
-
// modal.$parent.onOk = props.onOk
|
|
8175
|
-
// }
|
|
8176
|
-
//
|
|
8177
|
-
// if ('loading' in props) {
|
|
8178
|
-
// modal.$parent.loading = props.loading
|
|
8179
|
-
// }
|
|
8180
|
-
//
|
|
8181
|
-
// if ('body' in props) {
|
|
8182
|
-
// modal.$parent.body = props.body
|
|
8183
|
-
// }
|
|
8184
|
-
|
|
8185
|
-
Object.keys(props).forEach(function (item) {
|
|
8186
|
-
modal.$parent[item] = props[item];
|
|
7921
|
+
show: function show() {
|
|
7922
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7923
|
+
Object.keys(props).forEach(function (key) {
|
|
7924
|
+
if (key in instance) {
|
|
7925
|
+
instance[key] = props[key];
|
|
7926
|
+
}
|
|
8187
7927
|
});
|
|
8188
|
-
|
|
8189
|
-
modal.$parent.onRemove = props.onRemove;
|
|
8190
|
-
modal.visible = true;
|
|
7928
|
+
instance.visible = true;
|
|
8191
7929
|
},
|
|
8192
7930
|
remove: function remove() {
|
|
8193
|
-
|
|
8194
|
-
modal.$parent.buttonLoading = false;
|
|
8195
|
-
modal.$parent.remove();
|
|
7931
|
+
instance.remove();
|
|
8196
7932
|
},
|
|
8197
|
-
component:
|
|
7933
|
+
component: instance
|
|
8198
7934
|
};
|
|
8199
7935
|
};
|
|
8200
|
-
/* harmony default export */ const modal_confirm = (
|
|
7936
|
+
/* harmony default export */ const modal_confirm = (modal);
|
|
8201
7937
|
;// ./src/components/modal/index.js
|
|
8202
7938
|
/**
|
|
8203
7939
|
* Created by admin on 2017/3/30.
|
|
@@ -8240,7 +7976,7 @@ modal_confirm.remove = function () {
|
|
|
8240
7976
|
var instance = getModalInstance();
|
|
8241
7977
|
instance.remove();
|
|
8242
7978
|
};
|
|
8243
|
-
/* harmony default export */ const
|
|
7979
|
+
/* harmony default export */ const components_modal = (modal_confirm);
|
|
8244
7980
|
;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/picker/picker.vue?vue&type=template&id=c9eb303a
|
|
8245
7981
|
var pickervue_type_template_id_c9eb303a_render = function render() {
|
|
8246
7982
|
var _vm = this,
|
|
@@ -10734,7 +10470,7 @@ var textBar_component = normalizeComponent(
|
|
|
10734
10470
|
};
|
|
10735
10471
|
},
|
|
10736
10472
|
components: {
|
|
10737
|
-
Modal:
|
|
10473
|
+
Modal: modal,
|
|
10738
10474
|
TextBar: textBar,
|
|
10739
10475
|
VButton: button_button
|
|
10740
10476
|
},
|
|
@@ -10809,31 +10545,28 @@ var prompt_component = normalizeComponent(
|
|
|
10809
10545
|
|
|
10810
10546
|
/* harmony default export */ const prompt_prompt = (prompt_component.exports);
|
|
10811
10547
|
;// ./src/components/prompt/confirm.js
|
|
10548
|
+
|
|
10549
|
+
function confirm_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10550
|
+
function confirm_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? confirm_ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : confirm_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10812
10551
|
/**
|
|
10813
|
-
* Created by admin on
|
|
10552
|
+
* Created by admin on 2025/12/10
|
|
10553
|
+
* Rewritten for Vue 2.7 + Vue CLI (runtime-only)
|
|
10814
10554
|
*/
|
|
10815
10555
|
|
|
10816
10556
|
|
|
10817
10557
|
|
|
10818
|
-
|
|
10819
|
-
|
|
10820
|
-
|
|
10821
|
-
var
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
el: div,
|
|
10829
|
-
template: "<Prompt ".concat(props, " v-model=\"visible\" \n :width=\"width\" \n :text=\"text\" \n :title=\"title\" \n :ok-text=\"okText\" \n :cancle-text=\"cancleText\" \n :loading=\"loading\" \n :spec=\"spec\" \n :message=\"message\" \n :validator=\"validator\"\n :on-ok=\"onOk\" \n :on-cancle=\"onCancle\"> </Prompt>"),
|
|
10830
|
-
components: {
|
|
10831
|
-
Prompt: prompt_prompt
|
|
10832
|
-
},
|
|
10833
|
-
data: Object.assign(_props, {
|
|
10558
|
+
prompt_prompt.newInstance = function () {
|
|
10559
|
+
var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
10560
|
+
// 1. 创建构造器
|
|
10561
|
+
var PromptConstructor = external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default().extend(prompt_prompt);
|
|
10562
|
+
|
|
10563
|
+
// 2. 初始化 props(等价你之前 data + v-model)
|
|
10564
|
+
var instance = new PromptConstructor({
|
|
10565
|
+
propsData: confirm_objectSpread(confirm_objectSpread({}, properties), {}, {
|
|
10566
|
+
// 默认值(保持你原来的语义)
|
|
10567
|
+
visible: false,
|
|
10834
10568
|
text: '',
|
|
10835
10569
|
placeholderText: '请输入',
|
|
10836
|
-
visible: false,
|
|
10837
10570
|
width: '70%',
|
|
10838
10571
|
title: '',
|
|
10839
10572
|
okText: '确定',
|
|
@@ -10844,91 +10577,43 @@ prompt_prompt.newInstance = function (properties) {
|
|
|
10844
10577
|
message: '',
|
|
10845
10578
|
validator: null,
|
|
10846
10579
|
onOk: function onOk() {},
|
|
10847
|
-
onCancle: function onCancle(
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
},
|
|
10865
|
-
remove: function remove() {
|
|
10866
|
-
var _this = this;
|
|
10867
|
-
this.$children[0].visible = false;
|
|
10868
|
-
setTimeout(function () {
|
|
10869
|
-
_this.destroy();
|
|
10870
|
-
}, 300);
|
|
10871
|
-
},
|
|
10872
|
-
destroy: function destroy() {
|
|
10873
|
-
this.$destroy();
|
|
10874
|
-
document.body.removeChild(this.$el);
|
|
10875
|
-
this.onRemove();
|
|
10876
|
-
},
|
|
10877
|
-
mounted: function mounted() {}
|
|
10878
|
-
}
|
|
10879
|
-
}).$children[0];
|
|
10580
|
+
onCancle: function onCancle() {}
|
|
10581
|
+
})
|
|
10582
|
+
});
|
|
10583
|
+
|
|
10584
|
+
// 3. 挂载到 DOM
|
|
10585
|
+
instance.$mount();
|
|
10586
|
+
document.body.appendChild(instance.$el);
|
|
10587
|
+
|
|
10588
|
+
// 4. 移除逻辑(统一)
|
|
10589
|
+
var destroy = function destroy() {
|
|
10590
|
+
instance.visible = false;
|
|
10591
|
+
setTimeout(function () {
|
|
10592
|
+
instance.$destroy();
|
|
10593
|
+
instance.$el && document.body.removeChild(instance.$el);
|
|
10594
|
+
instance.onRemove && instance.onRemove();
|
|
10595
|
+
}, 300);
|
|
10596
|
+
};
|
|
10880
10597
|
return {
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
}
|
|
10891
|
-
if ('spec' in props) {
|
|
10892
|
-
propmt.$parent.spec = props.spec;
|
|
10893
|
-
}
|
|
10894
|
-
if ('title' in props) {
|
|
10895
|
-
propmt.$parent.title = props.title;
|
|
10896
|
-
}
|
|
10897
|
-
if ('placeholderText' in props) {
|
|
10898
|
-
propmt.$parent.placeholderText = props.placeholderText;
|
|
10899
|
-
}
|
|
10900
|
-
if ('content' in props) {
|
|
10901
|
-
propmt.$parent.body = props.body;
|
|
10902
|
-
}
|
|
10903
|
-
if ('okText' in props) {
|
|
10904
|
-
propmt.$parent.okText = props.okText;
|
|
10905
|
-
}
|
|
10906
|
-
if ('cancleText' in props) {
|
|
10907
|
-
propmt.$parent.cancleText = props.cancleText;
|
|
10908
|
-
}
|
|
10909
|
-
if ('onCancle' in props) {
|
|
10910
|
-
propmt.$parent.onCancle = props.onCancle;
|
|
10911
|
-
}
|
|
10912
|
-
if ('onOk' in props) {
|
|
10913
|
-
propmt.$parent.onOk = props.onOk;
|
|
10914
|
-
}
|
|
10915
|
-
if ('loading' in props) {
|
|
10916
|
-
propmt.$parent.loading = props.loading;
|
|
10917
|
-
}
|
|
10918
|
-
if ('message' in props) {
|
|
10919
|
-
propmt.$parent.message = props.message;
|
|
10920
|
-
}
|
|
10921
|
-
if ('validator' in props) {
|
|
10922
|
-
propmt.$parent.validator = props.validator;
|
|
10923
|
-
}
|
|
10924
|
-
console.log(propmt.$parent);
|
|
10598
|
+
/**
|
|
10599
|
+
* 显示 Prompt
|
|
10600
|
+
*/
|
|
10601
|
+
show: function show() {
|
|
10602
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
10603
|
+
Object.keys(props).forEach(function (key) {
|
|
10604
|
+
instance[key] = props[key];
|
|
10605
|
+
});
|
|
10606
|
+
instance.visible = true;
|
|
10925
10607
|
},
|
|
10608
|
+
/**
|
|
10609
|
+
* 关闭 Prompt
|
|
10610
|
+
*/
|
|
10926
10611
|
remove: function remove() {
|
|
10927
|
-
|
|
10928
|
-
|
|
10929
|
-
|
|
10612
|
+
instance.visible = false;
|
|
10613
|
+
instance.buttonLoading = false;
|
|
10614
|
+
destroy();
|
|
10930
10615
|
},
|
|
10931
|
-
component:
|
|
10616
|
+
component: instance
|
|
10932
10617
|
};
|
|
10933
10618
|
};
|
|
10934
10619
|
/* harmony default export */ const prompt_confirm = (prompt_prompt);
|
|
@@ -11496,8 +11181,8 @@ var Number_component = normalizeComponent(
|
|
|
11496
11181
|
|
|
11497
11182
|
textBar.Number = Text_Number;
|
|
11498
11183
|
/* harmony default export */ const Text = (textBar);
|
|
11499
|
-
;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/upload/upload.vue?vue&type=template&id=
|
|
11500
|
-
var
|
|
11184
|
+
;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/upload/upload.vue?vue&type=template&id=23492f0b
|
|
11185
|
+
var uploadvue_type_template_id_23492f0b_render = function render() {
|
|
11501
11186
|
var _vm = this,
|
|
11502
11187
|
_c = _vm._self._c;
|
|
11503
11188
|
return _c('div', {
|
|
@@ -11519,13 +11204,238 @@ var uploadvue_type_template_id_b2513a8a_render = function render() {
|
|
|
11519
11204
|
}
|
|
11520
11205
|
})], 2);
|
|
11521
11206
|
};
|
|
11522
|
-
var
|
|
11207
|
+
var uploadvue_type_template_id_23492f0b_staticRenderFns = [];
|
|
11523
11208
|
|
|
11524
11209
|
// EXTERNAL MODULE: ./node_modules/exif-js/exif.js
|
|
11525
11210
|
var exif = __webpack_require__(335);
|
|
11526
11211
|
var exif_default = /*#__PURE__*/__webpack_require__.n(exif);
|
|
11527
|
-
|
|
11528
|
-
|
|
11212
|
+
;// ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
11213
|
+
function _classCallCheck(a, n) {
|
|
11214
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
11215
|
+
}
|
|
11216
|
+
|
|
11217
|
+
;// ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
11218
|
+
|
|
11219
|
+
function _defineProperties(e, r) {
|
|
11220
|
+
for (var t = 0; t < r.length; t++) {
|
|
11221
|
+
var o = r[t];
|
|
11222
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
|
|
11223
|
+
}
|
|
11224
|
+
}
|
|
11225
|
+
function _createClass(e, r, t) {
|
|
11226
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
11227
|
+
writable: !1
|
|
11228
|
+
}), e;
|
|
11229
|
+
}
|
|
11230
|
+
|
|
11231
|
+
;// ./src/lib/MegaPixImage.js
|
|
11232
|
+
|
|
11233
|
+
|
|
11234
|
+
|
|
11235
|
+
function MegaPixImage_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11236
|
+
function MegaPixImage_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? MegaPixImage_ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : MegaPixImage_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11237
|
+
// MegaPixImage.js
|
|
11238
|
+
// 将原先的 UMD/CommonJS 改为 ESM export default
|
|
11239
|
+
|
|
11240
|
+
// -------------------------
|
|
11241
|
+
// Helper functions
|
|
11242
|
+
// -------------------------
|
|
11243
|
+
function detectSubsampling(img) {
|
|
11244
|
+
var iw = img.naturalWidth,
|
|
11245
|
+
ih = img.naturalHeight;
|
|
11246
|
+
if (iw * ih > 1024 * 1024) {
|
|
11247
|
+
var canvas = document.createElement('canvas');
|
|
11248
|
+
canvas.width = canvas.height = 1;
|
|
11249
|
+
var ctx = canvas.getContext('2d');
|
|
11250
|
+
ctx.drawImage(img, -iw + 1, 0);
|
|
11251
|
+
return ctx.getImageData(0, 0, 1, 1).data[3] === 0;
|
|
11252
|
+
}
|
|
11253
|
+
return false;
|
|
11254
|
+
}
|
|
11255
|
+
function detectVerticalSquash(img, iw, ih) {
|
|
11256
|
+
var canvas = document.createElement('canvas');
|
|
11257
|
+
canvas.width = 1;
|
|
11258
|
+
canvas.height = ih;
|
|
11259
|
+
var ctx = canvas.getContext('2d');
|
|
11260
|
+
ctx.drawImage(img, 0, 0);
|
|
11261
|
+
var data = ctx.getImageData(0, 0, 1, ih).data;
|
|
11262
|
+
var sy = 0,
|
|
11263
|
+
ey = ih,
|
|
11264
|
+
py = ih;
|
|
11265
|
+
while (py > sy) {
|
|
11266
|
+
var alpha = data[(py - 1) * 4 + 3];
|
|
11267
|
+
if (alpha === 0) ey = py;else sy = py;
|
|
11268
|
+
py = ey + sy >> 1;
|
|
11269
|
+
}
|
|
11270
|
+
var ratio = py / ih;
|
|
11271
|
+
return ratio === 0 ? 1 : ratio;
|
|
11272
|
+
}
|
|
11273
|
+
function renderImageToDataURL(img, options, doSquash) {
|
|
11274
|
+
var canvas = document.createElement('canvas');
|
|
11275
|
+
renderImageToCanvas(img, canvas, options, doSquash);
|
|
11276
|
+
return canvas.toDataURL("image/jpeg", options.quality || 0.8);
|
|
11277
|
+
}
|
|
11278
|
+
function renderImageToCanvas(img, canvas, options, doSquash) {
|
|
11279
|
+
var iw = img.naturalWidth,
|
|
11280
|
+
ih = img.naturalHeight;
|
|
11281
|
+
if (!(iw + ih)) return;
|
|
11282
|
+
var width = options.width,
|
|
11283
|
+
height = options.height;
|
|
11284
|
+
var ctx = canvas.getContext('2d');
|
|
11285
|
+
ctx.save();
|
|
11286
|
+
transformCoordinate(canvas, ctx, width, height, options.orientation);
|
|
11287
|
+
var subsampled = detectSubsampling(img);
|
|
11288
|
+
if (subsampled) {
|
|
11289
|
+
iw /= 2;
|
|
11290
|
+
ih /= 2;
|
|
11291
|
+
}
|
|
11292
|
+
var d = 1024;
|
|
11293
|
+
var tmpCanvas = document.createElement('canvas');
|
|
11294
|
+
tmpCanvas.width = tmpCanvas.height = d;
|
|
11295
|
+
var tmpCtx = tmpCanvas.getContext('2d');
|
|
11296
|
+
var vertSquashRatio = doSquash ? detectVerticalSquash(img, iw, ih) : 1;
|
|
11297
|
+
var dw = Math.ceil(d * width / iw);
|
|
11298
|
+
var dh = Math.ceil(d * height / ih / vertSquashRatio);
|
|
11299
|
+
var sy = 0,
|
|
11300
|
+
dy = 0;
|
|
11301
|
+
while (sy < ih) {
|
|
11302
|
+
var sx = 0,
|
|
11303
|
+
dx = 0;
|
|
11304
|
+
while (sx < iw) {
|
|
11305
|
+
tmpCtx.clearRect(0, 0, d, d);
|
|
11306
|
+
tmpCtx.drawImage(img, -sx, -sy);
|
|
11307
|
+
ctx.drawImage(tmpCanvas, 0, 0, d, d, dx, dy, dw, dh);
|
|
11308
|
+
sx += d;
|
|
11309
|
+
dx += dw;
|
|
11310
|
+
}
|
|
11311
|
+
sy += d;
|
|
11312
|
+
dy += dh;
|
|
11313
|
+
}
|
|
11314
|
+
ctx.restore();
|
|
11315
|
+
}
|
|
11316
|
+
function transformCoordinate(canvas, ctx, width, height, orientation) {
|
|
11317
|
+
switch (orientation) {
|
|
11318
|
+
case 5:
|
|
11319
|
+
case 6:
|
|
11320
|
+
case 7:
|
|
11321
|
+
case 8:
|
|
11322
|
+
canvas.width = height;
|
|
11323
|
+
canvas.height = width;
|
|
11324
|
+
break;
|
|
11325
|
+
default:
|
|
11326
|
+
canvas.width = width;
|
|
11327
|
+
canvas.height = height;
|
|
11328
|
+
}
|
|
11329
|
+
switch (orientation) {
|
|
11330
|
+
case 2:
|
|
11331
|
+
ctx.translate(width, 0);
|
|
11332
|
+
ctx.scale(-1, 1);
|
|
11333
|
+
break;
|
|
11334
|
+
case 3:
|
|
11335
|
+
ctx.translate(width, height);
|
|
11336
|
+
ctx.rotate(Math.PI);
|
|
11337
|
+
break;
|
|
11338
|
+
case 4:
|
|
11339
|
+
ctx.translate(0, height);
|
|
11340
|
+
ctx.scale(1, -1);
|
|
11341
|
+
break;
|
|
11342
|
+
case 5:
|
|
11343
|
+
ctx.rotate(0.5 * Math.PI);
|
|
11344
|
+
ctx.scale(1, -1);
|
|
11345
|
+
break;
|
|
11346
|
+
case 6:
|
|
11347
|
+
ctx.rotate(0.5 * Math.PI);
|
|
11348
|
+
ctx.translate(0, -height);
|
|
11349
|
+
break;
|
|
11350
|
+
case 7:
|
|
11351
|
+
ctx.rotate(0.5 * Math.PI);
|
|
11352
|
+
ctx.translate(width, -height);
|
|
11353
|
+
ctx.scale(-1, 1);
|
|
11354
|
+
break;
|
|
11355
|
+
case 8:
|
|
11356
|
+
ctx.rotate(-0.5 * Math.PI);
|
|
11357
|
+
ctx.translate(-width, 0);
|
|
11358
|
+
break;
|
|
11359
|
+
}
|
|
11360
|
+
}
|
|
11361
|
+
var URL = window.URL && window.URL.createObjectURL ? window.URL : window.webkitURL && window.webkitURL.createObjectURL ? window.webkitURL : null;
|
|
11362
|
+
|
|
11363
|
+
// -------------------------
|
|
11364
|
+
// MegaPixImage class
|
|
11365
|
+
// -------------------------
|
|
11366
|
+
var MegaPixImage = /*#__PURE__*/function () {
|
|
11367
|
+
function MegaPixImage(srcImage) {
|
|
11368
|
+
_classCallCheck(this, MegaPixImage);
|
|
11369
|
+
if (window.Blob && srcImage instanceof Blob) {
|
|
11370
|
+
if (!URL) throw Error("No createObjectURL function found");
|
|
11371
|
+
var img = new Image();
|
|
11372
|
+
img.src = URL.createObjectURL(srcImage);
|
|
11373
|
+
this.blob = srcImage;
|
|
11374
|
+
srcImage = img;
|
|
11375
|
+
}
|
|
11376
|
+
if (!srcImage.naturalWidth && !srcImage.naturalHeight) {
|
|
11377
|
+
this.imageLoadListeners = [];
|
|
11378
|
+
var _this = this;
|
|
11379
|
+
srcImage.onload = srcImage.onerror = function () {
|
|
11380
|
+
var listeners = _this.imageLoadListeners;
|
|
11381
|
+
if (listeners) {
|
|
11382
|
+
_this.imageLoadListeners = null;
|
|
11383
|
+
listeners.forEach(function (fn) {
|
|
11384
|
+
return fn();
|
|
11385
|
+
});
|
|
11386
|
+
}
|
|
11387
|
+
};
|
|
11388
|
+
}
|
|
11389
|
+
this.srcImage = srcImage;
|
|
11390
|
+
}
|
|
11391
|
+
return _createClass(MegaPixImage, [{
|
|
11392
|
+
key: "render",
|
|
11393
|
+
value: function render(target, options, callback) {
|
|
11394
|
+
var _this2 = this;
|
|
11395
|
+
if (this.imageLoadListeners) {
|
|
11396
|
+
this.imageLoadListeners.push(function () {
|
|
11397
|
+
_this2.render(target, options, callback);
|
|
11398
|
+
});
|
|
11399
|
+
return;
|
|
11400
|
+
}
|
|
11401
|
+
options = options || {};
|
|
11402
|
+
var imgWidth = this.srcImage.naturalWidth,
|
|
11403
|
+
imgHeight = this.srcImage.naturalHeight;
|
|
11404
|
+
var width = options.width,
|
|
11405
|
+
height = options.height;
|
|
11406
|
+
var maxWidth = options.maxWidth,
|
|
11407
|
+
maxHeight = options.maxHeight;
|
|
11408
|
+
var doSquash = !this.blob || this.blob.type === 'image/jpeg';
|
|
11409
|
+
if (width && !height) height = imgHeight * width / imgWidth << 0;else if (height && !width) width = imgWidth * height / imgHeight << 0;else {
|
|
11410
|
+
width = imgWidth;
|
|
11411
|
+
height = imgHeight;
|
|
11412
|
+
}
|
|
11413
|
+
if (maxWidth && width > maxWidth) {
|
|
11414
|
+
width = maxWidth;
|
|
11415
|
+
height = imgHeight * width / imgWidth << 0;
|
|
11416
|
+
}
|
|
11417
|
+
if (maxHeight && height > maxHeight) {
|
|
11418
|
+
height = maxHeight;
|
|
11419
|
+
width = imgWidth * height / imgHeight << 0;
|
|
11420
|
+
}
|
|
11421
|
+
var opt = MegaPixImage_objectSpread({
|
|
11422
|
+
width: width,
|
|
11423
|
+
height: height
|
|
11424
|
+
}, options);
|
|
11425
|
+
var tagName = target.tagName.toLowerCase();
|
|
11426
|
+
if (tagName === 'img') target.src = renderImageToDataURL(this.srcImage, opt, doSquash);else if (tagName === 'canvas') renderImageToCanvas(this.srcImage, target, opt, doSquash);
|
|
11427
|
+
if (typeof this.onrender === 'function') this.onrender(target);
|
|
11428
|
+
if (callback) callback();
|
|
11429
|
+
if (this.blob) {
|
|
11430
|
+
this.blob = null;
|
|
11431
|
+
URL.revokeObjectURL(this.srcImage.src);
|
|
11432
|
+
}
|
|
11433
|
+
}
|
|
11434
|
+
}]);
|
|
11435
|
+
}(); // -------------------------
|
|
11436
|
+
// ESM export default
|
|
11437
|
+
// -------------------------
|
|
11438
|
+
/* harmony default export */ const lib_MegaPixImage = (MegaPixImage);
|
|
11529
11439
|
;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/upload/upload.vue?vue&type=script&lang=js
|
|
11530
11440
|
|
|
11531
11441
|
// import MegaPixImage from '../../lib/MegaPixImage'
|
|
@@ -11598,7 +11508,7 @@ var uploadvue_type_script_lang_js_prefixCls = 'dpzvc-upload';
|
|
|
11598
11508
|
var _this = this;
|
|
11599
11509
|
var data = null;
|
|
11600
11510
|
var img = new Image();
|
|
11601
|
-
var mpImg = new
|
|
11511
|
+
var mpImg = new lib_MegaPixImage(file);
|
|
11602
11512
|
mpImg.render(img, {
|
|
11603
11513
|
maxWidth: 600,
|
|
11604
11514
|
quality: 0.8
|
|
@@ -11705,8 +11615,8 @@ var uploadvue_type_script_lang_js_prefixCls = 'dpzvc-upload';
|
|
|
11705
11615
|
;
|
|
11706
11616
|
var upload_component = normalizeComponent(
|
|
11707
11617
|
upload_uploadvue_type_script_lang_js,
|
|
11708
|
-
|
|
11709
|
-
|
|
11618
|
+
uploadvue_type_template_id_23492f0b_render,
|
|
11619
|
+
uploadvue_type_template_id_23492f0b_staticRenderFns,
|
|
11710
11620
|
false,
|
|
11711
11621
|
null,
|
|
11712
11622
|
null,
|
|
@@ -12593,117 +12503,82 @@ var Indicator_component = normalizeComponent(
|
|
|
12593
12503
|
|
|
12594
12504
|
/* harmony default export */ const Indicator = (Indicator_component.exports);
|
|
12595
12505
|
;// ./src/components/Indicator/index.js
|
|
12506
|
+
|
|
12507
|
+
function Indicator_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12508
|
+
function Indicator_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? Indicator_ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Indicator_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12596
12509
|
/**
|
|
12597
|
-
*
|
|
12510
|
+
* Indicator - Vue 2.7 CLI 适配版
|
|
12598
12511
|
*/
|
|
12599
12512
|
|
|
12600
12513
|
|
|
12601
12514
|
|
|
12602
|
-
var instance;
|
|
12603
|
-
|
|
12604
|
-
var
|
|
12605
|
-
var
|
|
12606
|
-
|
|
12607
|
-
|
|
12608
|
-
});
|
|
12609
|
-
var div = document.createElement('div');
|
|
12610
|
-
document.body.appendChild(div);
|
|
12611
|
-
var indicator = new (external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default())({
|
|
12612
|
-
el: div,
|
|
12613
|
-
template: "<Indicator ".concat(props, " v-model=\"visible\" ></Indicator>"),
|
|
12614
|
-
components: {
|
|
12615
|
-
Indicator: Indicator
|
|
12616
|
-
},
|
|
12617
|
-
data: Object.assign(_props, {
|
|
12618
|
-
visible: false,
|
|
12515
|
+
var instance = null;
|
|
12516
|
+
function createInstance() {
|
|
12517
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12518
|
+
var IndicatorConstructor = external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_default().extend(Indicator);
|
|
12519
|
+
var vm = new IndicatorConstructor({
|
|
12520
|
+
propsData: Indicator_objectSpread({
|
|
12619
12521
|
size: 45,
|
|
12620
12522
|
type: 'snake',
|
|
12621
12523
|
color: '#ffffff',
|
|
12622
|
-
text: '加载中...'
|
|
12623
|
-
|
|
12624
|
-
}),
|
|
12625
|
-
methods: {
|
|
12626
|
-
remove: function remove() {
|
|
12627
|
-
var _this = this;
|
|
12628
|
-
this.$children[0].visible = false;
|
|
12629
|
-
setTimeout(function () {
|
|
12630
|
-
_this.destroy();
|
|
12631
|
-
}, 300);
|
|
12632
|
-
},
|
|
12633
|
-
destroy: function destroy() {
|
|
12634
|
-
this.$destroy();
|
|
12635
|
-
|
|
12636
|
-
// if (!this.$el) return;
|
|
12637
|
-
document.body.removeChild(this.$el);
|
|
12638
|
-
this.onRemove();
|
|
12639
|
-
}
|
|
12640
|
-
}
|
|
12641
|
-
}).$children[0];
|
|
12642
|
-
return {
|
|
12643
|
-
open: function open(options) {
|
|
12644
|
-
indicator.$parent.visible = true;
|
|
12645
|
-
indicator.$parent.onRemove = options.onRemove;
|
|
12646
|
-
if ('size' in options) {
|
|
12647
|
-
indicator.$parent.size = options.size;
|
|
12648
|
-
}
|
|
12649
|
-
if ('type' in options) {
|
|
12650
|
-
indicator.$parent.type = options.type;
|
|
12651
|
-
}
|
|
12652
|
-
if ('color' in options) {
|
|
12653
|
-
indicator.$parent.color = options.color;
|
|
12654
|
-
}
|
|
12655
|
-
if ('text' in options) {
|
|
12656
|
-
indicator.$parent.text = options.text;
|
|
12657
|
-
}
|
|
12658
|
-
},
|
|
12659
|
-
remove: function remove() {
|
|
12660
|
-
indicator.visible = false;
|
|
12661
|
-
indicator.$parent.remove();
|
|
12662
|
-
},
|
|
12663
|
-
component: indicator
|
|
12664
|
-
};
|
|
12665
|
-
};
|
|
12666
|
-
function Indicator_confirm(options) {
|
|
12667
|
-
instance = instance || Indicator.newInstance({
|
|
12668
|
-
size: 45,
|
|
12669
|
-
color: '#ffffff',
|
|
12670
|
-
text: '正在加载...',
|
|
12671
|
-
type: 'snake'
|
|
12524
|
+
text: '加载中...'
|
|
12525
|
+
}, props)
|
|
12672
12526
|
});
|
|
12673
|
-
|
|
12674
|
-
|
|
12675
|
-
|
|
12676
|
-
|
|
12527
|
+
vm.$mount();
|
|
12528
|
+
document.body.appendChild(vm.$el);
|
|
12529
|
+
vm.visible = false;
|
|
12530
|
+
vm.$on('remove', function () {
|
|
12531
|
+
destroyInstance();
|
|
12532
|
+
});
|
|
12533
|
+
return vm;
|
|
12677
12534
|
}
|
|
12678
|
-
|
|
12679
|
-
|
|
12680
|
-
|
|
12681
|
-
|
|
12682
|
-
|
|
12535
|
+
function destroyInstance() {
|
|
12536
|
+
if (!instance) return;
|
|
12537
|
+
instance.$destroy();
|
|
12538
|
+
if (instance.$el && instance.$el.parentNode) {
|
|
12539
|
+
instance.$el.parentNode.removeChild(instance.$el);
|
|
12540
|
+
}
|
|
12541
|
+
instance = null;
|
|
12542
|
+
}
|
|
12543
|
+
function Indicator_open() {
|
|
12544
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12545
|
+
if (!instance) {
|
|
12546
|
+
instance = createInstance(options);
|
|
12547
|
+
}
|
|
12548
|
+
Object.keys(options).forEach(function (key) {
|
|
12549
|
+
instance.$props[key] = options[key];
|
|
12550
|
+
});
|
|
12551
|
+
instance.visible = true;
|
|
12552
|
+
}
|
|
12553
|
+
function Indicator_close() {
|
|
12554
|
+
if (!instance) return;
|
|
12555
|
+
instance.visible = false;
|
|
12556
|
+
destroyInstance();
|
|
12557
|
+
}
|
|
12558
|
+
|
|
12559
|
+
/* ================== 对外 API ================== */
|
|
12560
|
+
|
|
12561
|
+
Indicator.open = Indicator_open;
|
|
12562
|
+
Indicator.remove = Indicator_close;
|
|
12683
12563
|
Indicator.snake = function () {
|
|
12684
12564
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12685
12565
|
props.type = 'snake';
|
|
12686
|
-
|
|
12566
|
+
Indicator_open(props);
|
|
12567
|
+
};
|
|
12568
|
+
Indicator.blade = function () {
|
|
12569
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12570
|
+
props.type = 'blade';
|
|
12571
|
+
Indicator_open(props);
|
|
12687
12572
|
};
|
|
12688
12573
|
Indicator.circle = function () {
|
|
12689
12574
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12690
12575
|
props.type = 'fading-circle';
|
|
12691
|
-
|
|
12576
|
+
Indicator_open(props);
|
|
12692
12577
|
};
|
|
12693
12578
|
Indicator.bounce = function () {
|
|
12694
12579
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12695
12580
|
props.type = 'double-bounce';
|
|
12696
|
-
|
|
12697
|
-
};
|
|
12698
|
-
Indicator.remove = function () {
|
|
12699
|
-
if (!instance) return false;
|
|
12700
|
-
instance = instance || Indicator.newInstance({
|
|
12701
|
-
size: 45,
|
|
12702
|
-
color: '#ffffff',
|
|
12703
|
-
text: '正在加载...',
|
|
12704
|
-
type: 'snake'
|
|
12705
|
-
});
|
|
12706
|
-
instance.remove();
|
|
12581
|
+
Indicator_open(props);
|
|
12707
12582
|
};
|
|
12708
12583
|
/* harmony default export */ const components_Indicator = (Indicator);
|
|
12709
12584
|
;// ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/progress/progress.vue?vue&type=template&id=7444ee7d
|
|
@@ -13527,7 +13402,7 @@ var components = {
|
|
|
13527
13402
|
|
|
13528
13403
|
var services = {
|
|
13529
13404
|
Message: components_message,
|
|
13530
|
-
Modal:
|
|
13405
|
+
Modal: components_modal,
|
|
13531
13406
|
Prompt: components_prompt,
|
|
13532
13407
|
Indicator: components_Indicator
|
|
13533
13408
|
};
|