ele-admin-plus 1.2.0-beta.6 → 1.2.1-beta.1
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/es/ele-admin-layout/index.d.ts +11 -1
- package/es/ele-admin-layout/index.js +53 -47
- package/es/ele-admin-layout/props.d.ts +10 -0
- package/es/ele-admin-layout/props.js +10 -0
- package/es/ele-app/components/message-body.d.ts +6 -0
- package/es/ele-app/components/message-body.js +10 -4
- package/es/ele-app/components/message-box-icon.d.ts +30 -0
- package/es/ele-app/components/message-box-icon.js +63 -0
- package/es/ele-app/el.d.ts +7 -0
- package/es/ele-app/style/overwrite/message-box/index.scss +19 -0
- package/es/ele-card/index.js +1 -1
- package/es/ele-pro-layout/index.d.ts +12 -2
- package/es/ele-pro-layout/index.js +6 -1
- package/es/ele-pro-layout/props.d.ts +10 -0
- package/es/ele-pro-layout/props.js +10 -0
- package/es/ele-pro-table/types.d.ts +3 -3
- package/es/ele-qr-code/qrcodegen.js +34 -70
- package/es/icons/MenuOutlined.d.ts +2 -0
- package/es/icons/MenuOutlined.js +32 -0
- package/es/icons/index.d.ts +1 -0
- package/es/icons/index.js +84 -82
- package/es/utils/message-box.js +28 -2
- package/es/utils/message.js +36 -13
- package/lib/components.cjs +4 -5
- package/lib/core-export.cjs +28 -35
- package/lib/core.cjs +8 -10
- package/lib/ele-admin-layout/index.cjs +53 -47
- package/lib/ele-admin-layout/index.d.ts +11 -1
- package/lib/ele-admin-layout/props.cjs +10 -0
- package/lib/ele-admin-layout/props.d.ts +10 -0
- package/lib/ele-app/components/message-body.cjs +9 -3
- package/lib/ele-app/components/message-body.d.ts +6 -0
- package/lib/ele-app/components/message-box-icon.cjs +62 -0
- package/lib/ele-app/components/message-box-icon.d.ts +30 -0
- package/lib/ele-app/el.d.ts +7 -0
- package/lib/ele-app/style/overwrite/message-box/index.scss +19 -0
- package/lib/ele-card/index.cjs +1 -1
- package/lib/ele-pro-layout/index.cjs +6 -1
- package/lib/ele-pro-layout/index.d.ts +12 -2
- package/lib/ele-pro-layout/props.cjs +10 -0
- package/lib/ele-pro-layout/props.d.ts +10 -0
- package/lib/ele-pro-table/types.d.ts +3 -3
- package/lib/ele-qr-code/qrcodegen.cjs +34 -70
- package/lib/icons/MenuOutlined.cjs +31 -0
- package/lib/icons/MenuOutlined.d.ts +2 -0
- package/lib/icons/index.cjs +2 -0
- package/lib/icons/index.d.ts +1 -0
- package/lib/index.cjs +8 -10
- package/lib/utils/message-box.cjs +27 -1
- package/lib/utils/message.cjs +35 -12
- package/package.json +11 -11
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) =>
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
4
|
var qrcodegen;
|
|
8
5
|
((qrcodegen2) => {
|
|
9
6
|
const _QrCode = class _QrCode {
|
|
@@ -30,12 +27,10 @@ var qrcodegen;
|
|
|
30
27
|
this.errorCorrectionLevel = errorCorrectionLevel;
|
|
31
28
|
if (version < _QrCode.MIN_VERSION || version > _QrCode.MAX_VERSION)
|
|
32
29
|
throw "Version value out of range";
|
|
33
|
-
if (msk < -1 || msk > 7)
|
|
34
|
-
throw "Mask value out of range";
|
|
30
|
+
if (msk < -1 || msk > 7) throw "Mask value out of range";
|
|
35
31
|
this.size = version * 4 + 17;
|
|
36
32
|
let row = [];
|
|
37
|
-
for (let i = 0; i < this.size; i++)
|
|
38
|
-
row.push(false);
|
|
33
|
+
for (let i = 0; i < this.size; i++) row.push(false);
|
|
39
34
|
for (let i = 0; i < this.size; i++) {
|
|
40
35
|
this.modules.push(row.slice());
|
|
41
36
|
this.isFunction.push(row.slice());
|
|
@@ -117,8 +112,7 @@ var qrcodegen;
|
|
|
117
112
|
for (const seg of segs) {
|
|
118
113
|
appendBits(seg.mode.modeBits, 4, bb);
|
|
119
114
|
appendBits(seg.numChars, seg.mode.numCharCountBits(version), bb);
|
|
120
|
-
for (const b of seg.getData())
|
|
121
|
-
bb.push(b);
|
|
115
|
+
for (const b of seg.getData()) bb.push(b);
|
|
122
116
|
}
|
|
123
117
|
assert(bb.length == dataUsedBits);
|
|
124
118
|
const dataCapacityBits = _QrCode.getNumDataCodewords(version, ecl) * 8;
|
|
@@ -129,8 +123,7 @@ var qrcodegen;
|
|
|
129
123
|
for (let padByte = 236; bb.length < dataCapacityBits; padByte ^= 236 ^ 17)
|
|
130
124
|
appendBits(padByte, 8, bb);
|
|
131
125
|
let dataCodewords = [];
|
|
132
|
-
while (dataCodewords.length * 8 < bb.length)
|
|
133
|
-
dataCodewords.push(0);
|
|
126
|
+
while (dataCodewords.length * 8 < bb.length) dataCodewords.push(0);
|
|
134
127
|
bb.forEach(
|
|
135
128
|
(b, i) => dataCodewords[i >>> 3] |= b << 7 - (i & 7)
|
|
136
129
|
);
|
|
@@ -173,8 +166,7 @@ var qrcodegen;
|
|
|
173
166
|
drawFormatBits(mask) {
|
|
174
167
|
const data = this.errorCorrectionLevel.formatBits << 3 | mask;
|
|
175
168
|
let rem = data;
|
|
176
|
-
for (let i = 0; i < 10; i++)
|
|
177
|
-
rem = rem << 1 ^ (rem >>> 9) * 1335;
|
|
169
|
+
for (let i = 0; i < 10; i++) rem = rem << 1 ^ (rem >>> 9) * 1335;
|
|
178
170
|
const bits = (data << 10 | rem) ^ 21522;
|
|
179
171
|
assert(bits >>> 15 == 0);
|
|
180
172
|
for (let i = 0; i <= 5; i++)
|
|
@@ -193,11 +185,9 @@ var qrcodegen;
|
|
|
193
185
|
// Draws two copies of the version bits (with its own error correction code),
|
|
194
186
|
// based on this object's version field, iff 7 <= version <= 40.
|
|
195
187
|
drawVersion() {
|
|
196
|
-
if (this.version < 7)
|
|
197
|
-
return;
|
|
188
|
+
if (this.version < 7) return;
|
|
198
189
|
let rem = this.version;
|
|
199
|
-
for (let i = 0; i < 12; i++)
|
|
200
|
-
rem = rem << 1 ^ (rem >>> 11) * 7973;
|
|
190
|
+
for (let i = 0; i < 12; i++) rem = rem << 1 ^ (rem >>> 11) * 7973;
|
|
201
191
|
const bits = this.version << 12 | rem;
|
|
202
192
|
assert(bits >>> 18 == 0);
|
|
203
193
|
for (let i = 0; i < 18; i++) {
|
|
@@ -263,8 +253,7 @@ var qrcodegen;
|
|
|
263
253
|
);
|
|
264
254
|
k += dat.length;
|
|
265
255
|
const ecc = _QrCode.reedSolomonComputeRemainder(dat, rsDiv);
|
|
266
|
-
if (i < numShortBlocks)
|
|
267
|
-
dat.push(0);
|
|
256
|
+
if (i < numShortBlocks) dat.push(0);
|
|
268
257
|
blocks.push(dat.concat(ecc));
|
|
269
258
|
}
|
|
270
259
|
let result = [];
|
|
@@ -284,8 +273,7 @@ var qrcodegen;
|
|
|
284
273
|
throw "Invalid argument";
|
|
285
274
|
let i = 0;
|
|
286
275
|
for (let right = this.size - 1; right >= 1; right -= 2) {
|
|
287
|
-
if (right == 6)
|
|
288
|
-
right = 5;
|
|
276
|
+
if (right == 6) right = 5;
|
|
289
277
|
for (let vert = 0; vert < this.size; vert++) {
|
|
290
278
|
for (let j = 0; j < 2; j++) {
|
|
291
279
|
const x = right - j;
|
|
@@ -306,8 +294,7 @@ var qrcodegen;
|
|
|
306
294
|
// the same mask value a second time will undo the mask. A final well-formed
|
|
307
295
|
// QR Code needs exactly one (not zero, two, etc.) mask applied.
|
|
308
296
|
applyMask(mask) {
|
|
309
|
-
if (mask < 0 || mask > 7)
|
|
310
|
-
throw "Mask value out of range";
|
|
297
|
+
if (mask < 0 || mask > 7) throw "Mask value out of range";
|
|
311
298
|
for (let y = 0; y < this.size; y++) {
|
|
312
299
|
for (let x = 0; x < this.size; x++) {
|
|
313
300
|
let invert;
|
|
@@ -355,10 +342,8 @@ var qrcodegen;
|
|
|
355
342
|
for (let x = 0; x < this.size; x++) {
|
|
356
343
|
if (this.modules[y][x] == runColor) {
|
|
357
344
|
runX++;
|
|
358
|
-
if (runX == 5)
|
|
359
|
-
|
|
360
|
-
else if (runX > 5)
|
|
361
|
-
result++;
|
|
345
|
+
if (runX == 5) result += _QrCode.PENALTY_N1;
|
|
346
|
+
else if (runX > 5) result++;
|
|
362
347
|
} else {
|
|
363
348
|
this.finderPenaltyAddHistory(runX, runHistory);
|
|
364
349
|
if (!runColor)
|
|
@@ -376,10 +361,8 @@ var qrcodegen;
|
|
|
376
361
|
for (let y = 0; y < this.size; y++) {
|
|
377
362
|
if (this.modules[y][x] == runColor) {
|
|
378
363
|
runY++;
|
|
379
|
-
if (runY == 5)
|
|
380
|
-
|
|
381
|
-
else if (runY > 5)
|
|
382
|
-
result++;
|
|
364
|
+
if (runY == 5) result += _QrCode.PENALTY_N1;
|
|
365
|
+
else if (runY > 5) result++;
|
|
383
366
|
} else {
|
|
384
367
|
this.finderPenaltyAddHistory(runY, runHistory);
|
|
385
368
|
if (!runColor)
|
|
@@ -412,8 +395,7 @@ var qrcodegen;
|
|
|
412
395
|
// Each position is in the range [0,177), and are used on both the x and y axes.
|
|
413
396
|
// This could be implemented as lookup table of 40 variable-length lists of integers.
|
|
414
397
|
getAlignmentPatternPositions() {
|
|
415
|
-
if (this.version == 1)
|
|
416
|
-
return [];
|
|
398
|
+
if (this.version == 1) return [];
|
|
417
399
|
else {
|
|
418
400
|
const numAlign = Math.floor(this.version / 7) + 2;
|
|
419
401
|
const step = this.version == 32 ? 26 : Math.ceil((this.version * 4 + 4) / (numAlign * 2 - 2)) * 2;
|
|
@@ -433,8 +415,7 @@ var qrcodegen;
|
|
|
433
415
|
if (ver >= 2) {
|
|
434
416
|
const numAlign = Math.floor(ver / 7) + 2;
|
|
435
417
|
result -= (25 * numAlign - 10) * numAlign - 55;
|
|
436
|
-
if (ver >= 7)
|
|
437
|
-
result -= 36;
|
|
418
|
+
if (ver >= 7) result -= 36;
|
|
438
419
|
}
|
|
439
420
|
assert(208 <= result && result <= 29648);
|
|
440
421
|
return result;
|
|
@@ -448,18 +429,15 @@ var qrcodegen;
|
|
|
448
429
|
// Returns a Reed-Solomon ECC generator polynomial for the given degree. This could be
|
|
449
430
|
// implemented as a lookup table over all possible parameter values, instead of as an algorithm.
|
|
450
431
|
static reedSolomonComputeDivisor(degree) {
|
|
451
|
-
if (degree < 1 || degree > 255)
|
|
452
|
-
throw "Degree out of range";
|
|
432
|
+
if (degree < 1 || degree > 255) throw "Degree out of range";
|
|
453
433
|
let result = [];
|
|
454
|
-
for (let i = 0; i < degree - 1; i++)
|
|
455
|
-
result.push(0);
|
|
434
|
+
for (let i = 0; i < degree - 1; i++) result.push(0);
|
|
456
435
|
result.push(1);
|
|
457
436
|
let root = 1;
|
|
458
437
|
for (let i = 0; i < degree; i++) {
|
|
459
438
|
for (let j = 0; j < result.length; j++) {
|
|
460
439
|
result[j] = _QrCode.reedSolomonMultiply(result[j], root);
|
|
461
|
-
if (j + 1 < result.length)
|
|
462
|
-
result[j] ^= result[j + 1];
|
|
440
|
+
if (j + 1 < result.length) result[j] ^= result[j + 1];
|
|
463
441
|
}
|
|
464
442
|
root = _QrCode.reedSolomonMultiply(root, 2);
|
|
465
443
|
}
|
|
@@ -480,8 +458,7 @@ var qrcodegen;
|
|
|
480
458
|
// Returns the product of the two given field elements modulo GF(2^8/0x11D). The arguments and result
|
|
481
459
|
// are unsigned 8-bit integers. This could be implemented as a lookup table of 256*256 entries of uint8.
|
|
482
460
|
static reedSolomonMultiply(x, y) {
|
|
483
|
-
if (x >>> 8 != 0 || y >>> 8 != 0)
|
|
484
|
-
throw "Byte out of range";
|
|
461
|
+
if (x >>> 8 != 0 || y >>> 8 != 0) throw "Byte out of range";
|
|
485
462
|
let z = 0;
|
|
486
463
|
for (let i = 7; i >= 0; i--) {
|
|
487
464
|
z = z << 1 ^ (z >>> 7) * 285;
|
|
@@ -510,8 +487,7 @@ var qrcodegen;
|
|
|
510
487
|
}
|
|
511
488
|
// Pushes the given value to the front and drops the last value. A helper function for getPenaltyScore().
|
|
512
489
|
finderPenaltyAddHistory(currentRunLength, runHistory) {
|
|
513
|
-
if (runHistory[0] == 0)
|
|
514
|
-
currentRunLength += this.size;
|
|
490
|
+
if (runHistory[0] == 0) currentRunLength += this.size;
|
|
515
491
|
runHistory.pop();
|
|
516
492
|
runHistory.unshift(currentRunLength);
|
|
517
493
|
}
|
|
@@ -889,8 +865,7 @@ var qrcodegen;
|
|
|
889
865
|
let QrCode = _QrCode;
|
|
890
866
|
qrcodegen2.QrCode = QrCode;
|
|
891
867
|
function appendBits(val, len, bb) {
|
|
892
|
-
if (len < 0 || len > 31 || val >>> len != 0)
|
|
893
|
-
throw "Value out of range";
|
|
868
|
+
if (len < 0 || len > 31 || val >>> len != 0) throw "Value out of range";
|
|
894
869
|
for (let i = len - 1; i >= 0; i--)
|
|
895
870
|
bb.push(val >>> i & 1);
|
|
896
871
|
}
|
|
@@ -898,8 +873,7 @@ var qrcodegen;
|
|
|
898
873
|
return (x >>> i & 1) != 0;
|
|
899
874
|
}
|
|
900
875
|
function assert(cond) {
|
|
901
|
-
if (!cond)
|
|
902
|
-
throw "Assertion error";
|
|
876
|
+
if (!cond) throw "Assertion error";
|
|
903
877
|
}
|
|
904
878
|
const _QrSegment = class _QrSegment {
|
|
905
879
|
/*-- Constructor (low level) and fields --*/
|
|
@@ -910,8 +884,7 @@ var qrcodegen;
|
|
|
910
884
|
this.mode = mode;
|
|
911
885
|
this.numChars = numChars;
|
|
912
886
|
this.bitData = bitData;
|
|
913
|
-
if (numChars < 0)
|
|
914
|
-
throw "Invalid argument";
|
|
887
|
+
if (numChars < 0) throw "Invalid argument";
|
|
915
888
|
this.bitData = bitData.slice();
|
|
916
889
|
}
|
|
917
890
|
/*-- Static factory functions (mid level) --*/
|
|
@@ -920,8 +893,7 @@ var qrcodegen;
|
|
|
920
893
|
// can be converted to UTF-8 bytes and encoded as a byte mode segment.
|
|
921
894
|
static makeBytes(data) {
|
|
922
895
|
let bb = [];
|
|
923
|
-
for (const b of data)
|
|
924
|
-
appendBits(b, 8, bb);
|
|
896
|
+
for (const b of data) appendBits(b, 8, bb);
|
|
925
897
|
return new _QrSegment(_QrSegment.Mode.BYTE, data.length, bb);
|
|
926
898
|
}
|
|
927
899
|
// Returns a segment representing the given string of decimal digits encoded in numeric mode.
|
|
@@ -960,31 +932,25 @@ var qrcodegen;
|
|
|
960
932
|
// Returns a new mutable list of zero or more segments to represent the given Unicode text string.
|
|
961
933
|
// The result may use various segment modes and switch modes to optimize the length of the bit stream.
|
|
962
934
|
static makeSegments(text) {
|
|
963
|
-
if (text == "")
|
|
964
|
-
|
|
965
|
-
else if (_QrSegment.isNumeric(text))
|
|
966
|
-
return [_QrSegment.makeNumeric(text)];
|
|
935
|
+
if (text == "") return [];
|
|
936
|
+
else if (_QrSegment.isNumeric(text)) return [_QrSegment.makeNumeric(text)];
|
|
967
937
|
else if (_QrSegment.isAlphanumeric(text))
|
|
968
938
|
return [_QrSegment.makeAlphanumeric(text)];
|
|
969
|
-
else
|
|
970
|
-
return [_QrSegment.makeBytes(_QrSegment.toUtf8ByteArray(text))];
|
|
939
|
+
else return [_QrSegment.makeBytes(_QrSegment.toUtf8ByteArray(text))];
|
|
971
940
|
}
|
|
972
941
|
// Returns a segment representing an Extended Channel Interpretation
|
|
973
942
|
// (ECI) designator with the given assignment value.
|
|
974
943
|
static makeEci(assignVal) {
|
|
975
944
|
let bb = [];
|
|
976
|
-
if (assignVal < 0)
|
|
977
|
-
|
|
978
|
-
else if (assignVal < 1 << 7)
|
|
979
|
-
appendBits(assignVal, 8, bb);
|
|
945
|
+
if (assignVal < 0) throw "ECI assignment value out of range";
|
|
946
|
+
else if (assignVal < 1 << 7) appendBits(assignVal, 8, bb);
|
|
980
947
|
else if (assignVal < 1 << 14) {
|
|
981
948
|
appendBits(2, 2, bb);
|
|
982
949
|
appendBits(assignVal, 14, bb);
|
|
983
950
|
} else if (assignVal < 1e6) {
|
|
984
951
|
appendBits(6, 3, bb);
|
|
985
952
|
appendBits(assignVal, 21, bb);
|
|
986
|
-
} else
|
|
987
|
-
throw "ECI assignment value out of range";
|
|
953
|
+
} else throw "ECI assignment value out of range";
|
|
988
954
|
return new _QrSegment(_QrSegment.Mode.ECI, 0, bb);
|
|
989
955
|
}
|
|
990
956
|
// Tests whether the given string can be encoded as a segment in numeric mode.
|
|
@@ -1009,8 +975,7 @@ var qrcodegen;
|
|
|
1009
975
|
let result = 0;
|
|
1010
976
|
for (const seg of segs) {
|
|
1011
977
|
const ccbits = seg.mode.numCharCountBits(version);
|
|
1012
|
-
if (seg.numChars >= 1 << ccbits)
|
|
1013
|
-
return Infinity;
|
|
978
|
+
if (seg.numChars >= 1 << ccbits) return Infinity;
|
|
1014
979
|
result += 4 + ccbits + seg.bitData.length;
|
|
1015
980
|
}
|
|
1016
981
|
return result;
|
|
@@ -1020,8 +985,7 @@ var qrcodegen;
|
|
|
1020
985
|
str = encodeURI(str);
|
|
1021
986
|
let result = [];
|
|
1022
987
|
for (let i = 0; i < str.length; i++) {
|
|
1023
|
-
if (str.charAt(i) != "%")
|
|
1024
|
-
result.push(str.charCodeAt(i));
|
|
988
|
+
if (str.charAt(i) != "%") result.push(str.charCodeAt(i));
|
|
1025
989
|
else {
|
|
1026
990
|
result.push(Number.parseInt(str.substr(i + 1, 2), 16));
|
|
1027
991
|
i += 2;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createElementVNode } from "vue";
|
|
2
|
+
const _sfc_main = defineComponent({
|
|
3
|
+
name: "MenuOutlined"
|
|
4
|
+
});
|
|
5
|
+
const _export_sfc = (sfc, props) => {
|
|
6
|
+
const target = sfc.__vccOpts || sfc;
|
|
7
|
+
for (const [key, val] of props) {
|
|
8
|
+
target[key] = val;
|
|
9
|
+
}
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_1 = {
|
|
13
|
+
viewBox: "0 0 48 48",
|
|
14
|
+
fill: "none",
|
|
15
|
+
stroke: "currentColor",
|
|
16
|
+
"stroke-width": "4"
|
|
17
|
+
};
|
|
18
|
+
const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", { d: "M3 7H45" }, null, -1);
|
|
19
|
+
const _hoisted_3 = /* @__PURE__ */ createElementVNode("path", { d: "M3 24H44" }, null, -1);
|
|
20
|
+
const _hoisted_4 = /* @__PURE__ */ createElementVNode("path", { d: "M3 41H45" }, null, -1);
|
|
21
|
+
const _hoisted_5 = [
|
|
22
|
+
_hoisted_2,
|
|
23
|
+
_hoisted_3,
|
|
24
|
+
_hoisted_4
|
|
25
|
+
];
|
|
26
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
27
|
+
return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_5);
|
|
28
|
+
}
|
|
29
|
+
const MenuOutlined = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
30
|
+
export {
|
|
31
|
+
MenuOutlined as default
|
|
32
|
+
};
|
package/es/icons/index.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export { default as LogOutlined } from './LogOutlined';
|
|
|
65
65
|
export { default as MailOutlined } from './MailOutlined';
|
|
66
66
|
export { default as LogoutOutlined } from './LogoutOutlined';
|
|
67
67
|
export { default as MenuFoldOutlined } from './MenuFoldOutlined';
|
|
68
|
+
export { default as MenuOutlined } from './MenuOutlined';
|
|
68
69
|
export { default as MenuUnfoldOutlined } from './MenuUnfoldOutlined';
|
|
69
70
|
export { default as MessageOutlined } from './MessageOutlined';
|
|
70
71
|
export { default as MinusCircleOutlined } from './MinusCircleOutlined';
|
package/es/icons/index.js
CHANGED
|
@@ -65,47 +65,48 @@ import { default as default65 } from "./LogOutlined";
|
|
|
65
65
|
import { default as default66 } from "./MailOutlined";
|
|
66
66
|
import { default as default67 } from "./LogoutOutlined";
|
|
67
67
|
import { default as default68 } from "./MenuFoldOutlined";
|
|
68
|
-
import { default as default69 } from "./
|
|
69
|
-
import { default as default70 } from "./
|
|
70
|
-
import { default as default71 } from "./
|
|
71
|
-
import { default as default72 } from "./
|
|
72
|
-
import { default as default73 } from "./
|
|
73
|
-
import { default as default74 } from "./
|
|
74
|
-
import { default as default75 } from "./
|
|
75
|
-
import { default as default76 } from "./
|
|
76
|
-
import { default as default77 } from "./
|
|
77
|
-
import { default as default78 } from "./
|
|
78
|
-
import { default as default79 } from "./
|
|
79
|
-
import { default as default80 } from "./
|
|
80
|
-
import { default as default81 } from "./
|
|
81
|
-
import { default as default82 } from "./
|
|
82
|
-
import { default as default83 } from "./
|
|
83
|
-
import { default as default84 } from "./
|
|
84
|
-
import { default as default85 } from "./
|
|
85
|
-
import { default as default86 } from "./
|
|
86
|
-
import { default as default87 } from "./
|
|
87
|
-
import { default as default88 } from "./
|
|
88
|
-
import { default as default89 } from "./
|
|
89
|
-
import { default as default90 } from "./
|
|
90
|
-
import { default as default91 } from "./
|
|
91
|
-
import { default as default92 } from "./
|
|
92
|
-
import { default as default93 } from "./
|
|
93
|
-
import { default as default94 } from "./
|
|
94
|
-
import { default as default95 } from "./
|
|
95
|
-
import { default as default96 } from "./
|
|
96
|
-
import { default as default97 } from "./
|
|
97
|
-
import { default as default98 } from "./
|
|
98
|
-
import { default as default99 } from "./
|
|
99
|
-
import { default as default100 } from "./
|
|
100
|
-
import { default as default101 } from "./
|
|
101
|
-
import { default as default102 } from "./
|
|
102
|
-
import { default as default103 } from "./
|
|
103
|
-
import { default as default104 } from "./
|
|
104
|
-
import { default as default105 } from "./
|
|
105
|
-
import { default as default106 } from "./
|
|
106
|
-
import { default as default107 } from "./
|
|
107
|
-
import { default as default108 } from "./
|
|
108
|
-
import { default as default109 } from "./
|
|
68
|
+
import { default as default69 } from "./MenuOutlined";
|
|
69
|
+
import { default as default70 } from "./MenuUnfoldOutlined";
|
|
70
|
+
import { default as default71 } from "./MessageOutlined";
|
|
71
|
+
import { default as default72 } from "./MinusCircleOutlined";
|
|
72
|
+
import { default as default73 } from "./MobileOutlined";
|
|
73
|
+
import { default as default74 } from "./MoonOutlined";
|
|
74
|
+
import { default as default75 } from "./MoreOutlined";
|
|
75
|
+
import { default as default76 } from "./PauseFilled";
|
|
76
|
+
import { default as default77 } from "./PieChartOutlined";
|
|
77
|
+
import { default as default78 } from "./PlayFilled";
|
|
78
|
+
import { default as default79 } from "./PlusCircleOutlined";
|
|
79
|
+
import { default as default80 } from "./PlusOutlined";
|
|
80
|
+
import { default as default81 } from "./PrinterOutlined";
|
|
81
|
+
import { default as default82 } from "./ProtectOutlined";
|
|
82
|
+
import { default as default83 } from "./QuestionCircleFilled";
|
|
83
|
+
import { default as default84 } from "./QuestionCircleOutlined";
|
|
84
|
+
import { default as default85 } from "./ReloadOutlined";
|
|
85
|
+
import { default as default86 } from "./ResizeOutlined";
|
|
86
|
+
import { default as default87 } from "./SearchOutlined";
|
|
87
|
+
import { default as default88 } from "./SettingOutlined";
|
|
88
|
+
import { default as default89 } from "./ShoppingOutlined";
|
|
89
|
+
import { default as default90 } from "./SortOutlined";
|
|
90
|
+
import { default as default91 } from "./StarFilled";
|
|
91
|
+
import { default as default92 } from "./StepBackwardFilled";
|
|
92
|
+
import { default as default93 } from "./StepForwardFilled";
|
|
93
|
+
import { default as default94 } from "./SuitcaseOutlined";
|
|
94
|
+
import { default as default95 } from "./SunOutlined";
|
|
95
|
+
import { default as default96 } from "./SwapOutlined";
|
|
96
|
+
import { default as default97 } from "./SyncOutlined";
|
|
97
|
+
import { default as default98 } from "./TableOutlined";
|
|
98
|
+
import { default as default99 } from "./TagOutlined";
|
|
99
|
+
import { default as default100 } from "./TimerOutlined";
|
|
100
|
+
import { default as default101 } from "./UndoOutlined";
|
|
101
|
+
import { default as default102 } from "./UnlockOutlined";
|
|
102
|
+
import { default as default103 } from "./UploadOutlined";
|
|
103
|
+
import { default as default104 } from "./UserOutlined";
|
|
104
|
+
import { default as default105 } from "./VerticalAlignMiddleOutlined";
|
|
105
|
+
import { default as default106 } from "./VerticalLeftOutlined";
|
|
106
|
+
import { default as default107 } from "./VerticalRightOutlined";
|
|
107
|
+
import { default as default108 } from "./WarningOutlined";
|
|
108
|
+
import { default as default109 } from "./ZoomInOutlined";
|
|
109
|
+
import { default as default110 } from "./ZoomOutOutlined";
|
|
109
110
|
export {
|
|
110
111
|
default2 as AnalysisOutlined,
|
|
111
112
|
default3 as ApplicationOutlined,
|
|
@@ -174,45 +175,46 @@ export {
|
|
|
174
175
|
default67 as LogoutOutlined,
|
|
175
176
|
default66 as MailOutlined,
|
|
176
177
|
default68 as MenuFoldOutlined,
|
|
177
|
-
default69 as
|
|
178
|
-
default70 as
|
|
179
|
-
default71 as
|
|
180
|
-
default72 as
|
|
181
|
-
default73 as
|
|
182
|
-
default74 as
|
|
183
|
-
default75 as
|
|
184
|
-
default76 as
|
|
185
|
-
default77 as
|
|
186
|
-
default78 as
|
|
187
|
-
default79 as
|
|
188
|
-
default80 as
|
|
189
|
-
default81 as
|
|
190
|
-
default82 as
|
|
191
|
-
default83 as
|
|
192
|
-
default84 as
|
|
193
|
-
default85 as
|
|
194
|
-
default86 as
|
|
195
|
-
default87 as
|
|
196
|
-
default88 as
|
|
197
|
-
default89 as
|
|
198
|
-
default90 as
|
|
199
|
-
default91 as
|
|
200
|
-
default92 as
|
|
201
|
-
default93 as
|
|
202
|
-
default94 as
|
|
203
|
-
default95 as
|
|
204
|
-
default96 as
|
|
205
|
-
default97 as
|
|
206
|
-
default98 as
|
|
207
|
-
default99 as
|
|
208
|
-
default100 as
|
|
209
|
-
default101 as
|
|
210
|
-
default102 as
|
|
211
|
-
default103 as
|
|
212
|
-
default104 as
|
|
213
|
-
default105 as
|
|
214
|
-
default106 as
|
|
215
|
-
default107 as
|
|
216
|
-
default108 as
|
|
217
|
-
default109 as
|
|
178
|
+
default69 as MenuOutlined,
|
|
179
|
+
default70 as MenuUnfoldOutlined,
|
|
180
|
+
default71 as MessageOutlined,
|
|
181
|
+
default72 as MinusCircleOutlined,
|
|
182
|
+
default73 as MobileOutlined,
|
|
183
|
+
default74 as MoonOutlined,
|
|
184
|
+
default75 as MoreOutlined,
|
|
185
|
+
default76 as PauseFilled,
|
|
186
|
+
default77 as PieChartOutlined,
|
|
187
|
+
default78 as PlayFilled,
|
|
188
|
+
default79 as PlusCircleOutlined,
|
|
189
|
+
default80 as PlusOutlined,
|
|
190
|
+
default81 as PrinterOutlined,
|
|
191
|
+
default82 as ProtectOutlined,
|
|
192
|
+
default83 as QuestionCircleFilled,
|
|
193
|
+
default84 as QuestionCircleOutlined,
|
|
194
|
+
default85 as ReloadOutlined,
|
|
195
|
+
default86 as ResizeOutlined,
|
|
196
|
+
default87 as SearchOutlined,
|
|
197
|
+
default88 as SettingOutlined,
|
|
198
|
+
default89 as ShoppingOutlined,
|
|
199
|
+
default90 as SortOutlined,
|
|
200
|
+
default91 as StarFilled,
|
|
201
|
+
default92 as StepBackwardFilled,
|
|
202
|
+
default93 as StepForwardFilled,
|
|
203
|
+
default94 as SuitcaseOutlined,
|
|
204
|
+
default95 as SunOutlined,
|
|
205
|
+
default96 as SwapOutlined,
|
|
206
|
+
default97 as SyncOutlined,
|
|
207
|
+
default98 as TableOutlined,
|
|
208
|
+
default99 as TagOutlined,
|
|
209
|
+
default100 as TimerOutlined,
|
|
210
|
+
default101 as UndoOutlined,
|
|
211
|
+
default102 as UnlockOutlined,
|
|
212
|
+
default103 as UploadOutlined,
|
|
213
|
+
default104 as UserOutlined,
|
|
214
|
+
default105 as VerticalAlignMiddleOutlined,
|
|
215
|
+
default106 as VerticalLeftOutlined,
|
|
216
|
+
default107 as VerticalRightOutlined,
|
|
217
|
+
default108 as WarningOutlined,
|
|
218
|
+
default109 as ZoomInOutlined,
|
|
219
|
+
default110 as ZoomOutOutlined
|
|
218
220
|
};
|
package/es/utils/message-box.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { getCurrentInstance, onActivated, onDeactivated } from "vue";
|
|
1
|
+
import { getCurrentInstance, onActivated, onDeactivated, onBeforeUnmount, h } from "vue";
|
|
2
2
|
import { ElMessageBox } from "element-plus";
|
|
3
3
|
import { useGlobalProps } from "../ele-config-provider/receiver";
|
|
4
4
|
import { useLayoutState } from "../ele-pro-layout/util";
|
|
5
|
+
import MessageBoxIcon from "../ele-app/components/message-box-icon";
|
|
5
6
|
import { omit } from "./core";
|
|
6
7
|
function getWrapEl(bodyEl) {
|
|
7
8
|
const parent = bodyEl || document.body;
|
|
@@ -16,7 +17,8 @@ function useMessageBox(globalOpt) {
|
|
|
16
17
|
const layoutState = useLayoutState();
|
|
17
18
|
const globalProps = useGlobalProps("messageBox");
|
|
18
19
|
const appContext = (_b = (_a = getCurrentInstance) == null ? void 0 : _a()) == null ? void 0 : _b.appContext;
|
|
19
|
-
const state = { wrapEl: null, isActivated: true };
|
|
20
|
+
const state = { wrapEl: null, isActivated: true, id: 0 };
|
|
21
|
+
const instances = /* @__PURE__ */ new Map();
|
|
20
22
|
const hideClass = "is-hide";
|
|
21
23
|
onActivated(() => {
|
|
22
24
|
state.isActivated = true;
|
|
@@ -26,7 +28,15 @@ function useMessageBox(globalOpt) {
|
|
|
26
28
|
state.isActivated = false;
|
|
27
29
|
state.wrapEl && state.wrapEl.classList.add(hideClass);
|
|
28
30
|
});
|
|
31
|
+
onBeforeUnmount(() => {
|
|
32
|
+
for (const [_key, insDoClose] of instances) {
|
|
33
|
+
insDoClose && insDoClose();
|
|
34
|
+
}
|
|
35
|
+
instances.clear();
|
|
36
|
+
});
|
|
29
37
|
const getOption = (options) => {
|
|
38
|
+
state.id++;
|
|
39
|
+
const msgId = `m_${state.id}`;
|
|
30
40
|
const opt = {
|
|
31
41
|
...globalProps.value || {},
|
|
32
42
|
...globalOpt || {},
|
|
@@ -41,6 +51,22 @@ function useMessageBox(globalOpt) {
|
|
|
41
51
|
}
|
|
42
52
|
opt.lockScroll = false;
|
|
43
53
|
}
|
|
54
|
+
const classes = ["ele-message-box"];
|
|
55
|
+
if (opt.customClass) {
|
|
56
|
+
classes.push(opt.customClass);
|
|
57
|
+
}
|
|
58
|
+
opt.customClass = classes.join(" ");
|
|
59
|
+
opt.icon = h(MessageBoxIcon, {
|
|
60
|
+
type: opt.type,
|
|
61
|
+
icon: opt.icon,
|
|
62
|
+
boxId: msgId,
|
|
63
|
+
onBoxDestroy: (boxId) => {
|
|
64
|
+
boxId && instances.delete(boxId);
|
|
65
|
+
},
|
|
66
|
+
onBoxMounted: ({ boxId, doClose }) => {
|
|
67
|
+
boxId && instances.set(boxId, doClose);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
44
70
|
return omit(opt, ["inner"]);
|
|
45
71
|
};
|
|
46
72
|
const messageBox = function(options) {
|