vue-devui 1.0.0-beta.220801 → 1.0.0-beta.220808
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/alert/index.umd.js +1 -1
- package/auto-complete/index.es.js +90 -81
- package/auto-complete/index.umd.js +24 -13
- package/auto-complete/style.css +1 -1
- package/avatar/index.umd.js +1 -1
- package/badge/index.umd.js +1 -1
- package/button/index.es.js +21 -42
- package/button/index.umd.js +9 -9
- package/button/style.css +1 -1
- package/card/index.umd.js +1 -1
- package/checkbox/index.es.js +94 -77
- package/checkbox/index.umd.js +26 -15
- package/collapse/index.es.js +3 -21
- package/collapse/index.umd.js +1 -1
- package/countdown/index.umd.js +1 -1
- package/date-picker-pro/index.es.js +131 -114
- package/date-picker-pro/index.umd.js +23 -12
- package/date-picker-pro/style.css +1 -1
- package/drawer/index.es.js +4 -17
- package/drawer/index.umd.js +1 -1
- package/dropdown/index.es.js +4 -22
- package/dropdown/index.umd.js +1 -1
- package/editable-select/index.es.js +15 -38
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +85 -71
- package/form/index.umd.js +22 -11
- package/fullscreen/index.umd.js +1 -1
- package/grid/index.es.js +7 -20
- package/grid/index.umd.js +1 -1
- package/icon/index.umd.js +1 -1
- package/image-preview/index.es.js +12 -23
- package/image-preview/index.umd.js +1 -1
- package/input/index.es.js +86 -72
- package/input/index.umd.js +24 -13
- package/input-number/index.es.js +1 -16
- package/input-number/index.umd.js +1 -1
- package/layout/index.umd.js +1 -1
- package/loading/index.es.js +15 -38
- package/loading/index.umd.js +1 -1
- package/loading/style.css +1 -1
- package/mention/index.es.js +82 -66
- package/mention/index.umd.js +25 -14
- package/menu/index.es.js +144 -123
- package/menu/index.umd.js +1 -1
- package/menu/style.css +1 -1
- package/message/index.es.js +29 -34
- package/message/index.umd.js +1 -1
- package/modal/index.es.js +12 -44
- package/modal/index.umd.js +1 -1
- package/notification/index.es.js +4 -21
- package/notification/index.umd.js +1 -1
- package/overlay/index.es.js +1 -1
- package/overlay/index.umd.js +1 -1
- package/package.json +1 -1
- package/pagination/index.umd.js +1 -1
- package/panel/index.umd.js +1 -1
- package/popover/index.es.js +1 -1
- package/popover/index.umd.js +4 -4
- package/progress/index.umd.js +3 -3
- package/radio/index.es.js +91 -75
- package/radio/index.umd.js +27 -16
- package/radio/style.css +1 -1
- package/rate/index.umd.js +1 -1
- package/result/index.umd.js +1 -1
- package/ripple/index.es.js +5 -18
- package/ripple/index.umd.js +1 -1
- package/search/index.es.js +86 -72
- package/search/index.umd.js +26 -15
- package/select/index.es.js +104 -83
- package/select/index.umd.js +26 -15
- package/select/style.css +1 -1
- package/skeleton/index.umd.js +1 -1
- package/slider/index.umd.js +1 -1
- package/splitter/index.es.js +22 -29
- package/splitter/index.umd.js +9 -9
- package/statistic/index.es.js +0 -21
- package/statistic/index.umd.js +1 -1
- package/status/index.umd.js +1 -1
- package/steps/index.umd.js +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +85 -71
- package/switch/index.umd.js +25 -14
- package/switch/style.css +1 -1
- package/table/index.es.js +106 -91
- package/table/index.umd.js +21 -10
- package/table/style.css +1 -1
- package/tabs/index.umd.js +1 -1
- package/tag/index.umd.js +1 -1
- package/textarea/index.es.js +88 -72
- package/textarea/index.umd.js +26 -15
- package/time-picker/index.es.js +97 -88
- package/time-picker/index.umd.js +25 -14
- package/time-picker/style.css +1 -1
- package/time-select/index.es.js +104 -83
- package/time-select/index.umd.js +25 -14
- package/time-select/style.css +1 -1
- package/timeline/index.umd.js +1 -1
- package/tooltip/index.es.js +1 -1
- package/tooltip/index.umd.js +4 -4
- package/tree/index.es.js +132 -104
- package/tree/index.umd.js +26 -15
- package/tree/style.css +1 -1
- package/upload/index.es.js +5 -47
- package/upload/index.umd.js +1 -1
- package/vue-devui.es.js +413 -354
- package/vue-devui.umd.js +32 -21
package/vue-devui.es.js
CHANGED
|
@@ -1,39 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __objRest = (source, exclude) => {
|
|
21
|
-
var target = {};
|
|
22
|
-
for (var prop in source)
|
|
23
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
-
target[prop] = source[prop];
|
|
25
|
-
if (source != null && __getOwnPropSymbols)
|
|
26
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
|
-
var __publicField = (obj, key, value) => {
|
|
33
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
34
|
-
return value;
|
|
35
|
-
};
|
|
36
|
-
import { createVNode, defineComponent, ref, onMounted, Transition, withDirectives, vShow, nextTick, watch, provide, reactive, toRefs, onUnmounted, mergeProps, unref, Comment, Text, h, Fragment, inject, cloneVNode, computed, Teleport, withModifiers, createTextVNode, onBeforeUnmount, render, getCurrentInstance, resolveDirective, resolveDynamicComponent, isVNode, toRef, shallowRef, onBeforeMount, onUpdated, toRaw, watchEffect, renderSlot, useSlots, createApp, resolveComponent, shallowReactive, effect } from "vue";
|
|
1
|
+
import { createVNode, defineComponent, ref, onMounted, Transition, withDirectives, vShow, nextTick, watch, provide, reactive, toRefs, onUnmounted, mergeProps, unref, Comment, Text, Fragment, h, inject, cloneVNode, computed, Teleport, withModifiers, createTextVNode, onBeforeUnmount, render, getCurrentInstance, resolveDirective, resolveDynamicComponent, isVNode, toRef, shallowRef, onBeforeMount, onUpdated, toRaw, watchEffect, renderSlot, useSlots, createApp, resolveComponent, shallowReactive, effect } from "vue";
|
|
37
2
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
38
3
|
import { onClickOutside } from "@vueuse/core";
|
|
39
4
|
const AlertCloseIcon = () => createVNode("svg", {
|
|
@@ -1392,7 +1357,7 @@ var lodash = { exports: {} };
|
|
|
1392
1357
|
var objectCtorString = funcToString2.call(Object2);
|
|
1393
1358
|
var oldDash = root2._;
|
|
1394
1359
|
var reIsNative2 = RegExp2("^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar2, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
1395
|
-
var
|
|
1360
|
+
var Buffer = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined$1, getPrototype2 = overArg2(Object2.getPrototypeOf, Object2), objectCreate2 = Object2.create, propertyIsEnumerable2 = objectProto2.propertyIsEnumerable, splice2 = arrayProto2.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag2 = Symbol2 ? Symbol2.toStringTag : undefined$1;
|
|
1396
1361
|
var defineProperty2 = function() {
|
|
1397
1362
|
try {
|
|
1398
1363
|
var func = getNative2(Object2, "defineProperty");
|
|
@@ -1402,7 +1367,7 @@ var lodash = { exports: {} };
|
|
|
1402
1367
|
}
|
|
1403
1368
|
}();
|
|
1404
1369
|
var ctxClearTimeout = context.clearTimeout !== root2.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root2.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root2.setTimeout && context.setTimeout;
|
|
1405
|
-
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols2 = Object2.getOwnPropertySymbols, nativeIsBuffer =
|
|
1370
|
+
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols2 = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto2.join, nativeKeys2 = overArg2(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto2.reverse;
|
|
1406
1371
|
var DataView2 = getNative2(context, "DataView"), Map2 = getNative2(context, "Map"), Promise2 = getNative2(context, "Promise"), Set2 = getNative2(context, "Set"), WeakMap2 = getNative2(context, "WeakMap"), nativeCreate2 = getNative2(Object2, "create");
|
|
1407
1372
|
var metaMap = WeakMap2 && new WeakMap2();
|
|
1408
1373
|
var realNames = {};
|
|
@@ -2654,7 +2619,7 @@ var lodash = { exports: {} };
|
|
|
2654
2619
|
}
|
|
2655
2620
|
function cloneArrayBuffer2(arrayBuffer) {
|
|
2656
2621
|
var result3 = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
2657
|
-
new
|
|
2622
|
+
new Uint8Array2(result3).set(new Uint8Array2(arrayBuffer));
|
|
2658
2623
|
return result3;
|
|
2659
2624
|
}
|
|
2660
2625
|
function cloneDataView2(dataView, isDeep) {
|
|
@@ -3236,7 +3201,7 @@ var lodash = { exports: {} };
|
|
|
3236
3201
|
object4 = object4.buffer;
|
|
3237
3202
|
other = other.buffer;
|
|
3238
3203
|
case arrayBufferTag2:
|
|
3239
|
-
if (object4.byteLength != other.byteLength || !equalFunc(new
|
|
3204
|
+
if (object4.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object4), new Uint8Array2(other))) {
|
|
3240
3205
|
return false;
|
|
3241
3206
|
}
|
|
3242
3207
|
return true;
|
|
@@ -6115,7 +6080,10 @@ function useFormValidation(itemContexts) {
|
|
|
6115
6080
|
try {
|
|
6116
6081
|
await field.validate("");
|
|
6117
6082
|
} catch (err) {
|
|
6118
|
-
errors =
|
|
6083
|
+
errors = {
|
|
6084
|
+
...errors,
|
|
6085
|
+
...err
|
|
6086
|
+
};
|
|
6119
6087
|
}
|
|
6120
6088
|
}
|
|
6121
6089
|
if (!Object.keys(errors).length) {
|
|
@@ -6172,11 +6140,12 @@ var Form = defineComponent({
|
|
|
6172
6140
|
}, {
|
|
6173
6141
|
deep: true
|
|
6174
6142
|
});
|
|
6175
|
-
provide(FORM_TOKEN, reactive(
|
|
6143
|
+
provide(FORM_TOKEN, reactive({
|
|
6144
|
+
...toRefs(props),
|
|
6176
6145
|
emit: ctx2.emit,
|
|
6177
6146
|
addItemContext,
|
|
6178
6147
|
removeItemContext
|
|
6179
|
-
}))
|
|
6148
|
+
}));
|
|
6180
6149
|
ctx2.expose({
|
|
6181
6150
|
validate,
|
|
6182
6151
|
validateFields,
|
|
@@ -7083,7 +7052,7 @@ var FormControl = defineComponent({
|
|
|
7083
7052
|
}
|
|
7084
7053
|
});
|
|
7085
7054
|
function _extends() {
|
|
7086
|
-
_extends = Object.assign
|
|
7055
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
7087
7056
|
for (var i = 1; i < arguments.length; i++) {
|
|
7088
7057
|
var source = arguments[i];
|
|
7089
7058
|
for (var key in source) {
|
|
@@ -7102,13 +7071,13 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
7102
7071
|
_setPrototypeOf(subClass, superClass);
|
|
7103
7072
|
}
|
|
7104
7073
|
function _getPrototypeOf(o) {
|
|
7105
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
|
|
7074
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
|
|
7106
7075
|
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
7107
7076
|
};
|
|
7108
7077
|
return _getPrototypeOf(o);
|
|
7109
7078
|
}
|
|
7110
7079
|
function _setPrototypeOf(o, p) {
|
|
7111
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
7080
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
|
|
7112
7081
|
o2.__proto__ = p2;
|
|
7113
7082
|
return o2;
|
|
7114
7083
|
};
|
|
@@ -7131,7 +7100,7 @@ function _isNativeReflectConstruct() {
|
|
|
7131
7100
|
}
|
|
7132
7101
|
function _construct(Parent, args, Class) {
|
|
7133
7102
|
if (_isNativeReflectConstruct()) {
|
|
7134
|
-
_construct = Reflect.construct;
|
|
7103
|
+
_construct = Reflect.construct.bind();
|
|
7135
7104
|
} else {
|
|
7136
7105
|
_construct = function _construct2(Parent2, args2, Class2) {
|
|
7137
7106
|
var a = [null];
|
|
@@ -7409,9 +7378,45 @@ var whitespace = function whitespace2(rule, value, source, errors, options) {
|
|
|
7409
7378
|
errors.push(format(options.messages.whitespace, rule.fullField));
|
|
7410
7379
|
}
|
|
7411
7380
|
};
|
|
7381
|
+
var urlReg;
|
|
7382
|
+
var getUrlRegex = function() {
|
|
7383
|
+
if (urlReg) {
|
|
7384
|
+
return urlReg;
|
|
7385
|
+
}
|
|
7386
|
+
var word = "[a-fA-F\\d:]";
|
|
7387
|
+
var b = function b2(options) {
|
|
7388
|
+
return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
|
|
7389
|
+
};
|
|
7390
|
+
var v4 = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}";
|
|
7391
|
+
var v6seg = "[a-fA-F\\d]{1,4}";
|
|
7392
|
+
var v6 = ("\n(?:\n(?:" + v6seg + ":){7}(?:" + v6seg + "|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:" + v6seg + ":){6}(?:" + v4 + "|:" + v6seg + "|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:" + v6seg + ":){5}(?::" + v4 + "|(?::" + v6seg + "){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:" + v6seg + ":){4}(?:(?::" + v6seg + "){0,1}:" + v4 + "|(?::" + v6seg + "){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:" + v6seg + ":){3}(?:(?::" + v6seg + "){0,2}:" + v4 + "|(?::" + v6seg + "){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:" + v6seg + ":){2}(?:(?::" + v6seg + "){0,3}:" + v4 + "|(?::" + v6seg + "){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:" + v6seg + ":){1}(?:(?::" + v6seg + "){0,4}:" + v4 + "|(?::" + v6seg + "){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::" + v6seg + "){0,5}:" + v4 + "|(?::" + v6seg + "){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim();
|
|
7393
|
+
var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)");
|
|
7394
|
+
var v4exact = new RegExp("^" + v4 + "$");
|
|
7395
|
+
var v6exact = new RegExp("^" + v6 + "$");
|
|
7396
|
+
var ip = function ip2(options) {
|
|
7397
|
+
return options && options.exact ? v46Exact : new RegExp("(?:" + b(options) + v4 + b(options) + ")|(?:" + b(options) + v6 + b(options) + ")", "g");
|
|
7398
|
+
};
|
|
7399
|
+
ip.v4 = function(options) {
|
|
7400
|
+
return options && options.exact ? v4exact : new RegExp("" + b(options) + v4 + b(options), "g");
|
|
7401
|
+
};
|
|
7402
|
+
ip.v6 = function(options) {
|
|
7403
|
+
return options && options.exact ? v6exact : new RegExp("" + b(options) + v6 + b(options), "g");
|
|
7404
|
+
};
|
|
7405
|
+
var protocol = "(?:(?:[a-z]+:)?//)";
|
|
7406
|
+
var auth = "(?:\\S+(?::\\S*)?@)?";
|
|
7407
|
+
var ipv4 = ip.v4().source;
|
|
7408
|
+
var ipv6 = ip.v6().source;
|
|
7409
|
+
var host = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)";
|
|
7410
|
+
var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*";
|
|
7411
|
+
var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";
|
|
7412
|
+
var port = "(?::\\d{2,5})?";
|
|
7413
|
+
var path = '(?:[/?#][^\\s"]*)?';
|
|
7414
|
+
var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|" + host + domain + tld + ")" + port + path;
|
|
7415
|
+
urlReg = new RegExp("(?:^" + regex + "$)", "i");
|
|
7416
|
+
return urlReg;
|
|
7417
|
+
};
|
|
7412
7418
|
var pattern$2 = {
|
|
7413
7419
|
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
|
|
7414
|
-
url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", "i"),
|
|
7415
7420
|
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
7416
7421
|
};
|
|
7417
7422
|
var types = {
|
|
@@ -7453,7 +7458,7 @@ var types = {
|
|
|
7453
7458
|
return typeof value === "string" && value.length <= 320 && !!value.match(pattern$2.email);
|
|
7454
7459
|
},
|
|
7455
7460
|
url: function url(value) {
|
|
7456
|
-
return typeof value === "string" && value.length <= 2048 && !!value.match(
|
|
7461
|
+
return typeof value === "string" && value.length <= 2048 && !!value.match(getUrlRegex());
|
|
7457
7462
|
},
|
|
7458
7463
|
hex: function hex(value) {
|
|
7459
7464
|
return typeof value === "string" && !!value.match(pattern$2.hex);
|
|
@@ -8028,7 +8033,17 @@ var Schema = /* @__PURE__ */ function() {
|
|
|
8028
8033
|
if (rule.asyncValidator) {
|
|
8029
8034
|
res = rule.asyncValidator(rule, data.value, cb, data.source, options);
|
|
8030
8035
|
} else if (rule.validator) {
|
|
8031
|
-
|
|
8036
|
+
try {
|
|
8037
|
+
res = rule.validator(rule, data.value, cb, data.source, options);
|
|
8038
|
+
} catch (error2) {
|
|
8039
|
+
console.error == null ? void 0 : console.error(error2);
|
|
8040
|
+
if (!options.suppressValidatorError) {
|
|
8041
|
+
setTimeout(function() {
|
|
8042
|
+
throw error2;
|
|
8043
|
+
}, 0);
|
|
8044
|
+
}
|
|
8045
|
+
cb(error2.message);
|
|
8046
|
+
}
|
|
8032
8047
|
if (res === true) {
|
|
8033
8048
|
cb();
|
|
8034
8049
|
} else if (res === false) {
|
|
@@ -8149,10 +8164,7 @@ function useFormItemValidate(props, _rules) {
|
|
|
8149
8164
|
} else {
|
|
8150
8165
|
return rule.trigger === triggerVal;
|
|
8151
8166
|
}
|
|
8152
|
-
}).map((
|
|
8153
|
-
var rule = __objRest(_a, []);
|
|
8154
|
-
return rule;
|
|
8155
|
-
});
|
|
8167
|
+
}).map(({ ...rule }) => rule);
|
|
8156
8168
|
};
|
|
8157
8169
|
const onValidateSuccess = () => {
|
|
8158
8170
|
validateState.value = "success";
|
|
@@ -8225,15 +8237,12 @@ var FormItem = defineComponent({
|
|
|
8225
8237
|
props: formItemProps,
|
|
8226
8238
|
setup(props, ctx2) {
|
|
8227
8239
|
const formContext = inject(FORM_TOKEN);
|
|
8228
|
-
const
|
|
8240
|
+
const {
|
|
8229
8241
|
messageType: itemMessageType,
|
|
8230
8242
|
popPosition: itemPopPosition,
|
|
8231
|
-
showFeedback: itemShowFeedback
|
|
8232
|
-
|
|
8233
|
-
|
|
8234
|
-
"popPosition",
|
|
8235
|
-
"showFeedback"
|
|
8236
|
-
]);
|
|
8243
|
+
showFeedback: itemShowFeedback,
|
|
8244
|
+
...otherProps
|
|
8245
|
+
} = toRefs(props);
|
|
8237
8246
|
const {
|
|
8238
8247
|
label,
|
|
8239
8248
|
helpTips,
|
|
@@ -8263,7 +8272,8 @@ var FormItem = defineComponent({
|
|
|
8263
8272
|
labelAlign: formContext.labelAlign
|
|
8264
8273
|
}));
|
|
8265
8274
|
provide(LABEL_DATA, labelData);
|
|
8266
|
-
const context = reactive(
|
|
8275
|
+
const context = reactive({
|
|
8276
|
+
...otherProps,
|
|
8267
8277
|
showFeedback,
|
|
8268
8278
|
messageType,
|
|
8269
8279
|
popPosition,
|
|
@@ -8273,7 +8283,7 @@ var FormItem = defineComponent({
|
|
|
8273
8283
|
validate,
|
|
8274
8284
|
resetField,
|
|
8275
8285
|
clearValidate
|
|
8276
|
-
})
|
|
8286
|
+
});
|
|
8277
8287
|
provide(FORM_ITEM_TOKEN, context);
|
|
8278
8288
|
ctx2.expose({
|
|
8279
8289
|
resetField,
|
|
@@ -8298,8 +8308,8 @@ var FormItem = defineComponent({
|
|
|
8298
8308
|
"extra-info": extraInfo.value
|
|
8299
8309
|
}, {
|
|
8300
8310
|
default: () => {
|
|
8301
|
-
var
|
|
8302
|
-
return [(_b = (
|
|
8311
|
+
var _a, _b;
|
|
8312
|
+
return [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a)];
|
|
8303
8313
|
}
|
|
8304
8314
|
})]);
|
|
8305
8315
|
}
|
|
@@ -8384,8 +8394,8 @@ function useAutoCompleteRender(props, ctx2, visible, isFocus, isDisabled, autoCo
|
|
|
8384
8394
|
}
|
|
8385
8395
|
class View {
|
|
8386
8396
|
constructor() {
|
|
8387
|
-
|
|
8388
|
-
|
|
8397
|
+
this.top = "50%";
|
|
8398
|
+
this.left = "50%";
|
|
8389
8399
|
}
|
|
8390
8400
|
}
|
|
8391
8401
|
const loadingProps = {
|
|
@@ -8403,13 +8413,9 @@ const loadingProps = {
|
|
|
8403
8413
|
};
|
|
8404
8414
|
class LoadingOptions {
|
|
8405
8415
|
constructor() {
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
__publicField(this, "backdrop", true);
|
|
8410
|
-
__publicField(this, "positionType", "relative");
|
|
8411
|
-
__publicField(this, "view", new View());
|
|
8412
|
-
__publicField(this, "zIndex");
|
|
8416
|
+
this.backdrop = true;
|
|
8417
|
+
this.positionType = "relative";
|
|
8418
|
+
this.view = new View();
|
|
8413
8419
|
}
|
|
8414
8420
|
}
|
|
8415
8421
|
var loading$1 = "";
|
|
@@ -8477,7 +8483,7 @@ var Loading = defineComponent({
|
|
|
8477
8483
|
});
|
|
8478
8484
|
const COMPONENT_CONTAINER_SYMBOL = Symbol("dev_component_container");
|
|
8479
8485
|
function createComponent$1(component, props, children = null) {
|
|
8480
|
-
const vnode = h(component,
|
|
8486
|
+
const vnode = h(component, { ...props }, children);
|
|
8481
8487
|
const container = document.createElement("div");
|
|
8482
8488
|
vnode[COMPONENT_CONTAINER_SYMBOL] = container;
|
|
8483
8489
|
render(vnode, container);
|
|
@@ -8564,9 +8570,12 @@ const removeAttribute = (el) => {
|
|
|
8564
8570
|
};
|
|
8565
8571
|
const handleProps = (el, vprops) => {
|
|
8566
8572
|
var _a;
|
|
8567
|
-
const props =
|
|
8573
|
+
const props = {
|
|
8574
|
+
...new LoadingOptions(),
|
|
8575
|
+
...vprops
|
|
8576
|
+
};
|
|
8568
8577
|
const loadingTemplateRef = props.loadingTemplateRef;
|
|
8569
|
-
const loadingInstance = createComponent$1(loadingConstructor$1,
|
|
8578
|
+
const loadingInstance = createComponent$1(loadingConstructor$1, { ...props }, loadingTemplateRef ? () => loadingTemplateRef : null);
|
|
8570
8579
|
el.style.position = props.positionType;
|
|
8571
8580
|
el.options = props;
|
|
8572
8581
|
el.instance = loadingInstance;
|
|
@@ -9896,7 +9905,8 @@ const commonProps$1 = {
|
|
|
9896
9905
|
default: "md"
|
|
9897
9906
|
}
|
|
9898
9907
|
};
|
|
9899
|
-
const checkboxProps =
|
|
9908
|
+
const checkboxProps = {
|
|
9909
|
+
...commonProps$1,
|
|
9900
9910
|
checked: {
|
|
9901
9911
|
type: Boolean,
|
|
9902
9912
|
default: false
|
|
@@ -9926,8 +9936,9 @@ const checkboxProps = __spreadProps(__spreadValues({}, commonProps$1), {
|
|
|
9926
9936
|
type: Boolean,
|
|
9927
9937
|
default: false
|
|
9928
9938
|
}
|
|
9929
|
-
}
|
|
9930
|
-
const checkboxGroupProps =
|
|
9939
|
+
};
|
|
9940
|
+
const checkboxGroupProps = {
|
|
9941
|
+
...commonProps$1,
|
|
9931
9942
|
modelValue: {
|
|
9932
9943
|
type: Array,
|
|
9933
9944
|
required: true
|
|
@@ -9964,7 +9975,7 @@ const checkboxGroupProps = __spreadProps(__spreadValues({}, commonProps$1), {
|
|
|
9964
9975
|
type: String,
|
|
9965
9976
|
default: ""
|
|
9966
9977
|
}
|
|
9967
|
-
}
|
|
9978
|
+
};
|
|
9968
9979
|
const checkboxGroupInjectionKey = Symbol("d-checkbox-group");
|
|
9969
9980
|
function useCheckbox(props, ctx2) {
|
|
9970
9981
|
const formContext = inject(FORM_TOKEN, void 0);
|
|
@@ -10240,9 +10251,10 @@ var CheckboxGroup = defineComponent({
|
|
|
10240
10251
|
value: opt
|
|
10241
10252
|
});
|
|
10242
10253
|
} else if (typeof opt === "object") {
|
|
10243
|
-
mergedOpt = Object.assign({}, defaultOpt,
|
|
10254
|
+
mergedOpt = Object.assign({}, defaultOpt, {
|
|
10255
|
+
...opt,
|
|
10244
10256
|
label: opt.name
|
|
10245
|
-
})
|
|
10257
|
+
});
|
|
10246
10258
|
}
|
|
10247
10259
|
return createVNode(Checkbox, mergedOpt, null);
|
|
10248
10260
|
});
|
|
@@ -10383,9 +10395,10 @@ var Collapse = defineComponent({
|
|
|
10383
10395
|
ctx2.emit("change", activeLists);
|
|
10384
10396
|
}
|
|
10385
10397
|
};
|
|
10386
|
-
provide(SELECT_TOKEN$1, reactive(
|
|
10398
|
+
provide(SELECT_TOKEN$1, reactive({
|
|
10399
|
+
...toRefs(props),
|
|
10387
10400
|
collapseItemClick
|
|
10388
|
-
}))
|
|
10401
|
+
}));
|
|
10389
10402
|
return () => {
|
|
10390
10403
|
var _a, _b;
|
|
10391
10404
|
return createVNode("div", {
|
|
@@ -10734,7 +10747,7 @@ const datePickerProCommonProps = {
|
|
|
10734
10747
|
default: "date"
|
|
10735
10748
|
}
|
|
10736
10749
|
};
|
|
10737
|
-
const datePickerProProps =
|
|
10750
|
+
const datePickerProProps = {
|
|
10738
10751
|
modelValue: {
|
|
10739
10752
|
type: [Date, String],
|
|
10740
10753
|
default: ""
|
|
@@ -10742,9 +10755,10 @@ const datePickerProProps = __spreadValues({
|
|
|
10742
10755
|
placeholder: {
|
|
10743
10756
|
type: String,
|
|
10744
10757
|
default: ""
|
|
10745
|
-
}
|
|
10746
|
-
|
|
10747
|
-
|
|
10758
|
+
},
|
|
10759
|
+
...datePickerProCommonProps
|
|
10760
|
+
};
|
|
10761
|
+
const datePickerProPanelProps = {
|
|
10748
10762
|
visible: {
|
|
10749
10763
|
type: Boolean,
|
|
10750
10764
|
default: false
|
|
@@ -10759,8 +10773,9 @@ const datePickerProPanelProps = __spreadValues({
|
|
|
10759
10773
|
focusType: {
|
|
10760
10774
|
type: String,
|
|
10761
10775
|
default: "start"
|
|
10762
|
-
}
|
|
10763
|
-
|
|
10776
|
+
},
|
|
10777
|
+
...datePickerProCommonProps
|
|
10778
|
+
};
|
|
10764
10779
|
const timerPickerPanelProps = {
|
|
10765
10780
|
visible: {
|
|
10766
10781
|
type: Boolean,
|
|
@@ -10792,7 +10807,7 @@ var dayjs_min = { exports: {} };
|
|
|
10792
10807
|
}, p: function(t2) {
|
|
10793
10808
|
return { M: f, y: c, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: h2 }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
|
|
10794
10809
|
}, u: function(t2) {
|
|
10795
|
-
return
|
|
10810
|
+
return void 0 === t2;
|
|
10796
10811
|
} }, v = "en", D = {};
|
|
10797
10812
|
D[v] = M;
|
|
10798
10813
|
var p = function(t2) {
|
|
@@ -10801,7 +10816,7 @@ var dayjs_min = { exports: {} };
|
|
|
10801
10816
|
var i2;
|
|
10802
10817
|
if (!e2)
|
|
10803
10818
|
return v;
|
|
10804
|
-
if (typeof e2
|
|
10819
|
+
if ("string" == typeof e2) {
|
|
10805
10820
|
var s2 = e2.toLowerCase();
|
|
10806
10821
|
D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
|
|
10807
10822
|
var u2 = e2.split("-");
|
|
@@ -10815,7 +10830,7 @@ var dayjs_min = { exports: {} };
|
|
|
10815
10830
|
}, w = function(t2, e2) {
|
|
10816
10831
|
if (p(t2))
|
|
10817
10832
|
return t2.clone();
|
|
10818
|
-
var n2 = typeof e2
|
|
10833
|
+
var n2 = "object" == typeof e2 ? e2 : {};
|
|
10819
10834
|
return n2.date = t2, n2.args = arguments, new _(n2);
|
|
10820
10835
|
}, O = g;
|
|
10821
10836
|
O.l = S, O.i = p, O.w = function(t2, e2) {
|
|
@@ -10829,13 +10844,13 @@ var dayjs_min = { exports: {} };
|
|
|
10829
10844
|
return m2.parse = function(t2) {
|
|
10830
10845
|
this.$d = function(t3) {
|
|
10831
10846
|
var e2 = t3.date, n2 = t3.utc;
|
|
10832
|
-
if (
|
|
10847
|
+
if (null === e2)
|
|
10833
10848
|
return new Date(NaN);
|
|
10834
10849
|
if (O.u(e2))
|
|
10835
10850
|
return new Date();
|
|
10836
10851
|
if (e2 instanceof Date)
|
|
10837
10852
|
return new Date(e2);
|
|
10838
|
-
if (typeof e2
|
|
10853
|
+
if ("string" == typeof e2 && !/Z$/i.test(e2)) {
|
|
10839
10854
|
var r2 = e2.match(l);
|
|
10840
10855
|
if (r2) {
|
|
10841
10856
|
var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
|
|
@@ -10977,6 +10992,17 @@ var dayjs_min = { exports: {} };
|
|
|
10977
10992
|
});
|
|
10978
10993
|
})(dayjs_min);
|
|
10979
10994
|
var dayjs = dayjs_min.exports;
|
|
10995
|
+
const DAY_DURATION = 24 * 60 * 60 * 1e3;
|
|
10996
|
+
const yearItemHeight = 30;
|
|
10997
|
+
const calendarItemHeight = 186;
|
|
10998
|
+
const yearListHeight = 305;
|
|
10999
|
+
const calendarListHeight = 270;
|
|
11000
|
+
const monthPickerHeight = 300;
|
|
11001
|
+
const monthCalendarItemHeight = 186;
|
|
11002
|
+
const yearPickerHeight = 186;
|
|
11003
|
+
const yearCalendarItemHeight = 48;
|
|
11004
|
+
const DEFAULT_DATE = "YYYY/MM/DD";
|
|
11005
|
+
const DEFAULT_TIME = `${DEFAULT_DATE} HH:mm:ss`;
|
|
10980
11006
|
const formatDayjsToStr = (date4, format2, type4) => {
|
|
10981
11007
|
if (!date4) {
|
|
10982
11008
|
return null;
|
|
@@ -10987,7 +11013,7 @@ const formatDayjsToStr = (date4, format2, type4) => {
|
|
|
10987
11013
|
const month = date4.month() + 1 < 10 ? "0" + (date4.month() + 1) : date4.month() + 1;
|
|
10988
11014
|
return `${date4.year()}-${month}`;
|
|
10989
11015
|
} else {
|
|
10990
|
-
return date4.format(format2);
|
|
11016
|
+
return dayjs(date4.format(format2)).isValid() ? date4.format(format2) : date4.format(DEFAULT_DATE);
|
|
10991
11017
|
}
|
|
10992
11018
|
};
|
|
10993
11019
|
const isDateEquals = (pre, cur) => {
|
|
@@ -11033,7 +11059,7 @@ function usePickerPro(props, ctx2, t) {
|
|
|
11033
11059
|
ctx2.emit("focus", e);
|
|
11034
11060
|
};
|
|
11035
11061
|
const format2 = computed(() => {
|
|
11036
|
-
return props.showTime ? props.format ||
|
|
11062
|
+
return props.showTime ? props.format || DEFAULT_TIME : props.format || DEFAULT_DATE;
|
|
11037
11063
|
});
|
|
11038
11064
|
const dateValue = computed(() => {
|
|
11039
11065
|
let result2;
|
|
@@ -11150,7 +11176,7 @@ function useInputRender(props, ctx2) {
|
|
|
11150
11176
|
const slots = ctx2.slots;
|
|
11151
11177
|
const inputDisabled = computed(() => disabled.value || (formContext == null ? void 0 : formContext.disabled));
|
|
11152
11178
|
const inputSize = computed(() => (size == null ? void 0 : size.value) || (formContext == null ? void 0 : formContext.size) || "");
|
|
11153
|
-
const
|
|
11179
|
+
const { style, class: customClass, ...otherAttrs } = ctx2.attrs;
|
|
11154
11180
|
const customStyle = { style };
|
|
11155
11181
|
const wrapClasses = computed(() => ({
|
|
11156
11182
|
[ns2.e("wrapper")]: true,
|
|
@@ -11329,15 +11355,6 @@ var InputInstall = {
|
|
|
11329
11355
|
app.component(DInput.name, DInput);
|
|
11330
11356
|
}
|
|
11331
11357
|
};
|
|
11332
|
-
const DAY_DURATION = 24 * 60 * 60 * 1e3;
|
|
11333
|
-
const yearItemHeight = 30;
|
|
11334
|
-
const calendarItemHeight = 186;
|
|
11335
|
-
const yearListHeight = 305;
|
|
11336
|
-
const calendarListHeight = 270;
|
|
11337
|
-
const monthPickerHeight = 300;
|
|
11338
|
-
const monthCalendarItemHeight = 186;
|
|
11339
|
-
const yearPickerHeight = 186;
|
|
11340
|
-
const yearCalendarItemHeight = 48;
|
|
11341
11358
|
function useCalendarSelected(props, ctx2) {
|
|
11342
11359
|
const today = ref(new Date());
|
|
11343
11360
|
const calendarRange = ref([]);
|
|
@@ -12037,10 +12054,11 @@ var ResizeObserver$1 = defineComponent({
|
|
|
12037
12054
|
Object.assign(state, size);
|
|
12038
12055
|
if (onResize) {
|
|
12039
12056
|
Promise.resolve().then(() => {
|
|
12040
|
-
onResize(
|
|
12057
|
+
onResize({
|
|
12058
|
+
...size,
|
|
12041
12059
|
offsetWidth,
|
|
12042
12060
|
offsetHeight
|
|
12043
|
-
}
|
|
12061
|
+
}, target);
|
|
12044
12062
|
});
|
|
12045
12063
|
}
|
|
12046
12064
|
}
|
|
@@ -12103,13 +12121,14 @@ var ResizeObserverContainer = defineComponent({
|
|
|
12103
12121
|
position: "relative",
|
|
12104
12122
|
overflow: "hidden"
|
|
12105
12123
|
};
|
|
12106
|
-
innerStyle.value =
|
|
12124
|
+
innerStyle.value = {
|
|
12125
|
+
...innerStyle.value,
|
|
12107
12126
|
transform: `translateY(${offset2.value}px)`,
|
|
12108
12127
|
position: "absolute",
|
|
12109
12128
|
left: 0,
|
|
12110
12129
|
right: 0,
|
|
12111
12130
|
top: 0
|
|
12112
|
-
}
|
|
12131
|
+
};
|
|
12113
12132
|
}
|
|
12114
12133
|
}, {
|
|
12115
12134
|
immediate: true
|
|
@@ -12597,9 +12616,10 @@ var VirtualList = defineComponent({
|
|
|
12597
12616
|
const componentStyle = computed(() => {
|
|
12598
12617
|
let cs = null;
|
|
12599
12618
|
if (props.height) {
|
|
12600
|
-
cs =
|
|
12601
|
-
maxHeight: isVirtual.value ? props.height + "px" : void 0
|
|
12602
|
-
|
|
12619
|
+
cs = {
|
|
12620
|
+
maxHeight: isVirtual.value ? props.height + "px" : void 0,
|
|
12621
|
+
...ScrollStyle
|
|
12622
|
+
};
|
|
12603
12623
|
if (isVirtual.value) {
|
|
12604
12624
|
cs.overflowY = "hidden";
|
|
12605
12625
|
if (state.scrollMoving) {
|
|
@@ -14081,7 +14101,7 @@ var DatePickerPro = defineComponent({
|
|
|
14081
14101
|
};
|
|
14082
14102
|
}
|
|
14083
14103
|
});
|
|
14084
|
-
const rangeDatePickerProProps =
|
|
14104
|
+
const rangeDatePickerProProps = {
|
|
14085
14105
|
modelValue: {
|
|
14086
14106
|
type: Array,
|
|
14087
14107
|
default: ["", ""]
|
|
@@ -14093,8 +14113,9 @@ const rangeDatePickerProProps = __spreadValues({
|
|
|
14093
14113
|
separator: {
|
|
14094
14114
|
type: String,
|
|
14095
14115
|
default: "-"
|
|
14096
|
-
}
|
|
14097
|
-
|
|
14116
|
+
},
|
|
14117
|
+
...datePickerProCommonProps
|
|
14118
|
+
};
|
|
14098
14119
|
function useRangePickerPro(props, ctx2) {
|
|
14099
14120
|
const formContext = inject(FORM_TOKEN, void 0);
|
|
14100
14121
|
const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
|
|
@@ -14521,7 +14542,10 @@ function initInstance$2(state) {
|
|
|
14521
14542
|
}
|
|
14522
14543
|
class DrawerService {
|
|
14523
14544
|
open(options) {
|
|
14524
|
-
const state = reactive(
|
|
14545
|
+
const state = reactive({
|
|
14546
|
+
...defaultOptions$2,
|
|
14547
|
+
...options
|
|
14548
|
+
});
|
|
14525
14549
|
const app = initInstance$2(state);
|
|
14526
14550
|
state.modelValue = true;
|
|
14527
14551
|
return {
|
|
@@ -14701,13 +14725,14 @@ function useDropdown(id, visible, isOpen, origin, dropdownRef, popDirection, emi
|
|
|
14701
14725
|
watch([isOpen, dropdownRef], ([isOpenVal, dropdownEl]) => {
|
|
14702
14726
|
var _a;
|
|
14703
14727
|
if (isOpenVal) {
|
|
14704
|
-
dropdownMap.set(id,
|
|
14728
|
+
dropdownMap.set(id, {
|
|
14729
|
+
...dropdownMap.get(id),
|
|
14705
14730
|
menuEl: dropdownEl,
|
|
14706
14731
|
toggle: () => {
|
|
14707
14732
|
isOpen.value = false;
|
|
14708
14733
|
emit("toggle", isOpen.value);
|
|
14709
14734
|
}
|
|
14710
|
-
})
|
|
14735
|
+
});
|
|
14711
14736
|
for (const value of dropdownMap.values()) {
|
|
14712
14737
|
if ((_a = value.menuEl) == null ? void 0 : _a.contains(origin.value)) {
|
|
14713
14738
|
value.child = dropdownEl;
|
|
@@ -15004,10 +15029,11 @@ function useSelect$2(props) {
|
|
|
15004
15029
|
return props.options.map((option2) => {
|
|
15005
15030
|
let res;
|
|
15006
15031
|
if (option2 !== "null" && typeof option2 === "object") {
|
|
15007
|
-
res =
|
|
15032
|
+
res = {
|
|
15033
|
+
...option2,
|
|
15008
15034
|
label: option2.label || "",
|
|
15009
15035
|
value: option2.value !== void 0 ? option2.value : option2.label || ""
|
|
15010
|
-
}
|
|
15036
|
+
};
|
|
15011
15037
|
} else {
|
|
15012
15038
|
res = {
|
|
15013
15039
|
label: String(option2),
|
|
@@ -15496,7 +15522,7 @@ const screenSizes = {
|
|
|
15496
15522
|
xl: screenSizesProp,
|
|
15497
15523
|
xxl: screenSizesProp
|
|
15498
15524
|
};
|
|
15499
|
-
const colProps =
|
|
15525
|
+
const colProps = { ...colPropsBaseStyle, ...colPropsBaseClass, ...screenSizes };
|
|
15500
15526
|
const RESULT_SCREEN = ["xxl", "xl", "lg", "md", "sm", "xs"];
|
|
15501
15527
|
const screenMedias = {
|
|
15502
15528
|
xs: "screen and (max-width: 575px)",
|
|
@@ -15512,7 +15538,7 @@ const screen = {};
|
|
|
15512
15538
|
const results = {};
|
|
15513
15539
|
function dispatch() {
|
|
15514
15540
|
subscribers.forEach((value) => {
|
|
15515
|
-
value(
|
|
15541
|
+
value({ ...screen });
|
|
15516
15542
|
});
|
|
15517
15543
|
}
|
|
15518
15544
|
function register2() {
|
|
@@ -15539,7 +15565,7 @@ function responesScreen(func) {
|
|
|
15539
15565
|
}
|
|
15540
15566
|
subUid += 1;
|
|
15541
15567
|
subscribers.set(subUid, func);
|
|
15542
|
-
func(
|
|
15568
|
+
func({ ...screen });
|
|
15543
15569
|
return subUid;
|
|
15544
15570
|
}
|
|
15545
15571
|
function unRegister() {
|
|
@@ -15687,7 +15713,10 @@ var Col = defineComponent({
|
|
|
15687
15713
|
var _a;
|
|
15688
15714
|
return createVNode("div", {
|
|
15689
15715
|
"class": [ns2.b(), colClassNames.value, sizeClassNames.value],
|
|
15690
|
-
"style":
|
|
15716
|
+
"style": {
|
|
15717
|
+
...colStyle.value,
|
|
15718
|
+
...gutterStyle == null ? void 0 : gutterStyle.value
|
|
15719
|
+
}
|
|
15691
15720
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
15692
15721
|
};
|
|
15693
15722
|
}
|
|
@@ -15723,20 +15752,15 @@ const imagePreviewProps = {
|
|
|
15723
15752
|
};
|
|
15724
15753
|
class Transform {
|
|
15725
15754
|
constructor(el, options = {}) {
|
|
15726
|
-
|
|
15727
|
-
|
|
15728
|
-
|
|
15729
|
-
|
|
15730
|
-
|
|
15731
|
-
|
|
15732
|
-
|
|
15733
|
-
|
|
15734
|
-
|
|
15735
|
-
__publicField(this, "MAX_SCALE", 2.5);
|
|
15736
|
-
__publicField(this, "TRANSFORMX", 0);
|
|
15737
|
-
__publicField(this, "TRANSFORMY", 0);
|
|
15738
|
-
__publicField(this, "ZOOM", 1);
|
|
15739
|
-
__publicField(this, "ROTATE", 0);
|
|
15755
|
+
this.oTransformX = 0;
|
|
15756
|
+
this.oTransformY = 0;
|
|
15757
|
+
this.STEP = 0.25;
|
|
15758
|
+
this.MIN_SCALE = 0.2;
|
|
15759
|
+
this.MAX_SCALE = 2.5;
|
|
15760
|
+
this.TRANSFORMX = 0;
|
|
15761
|
+
this.TRANSFORMY = 0;
|
|
15762
|
+
this.ZOOM = 1;
|
|
15763
|
+
this.ROTATE = 0;
|
|
15740
15764
|
this.el = el;
|
|
15741
15765
|
this.transformX = options.transformX || this.TRANSFORMX;
|
|
15742
15766
|
this.transformY = options.transformY || this.TRANSFORMY;
|
|
@@ -16098,9 +16122,9 @@ class ImagePreviewService {
|
|
|
16098
16122
|
this.$div = null;
|
|
16099
16123
|
}
|
|
16100
16124
|
}
|
|
16101
|
-
|
|
16102
|
-
|
|
16103
|
-
|
|
16125
|
+
ImagePreviewService.$body = null;
|
|
16126
|
+
ImagePreviewService.$div = null;
|
|
16127
|
+
ImagePreviewService.$overflow = "";
|
|
16104
16128
|
function mountedPreviewImages(props) {
|
|
16105
16129
|
ImagePreviewService.open({
|
|
16106
16130
|
url: props.url,
|
|
@@ -16327,7 +16351,7 @@ function omit(obj, fields) {
|
|
|
16327
16351
|
}
|
|
16328
16352
|
const ns$f = useNamespace("input-number");
|
|
16329
16353
|
function useRender$1(props, ctx2) {
|
|
16330
|
-
const
|
|
16354
|
+
const { style, class: customClass, ...otherAttrs } = ctx2.attrs;
|
|
16331
16355
|
const customStyle = { style };
|
|
16332
16356
|
const wrapClass = computed(() => [
|
|
16333
16357
|
{
|
|
@@ -16640,10 +16664,11 @@ const loading = {
|
|
|
16640
16664
|
parent.style.position = options.positionType;
|
|
16641
16665
|
}
|
|
16642
16666
|
const isFull = document.body === parent;
|
|
16643
|
-
options =
|
|
16644
|
-
const instance = createComponent$1(loadingConstructor,
|
|
16667
|
+
options = { ...new LoadingOptions(), ...options };
|
|
16668
|
+
const instance = createComponent$1(loadingConstructor, {
|
|
16669
|
+
...options,
|
|
16645
16670
|
isFull
|
|
16646
|
-
}
|
|
16671
|
+
}, options.loadingTemplateRef ? () => options.loadingTemplateRef : null);
|
|
16647
16672
|
cacheTarget.set(parent, instance);
|
|
16648
16673
|
(_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.open();
|
|
16649
16674
|
parent.appendChild((_b = instance == null ? void 0 : instance.proxy) == null ? void 0 : _b.$el);
|
|
@@ -16861,7 +16886,9 @@ function useTextareaAutosize(props, textarea2) {
|
|
|
16861
16886
|
const { autosize } = props;
|
|
16862
16887
|
if (autosize) {
|
|
16863
16888
|
const { minRows, maxRows } = lodash.exports.isObject(autosize) ? autosize : { minRows: void 0, maxRows: void 0 };
|
|
16864
|
-
textareaHeightStyle.value =
|
|
16889
|
+
textareaHeightStyle.value = {
|
|
16890
|
+
...computeTextareaHeight(textarea2.value, minRows, maxRows)
|
|
16891
|
+
};
|
|
16865
16892
|
} else {
|
|
16866
16893
|
textareaHeightStyle.value = {
|
|
16867
16894
|
minHeight: computeTextareaHeight(textarea2.value).minHeight
|
|
@@ -17331,6 +17358,7 @@ var MenuItem = defineComponent({
|
|
|
17331
17358
|
e.stopPropagation();
|
|
17332
17359
|
const ele = e.currentTarget;
|
|
17333
17360
|
let changeRouteResult = void 0;
|
|
17361
|
+
props.disabled && e.preventDefault();
|
|
17334
17362
|
if (!props.disabled) {
|
|
17335
17363
|
if (!multiple) {
|
|
17336
17364
|
clearSelect(ele, e, mode.value === "horizontal");
|
|
@@ -17385,7 +17413,9 @@ var MenuItem = defineComponent({
|
|
|
17385
17413
|
}, [(_b = (_a = ctx2.slots).icon) == null ? void 0 : _b.call(_a)]);
|
|
17386
17414
|
const menuItems = ref(null);
|
|
17387
17415
|
watch(disabled, () => {
|
|
17388
|
-
|
|
17416
|
+
if (!multiple) {
|
|
17417
|
+
classObject.value[menuItemSelect] = false;
|
|
17418
|
+
}
|
|
17389
17419
|
});
|
|
17390
17420
|
watch(() => defaultSelectKey, (n) => {
|
|
17391
17421
|
isSelect.value = initSelect(n, key, multiple, disabled);
|
|
@@ -17471,61 +17501,12 @@ var MenuItem = defineComponent({
|
|
|
17471
17501
|
};
|
|
17472
17502
|
}
|
|
17473
17503
|
});
|
|
17474
|
-
|
|
17475
|
-
|
|
17476
|
-
|
|
17477
|
-
const menuItemHorizontalWrapperShow = `${ns$a.b()}-item-horizontal-wrapper-show`;
|
|
17478
|
-
function useShowSubMenu(eventName, e, wrapper) {
|
|
17479
|
-
const target = e.currentTarget;
|
|
17480
|
-
const targetParent = target.parentElement;
|
|
17481
|
-
const wrapperChildren = wrapper.children;
|
|
17482
|
-
wrapper.style.padding = `0 20px !important`;
|
|
17483
|
-
if (eventName === "mouseenter") {
|
|
17484
|
-
if ((targetParent == null ? void 0 : targetParent.tagName) === "DIV") {
|
|
17485
|
-
wrapper.classList.add(`${ns$a.b()}-item-horizontal-wrapper-level`);
|
|
17486
|
-
const { width } = target.getClientRects()[0];
|
|
17487
|
-
wrapper.style.top = `0px`;
|
|
17488
|
-
wrapper.style.left = `${width}px`;
|
|
17489
|
-
} else {
|
|
17490
|
-
wrapper.style.top = `26px`;
|
|
17491
|
-
wrapper.style.left = `0px`;
|
|
17492
|
-
}
|
|
17493
|
-
wrapper.classList.remove(menuItemHorizontalWrapperHidden);
|
|
17494
|
-
wrapper.classList.add(menuItemHorizontalWrapperShow);
|
|
17495
|
-
for (let i = 0; i < wrapperChildren.length; i++) {
|
|
17496
|
-
const ul = wrapperChildren[i];
|
|
17497
|
-
if (ul.tagName === "UL" && ul.classList.contains(subNs$1.b())) {
|
|
17498
|
-
const levelUlWrapper = ul.getElementsByClassName(`${ns$a.b()}-item-horizontal-wrapper`)[0];
|
|
17499
|
-
ul.addEventListener("mouseenter", (ev) => {
|
|
17500
|
-
ev.stopPropagation();
|
|
17501
|
-
useShowSubMenu("mouseenter", ev, levelUlWrapper);
|
|
17502
|
-
levelUlWrapper.classList.remove(menuItemHorizontalWrapperHidden);
|
|
17503
|
-
levelUlWrapper.classList.add(menuItemHorizontalWrapperShow);
|
|
17504
|
-
});
|
|
17505
|
-
ul.addEventListener("mouseleave", (ev) => {
|
|
17506
|
-
ev.stopPropagation();
|
|
17507
|
-
useShowSubMenu("mouseleave", ev, levelUlWrapper);
|
|
17508
|
-
levelUlWrapper.classList.remove(menuItemHorizontalWrapperShow);
|
|
17509
|
-
levelUlWrapper.classList.add(menuItemHorizontalWrapperHidden);
|
|
17510
|
-
});
|
|
17511
|
-
}
|
|
17512
|
-
}
|
|
17513
|
-
}
|
|
17514
|
-
if (eventName === "mouseleave") {
|
|
17515
|
-
wrapper.classList.remove(menuItemHorizontalWrapperShow);
|
|
17516
|
-
wrapper.classList.add(menuItemHorizontalWrapperHidden);
|
|
17504
|
+
function useNearestMenuElement(ele) {
|
|
17505
|
+
while (ele && ele.tagName !== "LI" && ele.tagName !== "UL") {
|
|
17506
|
+
ele = ele.parentElement;
|
|
17517
17507
|
}
|
|
17508
|
+
return ele;
|
|
17518
17509
|
}
|
|
17519
|
-
const subMenuProps = {
|
|
17520
|
-
title: {
|
|
17521
|
-
type: String,
|
|
17522
|
-
default: ""
|
|
17523
|
-
},
|
|
17524
|
-
disabled: {
|
|
17525
|
-
type: Boolean,
|
|
17526
|
-
default: false
|
|
17527
|
-
}
|
|
17528
|
-
};
|
|
17529
17510
|
const elTransition = "0.3s height ease-in-out, 0.3s padding-top ease-in-out, 0.3s padding-bottom ease-in-out";
|
|
17530
17511
|
const TransitionObj = {
|
|
17531
17512
|
"before-enter"(el) {
|
|
@@ -17599,6 +17580,61 @@ var MenuTransition = defineComponent({
|
|
|
17599
17580
|
};
|
|
17600
17581
|
}
|
|
17601
17582
|
});
|
|
17583
|
+
const subMenuProps = {
|
|
17584
|
+
title: {
|
|
17585
|
+
type: String,
|
|
17586
|
+
default: ""
|
|
17587
|
+
},
|
|
17588
|
+
disabled: {
|
|
17589
|
+
type: Boolean,
|
|
17590
|
+
default: false
|
|
17591
|
+
}
|
|
17592
|
+
};
|
|
17593
|
+
const ns$a = useNamespace("menu");
|
|
17594
|
+
const subNs$1 = useNamespace("submenu");
|
|
17595
|
+
const menuItemHorizontalWrapperHidden = `${ns$a.b()}-item-horizontal-wrapper-hidden`;
|
|
17596
|
+
const menuItemHorizontalWrapperShow = `${ns$a.b()}-item-horizontal-wrapper-show`;
|
|
17597
|
+
function useShowSubMenu(eventName, e, wrapper) {
|
|
17598
|
+
const target = e.currentTarget;
|
|
17599
|
+
const targetParent = target.parentElement;
|
|
17600
|
+
const wrapperChildren = wrapper.children;
|
|
17601
|
+
wrapper.style.padding = `0 20px !important`;
|
|
17602
|
+
if (eventName === "mouseenter") {
|
|
17603
|
+
if ((targetParent == null ? void 0 : targetParent.tagName) === "DIV") {
|
|
17604
|
+
wrapper.classList.add(`${ns$a.b()}-item-horizontal-wrapper-level`);
|
|
17605
|
+
const { width } = target.getClientRects()[0];
|
|
17606
|
+
wrapper.style.top = `0px`;
|
|
17607
|
+
wrapper.style.left = `${width}px`;
|
|
17608
|
+
} else {
|
|
17609
|
+
wrapper.style.top = `26px`;
|
|
17610
|
+
wrapper.style.left = `0px`;
|
|
17611
|
+
}
|
|
17612
|
+
wrapper.classList.remove(menuItemHorizontalWrapperHidden);
|
|
17613
|
+
wrapper.classList.add(menuItemHorizontalWrapperShow);
|
|
17614
|
+
for (let i = 0; i < wrapperChildren.length; i++) {
|
|
17615
|
+
const ul = wrapperChildren[i];
|
|
17616
|
+
if (ul.tagName === "UL" && ul.classList.contains(subNs$1.b())) {
|
|
17617
|
+
const levelUlWrapper = ul.getElementsByClassName(`${ns$a.b()}-item-horizontal-wrapper`)[0];
|
|
17618
|
+
ul.addEventListener("mouseenter", (ev) => {
|
|
17619
|
+
ev.stopPropagation();
|
|
17620
|
+
useShowSubMenu("mouseenter", ev, levelUlWrapper);
|
|
17621
|
+
levelUlWrapper.classList.remove(menuItemHorizontalWrapperHidden);
|
|
17622
|
+
levelUlWrapper.classList.add(menuItemHorizontalWrapperShow);
|
|
17623
|
+
});
|
|
17624
|
+
ul.addEventListener("mouseleave", (ev) => {
|
|
17625
|
+
ev.stopPropagation();
|
|
17626
|
+
useShowSubMenu("mouseleave", ev, levelUlWrapper);
|
|
17627
|
+
levelUlWrapper.classList.remove(menuItemHorizontalWrapperShow);
|
|
17628
|
+
levelUlWrapper.classList.add(menuItemHorizontalWrapperHidden);
|
|
17629
|
+
});
|
|
17630
|
+
}
|
|
17631
|
+
}
|
|
17632
|
+
}
|
|
17633
|
+
if (eventName === "mouseleave") {
|
|
17634
|
+
wrapper.classList.remove(menuItemHorizontalWrapperShow);
|
|
17635
|
+
wrapper.classList.add(menuItemHorizontalWrapperHidden);
|
|
17636
|
+
}
|
|
17637
|
+
}
|
|
17602
17638
|
const ns$9 = useNamespace("menu");
|
|
17603
17639
|
const subNs = useNamespace("submenu");
|
|
17604
17640
|
const subMenuClass = subNs.b();
|
|
@@ -17612,9 +17648,9 @@ var SubMenu = defineComponent({
|
|
|
17612
17648
|
key
|
|
17613
17649
|
}
|
|
17614
17650
|
} = getCurrentInstance();
|
|
17615
|
-
|
|
17616
|
-
const isOpen = ref(false);
|
|
17651
|
+
let key_ = String(key);
|
|
17617
17652
|
const defaultOpenKeys = inject("openKeys");
|
|
17653
|
+
const isOpen = ref(defaultOpenKeys.value.includes(key_));
|
|
17618
17654
|
const indent = inject("defaultIndent");
|
|
17619
17655
|
const isCollapsed = inject("isCollapsed");
|
|
17620
17656
|
const mode = inject("mode");
|
|
@@ -17623,17 +17659,11 @@ var SubMenu = defineComponent({
|
|
|
17623
17659
|
const isHorizontal = mode.value === "horizontal";
|
|
17624
17660
|
if (key_ === "null") {
|
|
17625
17661
|
console.warn(`[devui][menu]: Key can not be null`);
|
|
17626
|
-
|
|
17627
|
-
if (defaultOpenKeys.value.includes(key_)) {
|
|
17628
|
-
isOpen.value = true;
|
|
17629
|
-
} else {
|
|
17630
|
-
isOpen.value = false;
|
|
17631
|
-
}
|
|
17662
|
+
key_ = `randomKey-${randomId(16)}`;
|
|
17632
17663
|
}
|
|
17633
17664
|
const clickHandle = (e) => {
|
|
17634
|
-
e.preventDefault();
|
|
17635
17665
|
e.stopPropagation();
|
|
17636
|
-
const ele = e.
|
|
17666
|
+
const ele = useNearestMenuElement(e.target);
|
|
17637
17667
|
if (ele.classList.contains(subMenuClass) && isHorizontal) {
|
|
17638
17668
|
return;
|
|
17639
17669
|
}
|
|
@@ -17642,30 +17672,21 @@ var SubMenu = defineComponent({
|
|
|
17642
17672
|
useClick(e);
|
|
17643
17673
|
}
|
|
17644
17674
|
if (!props.disabled && mode.value !== "horizontal") {
|
|
17645
|
-
const
|
|
17646
|
-
|
|
17647
|
-
if (
|
|
17648
|
-
|
|
17649
|
-
isOpen.value = !isOpen.value;
|
|
17650
|
-
} else {
|
|
17651
|
-
isOpen.value = isOpen.value;
|
|
17652
|
-
}
|
|
17675
|
+
const cur = useNearestMenuElement(e.target);
|
|
17676
|
+
const idx = defaultOpenKeys.value.indexOf(key_);
|
|
17677
|
+
if (idx >= 0 && cur.tagName === "UL") {
|
|
17678
|
+
defaultOpenKeys.value.splice(idx, 1);
|
|
17653
17679
|
} else {
|
|
17654
|
-
while (cur && cur.tagName !== "UL") {
|
|
17655
|
-
if (cur.tagName === "LI") {
|
|
17656
|
-
break;
|
|
17657
|
-
}
|
|
17658
|
-
cur = cur.parentElement;
|
|
17659
|
-
}
|
|
17660
17680
|
if (cur.tagName === "UL") {
|
|
17661
|
-
|
|
17681
|
+
defaultOpenKeys.value.push(key_);
|
|
17662
17682
|
}
|
|
17663
17683
|
}
|
|
17684
|
+
isOpen.value = defaultOpenKeys.value.indexOf(key_) >= 0;
|
|
17664
17685
|
parentEmit("submenu-change", {
|
|
17665
17686
|
type: "submenu-change",
|
|
17666
17687
|
state: isOpen.value,
|
|
17667
17688
|
key: key_,
|
|
17668
|
-
el:
|
|
17689
|
+
el: ele
|
|
17669
17690
|
});
|
|
17670
17691
|
}
|
|
17671
17692
|
};
|
|
@@ -17694,11 +17715,11 @@ var SubMenu = defineComponent({
|
|
|
17694
17715
|
});
|
|
17695
17716
|
onMounted(() => {
|
|
17696
17717
|
var _a;
|
|
17697
|
-
const
|
|
17698
|
-
const
|
|
17718
|
+
const subMenuTitle = title.value;
|
|
17719
|
+
const subMenuWrapper = subMenu.value;
|
|
17699
17720
|
addLayer();
|
|
17700
|
-
class_layer.value = `layer_${(_a = Array.from(
|
|
17701
|
-
if (isHorizontal) {
|
|
17721
|
+
class_layer.value = `layer_${(_a = Array.from(subMenuWrapper.classList).at(-1)) == null ? void 0 : _a.replace("layer_", "")}`;
|
|
17722
|
+
if (isHorizontal && !props.disabled) {
|
|
17702
17723
|
subMenu.value.addEventListener("mouseenter", (ev) => {
|
|
17703
17724
|
ev.stopPropagation();
|
|
17704
17725
|
useShowSubMenu("mouseenter", ev, wrapperDom);
|
|
@@ -17709,22 +17730,22 @@ var SubMenu = defineComponent({
|
|
|
17709
17730
|
});
|
|
17710
17731
|
}
|
|
17711
17732
|
watch(isCollapsed, (newValue) => {
|
|
17712
|
-
const layer = Number(getLayer(
|
|
17733
|
+
const layer = Number(getLayer(subMenuWrapper));
|
|
17713
17734
|
if (!Number.isNaN(layer)) {
|
|
17714
17735
|
layer > 2 && (isShow.value = !isCollapsed.value);
|
|
17715
17736
|
}
|
|
17716
17737
|
if (newValue) {
|
|
17717
|
-
|
|
17738
|
+
subMenuTitle.style.padding !== "0" && (oldPadding = subMenuTitle.style.padding);
|
|
17718
17739
|
setTimeout(() => {
|
|
17719
|
-
|
|
17720
|
-
|
|
17721
|
-
|
|
17740
|
+
subMenuTitle.style.padding = "0";
|
|
17741
|
+
subMenuTitle.style.width = "";
|
|
17742
|
+
subMenuTitle.style.textAlign = `center`;
|
|
17722
17743
|
}, 300);
|
|
17723
|
-
|
|
17744
|
+
subMenuTitle.style.display = `block`;
|
|
17724
17745
|
} else {
|
|
17725
|
-
|
|
17726
|
-
|
|
17727
|
-
|
|
17746
|
+
subMenuTitle.style.padding = `${oldPadding}`;
|
|
17747
|
+
subMenuTitle.style.textAlign = ``;
|
|
17748
|
+
subMenuTitle.style.display = `flex`;
|
|
17728
17749
|
}
|
|
17729
17750
|
});
|
|
17730
17751
|
});
|
|
@@ -17732,10 +17753,10 @@ var SubMenu = defineComponent({
|
|
|
17732
17753
|
var _a, _b, _c, _d;
|
|
17733
17754
|
return withDirectives(createVNode("ul", {
|
|
17734
17755
|
"onClick": clickHandle,
|
|
17735
|
-
"class": [subMenuClass, class_layer.value],
|
|
17756
|
+
"class": [subMenuClass, class_layer.value, props["disabled"] && `${subMenuClass}-disabled`],
|
|
17736
17757
|
"ref": subMenu
|
|
17737
17758
|
}, [createVNode("div", {
|
|
17738
|
-
"class": [`${subMenuClass}-title
|
|
17759
|
+
"class": [`${subMenuClass}-title`],
|
|
17739
17760
|
"style": `padding: 0 ${indent}px`,
|
|
17740
17761
|
"ref": title
|
|
17741
17762
|
}, [createVNode("span", {
|
|
@@ -17748,10 +17769,10 @@ var SubMenu = defineComponent({
|
|
|
17748
17769
|
"icon icon-chevron-right": class_layer.value === `layer_${subMenuClass}`,
|
|
17749
17770
|
"is-opened": isOpen.value
|
|
17750
17771
|
}
|
|
17751
|
-
}, null), [[vShow, !isCollapsed.value && key !== "overflowContainer"]])]), isHorizontal ? createVNode("div", {
|
|
17772
|
+
}, null), [[vShow, !isCollapsed.value && key !== "overflowContainer"]])]), isHorizontal ? withDirectives(createVNode("div", {
|
|
17752
17773
|
"class": `${ns$9.b()}-item-horizontal-wrapper ${ns$9.b()}-item-horizontal-wrapper-hidden`,
|
|
17753
17774
|
"ref": wrapper
|
|
17754
|
-
}, [(_d = (_c = ctx2.slots).default) == null ? void 0 : _d.call(_c)]) : createVNode(MenuTransition, null, {
|
|
17775
|
+
}, [(_d = (_c = ctx2.slots).default) == null ? void 0 : _d.call(_c)]), [[vShow, !props.disabled]]) : createVNode(MenuTransition, null, {
|
|
17755
17776
|
default: () => {
|
|
17756
17777
|
var _a2, _b2;
|
|
17757
17778
|
return [withDirectives(createVNode("div", {
|
|
@@ -17824,51 +17845,67 @@ var Menu = defineComponent({
|
|
|
17824
17845
|
provide("useRouter", props.router);
|
|
17825
17846
|
setDefaultIndent(props["indentSize"]);
|
|
17826
17847
|
const menuRoot = ref(null);
|
|
17827
|
-
const overflow_container = ref(null);
|
|
17828
17848
|
const overflowItemLength = ref(0);
|
|
17849
|
+
const overflowContainer = ref(null);
|
|
17850
|
+
const selectClassName = `${ns2.b()}-item-select`;
|
|
17829
17851
|
const rootClassName = computed(() => ({
|
|
17830
17852
|
[`${ns2.b()}`]: true,
|
|
17831
17853
|
[`${ns2.b()}-vertical`]: mode.value === "vertical",
|
|
17832
17854
|
[`${ns2.b()}-horizontal`]: mode.value === "horizontal",
|
|
17833
17855
|
[`${ns2.b()}-collapsed`]: collapsed.value
|
|
17834
17856
|
}));
|
|
17857
|
+
const overflowContainerClassName = reactive({
|
|
17858
|
+
[selectClassName]: false,
|
|
17859
|
+
[`${ns2.b()}-overflow-container`]: true
|
|
17860
|
+
});
|
|
17861
|
+
const resetOverflowContainerSelectState = (e) => {
|
|
17862
|
+
const children = Array.from(e.children);
|
|
17863
|
+
for (const item of children) {
|
|
17864
|
+
if (item.classList.contains(selectClassName)) {
|
|
17865
|
+
overflowContainerClassName[selectClassName] = true;
|
|
17866
|
+
break;
|
|
17867
|
+
} else {
|
|
17868
|
+
overflowContainerClassName[selectClassName] = false;
|
|
17869
|
+
}
|
|
17870
|
+
}
|
|
17871
|
+
};
|
|
17835
17872
|
onMounted(() => {
|
|
17836
17873
|
var _a;
|
|
17837
17874
|
if (props["mode"] === "horizontal") {
|
|
17838
17875
|
let flag = false;
|
|
17839
|
-
const
|
|
17876
|
+
const overflowContainerElement = (_a = overflowContainer.value) == null ? void 0 : _a.$el;
|
|
17840
17877
|
const root2 = menuRoot.value;
|
|
17841
17878
|
const children = root2.children;
|
|
17842
|
-
const container =
|
|
17879
|
+
const container = overflowContainerElement.children[1];
|
|
17843
17880
|
const ob = new IntersectionObserver((entries) => {
|
|
17844
|
-
entries.forEach((
|
|
17845
|
-
if (!
|
|
17846
|
-
const cloneNode =
|
|
17847
|
-
if (
|
|
17848
|
-
if (flag &&
|
|
17849
|
-
root2.appendChild(
|
|
17881
|
+
entries.forEach((entry) => {
|
|
17882
|
+
if (!entry.isIntersecting) {
|
|
17883
|
+
const cloneNode = entry.target.cloneNode(true);
|
|
17884
|
+
if (entry.target.classList.contains(`${ns2.b()}-overflow-container`)) {
|
|
17885
|
+
if (flag && entry.target.previousElementSibling && container.children.length) {
|
|
17886
|
+
root2.appendChild(entry.target.previousElementSibling);
|
|
17850
17887
|
} else {
|
|
17851
17888
|
flag = true;
|
|
17852
17889
|
}
|
|
17853
17890
|
} else {
|
|
17854
17891
|
overflowItemLength.value += 1;
|
|
17855
|
-
|
|
17856
|
-
if (
|
|
17857
|
-
root2.insertBefore(
|
|
17892
|
+
entry.target.style.visibility = "hidden";
|
|
17893
|
+
if (overflowContainerElement.nextSibling) {
|
|
17894
|
+
root2.insertBefore(entry.target, overflowContainerElement.nextSibling);
|
|
17858
17895
|
} else {
|
|
17859
|
-
root2.appendChild(
|
|
17896
|
+
root2.appendChild(entry.target);
|
|
17860
17897
|
}
|
|
17861
17898
|
container.appendChild(cloneNode);
|
|
17899
|
+
resetOverflowContainerSelectState(container);
|
|
17862
17900
|
}
|
|
17863
17901
|
} else {
|
|
17864
|
-
if (!
|
|
17865
|
-
ob.unobserve(
|
|
17866
|
-
|
|
17867
|
-
|
|
17868
|
-
|
|
17869
|
-
|
|
17870
|
-
|
|
17871
|
-
if (obItem) {
|
|
17902
|
+
if (!entry.target.classList.contains(`${ns2.b()}-overflow-container`) && entry.target.style.visibility === "hidden") {
|
|
17903
|
+
ob.unobserve(entry.target);
|
|
17904
|
+
root2.insertBefore(entry.target, overflowContainerElement);
|
|
17905
|
+
entry.target.style.visibility = "";
|
|
17906
|
+
const obItem = overflowContainerElement.previousElementSibling;
|
|
17907
|
+
const canObAgin = obItem && entry.boundingClientRect.width % entry.target.getBoundingClientRect().width === 0;
|
|
17908
|
+
if (canObAgin) {
|
|
17872
17909
|
ob.observe(obItem);
|
|
17873
17910
|
}
|
|
17874
17911
|
if (obItem == null ? void 0 : obItem.classList.contains("devui-submenu")) {
|
|
@@ -17883,9 +17920,12 @@ var Menu = defineComponent({
|
|
|
17883
17920
|
useShowSubMenu("mouseleave", ev, wrapper);
|
|
17884
17921
|
});
|
|
17885
17922
|
}
|
|
17886
|
-
v.target.style.visibility = "";
|
|
17887
|
-
v.target.remove();
|
|
17888
17923
|
overflowItemLength.value -= 1;
|
|
17924
|
+
ob.observe(entry.target);
|
|
17925
|
+
if (container.lastChild) {
|
|
17926
|
+
container.removeChild(container.lastChild);
|
|
17927
|
+
}
|
|
17928
|
+
resetOverflowContainerSelectState(container);
|
|
17889
17929
|
}
|
|
17890
17930
|
}
|
|
17891
17931
|
});
|
|
@@ -17904,12 +17944,12 @@ var Menu = defineComponent({
|
|
|
17904
17944
|
return createVNode("ul", {
|
|
17905
17945
|
"ref": menuRoot,
|
|
17906
17946
|
"class": rootClassName.value,
|
|
17907
|
-
"style": [props["collapsed"] ? `width:${props["collapsedIndent"] * 2}px` : `width: ${props["width"]}
|
|
17947
|
+
"style": [props["collapsed"] ? `width:${props["collapsedIndent"] * 2}px` : `width: ${props["width"]}`]
|
|
17908
17948
|
}, [(_b = (_a = ctx2.slots).default) == null ? void 0 : _b.call(_a), withDirectives(createVNode(SubMenu, {
|
|
17909
|
-
"ref":
|
|
17949
|
+
"ref": overflowContainer,
|
|
17910
17950
|
"key": "overflowContainer",
|
|
17911
17951
|
"title": "...",
|
|
17912
|
-
"class":
|
|
17952
|
+
"class": overflowContainerClassName
|
|
17913
17953
|
}, null), [[vShow, overflowItemLength.value > 0 && mode.value === "horizontal"]])]);
|
|
17914
17954
|
};
|
|
17915
17955
|
}
|
|
@@ -18079,9 +18119,10 @@ var Message$1 = defineComponent({
|
|
|
18079
18119
|
if (!shadow.value) {
|
|
18080
18120
|
messageStyles["box-shadow"] = "none";
|
|
18081
18121
|
}
|
|
18082
|
-
return
|
|
18122
|
+
return {
|
|
18123
|
+
...messageStyles,
|
|
18083
18124
|
top: `${lastOffset.value}px`
|
|
18084
|
-
}
|
|
18125
|
+
};
|
|
18085
18126
|
});
|
|
18086
18127
|
const renderIcon = computed(() => {
|
|
18087
18128
|
const iconClasses = computed(() => ({
|
|
@@ -18115,7 +18156,9 @@ var Message$1 = defineComponent({
|
|
|
18115
18156
|
}, {
|
|
18116
18157
|
default: () => [visible.value && createVNode("div", {
|
|
18117
18158
|
"class": classes.value,
|
|
18118
|
-
"style":
|
|
18159
|
+
"style": {
|
|
18160
|
+
...styles.value
|
|
18161
|
+
},
|
|
18119
18162
|
"onMouseenter": interrupt,
|
|
18120
18163
|
"onMouseleave": removeReset
|
|
18121
18164
|
}, [renderIcon.value, renderText.value, renderClose.value])]
|
|
@@ -18169,7 +18212,10 @@ const normalizeOptions = (params) => {
|
|
|
18169
18212
|
const options = !params || isString$1(params) ? {
|
|
18170
18213
|
message: params
|
|
18171
18214
|
} : params;
|
|
18172
|
-
const normalized =
|
|
18215
|
+
const normalized = {
|
|
18216
|
+
...defaultOptions$1,
|
|
18217
|
+
...options
|
|
18218
|
+
};
|
|
18173
18219
|
return normalized;
|
|
18174
18220
|
};
|
|
18175
18221
|
let seed = 0;
|
|
@@ -18177,13 +18223,15 @@ function open(options) {
|
|
|
18177
18223
|
const originOnClose = options.onClose || null;
|
|
18178
18224
|
const messageContent = options.message;
|
|
18179
18225
|
delete options.message;
|
|
18180
|
-
const props = reactive(
|
|
18226
|
+
const props = reactive({
|
|
18227
|
+
...defaultOptions$1,
|
|
18228
|
+
...options,
|
|
18181
18229
|
onClose: () => {
|
|
18182
18230
|
props.visible = false;
|
|
18183
18231
|
deleteInstance(props.id);
|
|
18184
18232
|
originOnClose == null ? void 0 : originOnClose();
|
|
18185
18233
|
}
|
|
18186
|
-
})
|
|
18234
|
+
});
|
|
18187
18235
|
seed++;
|
|
18188
18236
|
const id = `message_${seed}`;
|
|
18189
18237
|
props.id = id;
|
|
@@ -18193,31 +18241,37 @@ function open(options) {
|
|
|
18193
18241
|
}
|
|
18194
18242
|
function message(params) {
|
|
18195
18243
|
const options = normalizeOptions(params);
|
|
18196
|
-
open(
|
|
18244
|
+
open({
|
|
18245
|
+
...options
|
|
18246
|
+
});
|
|
18197
18247
|
}
|
|
18198
18248
|
function success(params) {
|
|
18199
18249
|
const options = normalizeOptions(params);
|
|
18200
|
-
open(
|
|
18250
|
+
open({
|
|
18251
|
+
...options,
|
|
18201
18252
|
type: "success"
|
|
18202
|
-
})
|
|
18253
|
+
});
|
|
18203
18254
|
}
|
|
18204
18255
|
function error(params) {
|
|
18205
18256
|
const options = normalizeOptions(params);
|
|
18206
|
-
open(
|
|
18257
|
+
open({
|
|
18258
|
+
...options,
|
|
18207
18259
|
type: "error"
|
|
18208
|
-
})
|
|
18260
|
+
});
|
|
18209
18261
|
}
|
|
18210
18262
|
function warning2(params) {
|
|
18211
18263
|
const options = normalizeOptions(params);
|
|
18212
|
-
open(
|
|
18264
|
+
open({
|
|
18265
|
+
...options,
|
|
18213
18266
|
type: "warning"
|
|
18214
|
-
})
|
|
18267
|
+
});
|
|
18215
18268
|
}
|
|
18216
18269
|
function info(params) {
|
|
18217
18270
|
const options = normalizeOptions(params);
|
|
18218
|
-
open(
|
|
18271
|
+
open({
|
|
18272
|
+
...options,
|
|
18219
18273
|
type: "info"
|
|
18220
|
-
})
|
|
18274
|
+
});
|
|
18221
18275
|
}
|
|
18222
18276
|
const Message = Object.assign(message, {
|
|
18223
18277
|
success,
|
|
@@ -18403,7 +18457,9 @@ var Modal = defineComponent({
|
|
|
18403
18457
|
var _a;
|
|
18404
18458
|
return [showModal.value && createVNode("div", mergeProps({
|
|
18405
18459
|
"class": ns2.b()
|
|
18406
|
-
}, attrs
|
|
18460
|
+
}, attrs, {
|
|
18461
|
+
"onClick": (e) => e.stopPropagation()
|
|
18462
|
+
}), [showClose.value && createVNode(DIcon, {
|
|
18407
18463
|
"name": "close",
|
|
18408
18464
|
"class": "btn-close",
|
|
18409
18465
|
"size": "var(--devui-font-size-md,12px)",
|
|
@@ -18458,15 +18514,16 @@ class ModalService extends CommonModalService {
|
|
|
18458
18514
|
open(props = {}) {
|
|
18459
18515
|
const anchor = document.createElement("div");
|
|
18460
18516
|
this.anchorContainer.appendChild(anchor);
|
|
18461
|
-
const
|
|
18517
|
+
const { header: header2, content: content2, footer: footer2, ...resProps } = props;
|
|
18462
18518
|
const renderOrigin = (propsValue, onUpdateModelValue) => {
|
|
18463
|
-
return this.renderModal(anchor,
|
|
18519
|
+
return this.renderModal(anchor, {
|
|
18520
|
+
...propsValue,
|
|
18464
18521
|
modelValue: true,
|
|
18465
18522
|
"onUpdate:modelValue": onUpdateModelValue
|
|
18466
|
-
}
|
|
18523
|
+
}, { header: header2, default: content2, footer: footer2 });
|
|
18467
18524
|
};
|
|
18468
18525
|
const hide = () => {
|
|
18469
|
-
var
|
|
18526
|
+
var _a, _b, _c;
|
|
18470
18527
|
const innerNeedHideOrNot = (value) => {
|
|
18471
18528
|
if (!value) {
|
|
18472
18529
|
hide();
|
|
@@ -18474,13 +18531,13 @@ class ModalService extends CommonModalService {
|
|
|
18474
18531
|
};
|
|
18475
18532
|
renderOrigin(resProps, (value) => {
|
|
18476
18533
|
if (!value) {
|
|
18477
|
-
this.renderModal(anchor,
|
|
18534
|
+
this.renderModal(anchor, { ...resProps, modelValue: false });
|
|
18478
18535
|
this.renderNull(anchor);
|
|
18479
18536
|
} else {
|
|
18480
18537
|
renderOrigin(resProps, innerNeedHideOrNot);
|
|
18481
18538
|
}
|
|
18482
18539
|
});
|
|
18483
|
-
(_c = (_b = (
|
|
18540
|
+
(_c = (_b = (_a = vm == null ? void 0 : vm.component) == null ? void 0 : _a.exposed) == null ? void 0 : _b.handleVisibleChange) == null ? void 0 : _c.call(_b, false);
|
|
18484
18541
|
};
|
|
18485
18542
|
const needHideOrNot = (value) => {
|
|
18486
18543
|
if (!value) {
|
|
@@ -18492,7 +18549,7 @@ class ModalService extends CommonModalService {
|
|
|
18492
18549
|
return { hide };
|
|
18493
18550
|
}
|
|
18494
18551
|
}
|
|
18495
|
-
|
|
18552
|
+
ModalService.token = "MODAL_SERVICE_TOKEN";
|
|
18496
18553
|
var ModalInstall = {
|
|
18497
18554
|
title: "Modal \u5F39\u7A97",
|
|
18498
18555
|
category: "\u53CD\u9988",
|
|
@@ -18809,11 +18866,13 @@ class NotificationService {
|
|
|
18809
18866
|
const content2 = options.content;
|
|
18810
18867
|
let timer;
|
|
18811
18868
|
delete options.content;
|
|
18812
|
-
const props = reactive(
|
|
18869
|
+
const props = reactive({
|
|
18870
|
+
...defaultOptions,
|
|
18871
|
+
...options,
|
|
18813
18872
|
onClose: () => {
|
|
18814
18873
|
close(props, originOnClose);
|
|
18815
18874
|
}
|
|
18816
|
-
})
|
|
18875
|
+
});
|
|
18817
18876
|
initInstance(props, content2);
|
|
18818
18877
|
props.modelValue = true;
|
|
18819
18878
|
clearTimeout(timer);
|
|
@@ -19806,7 +19865,8 @@ const radioCommonProps = {
|
|
|
19806
19865
|
default: "md"
|
|
19807
19866
|
}
|
|
19808
19867
|
};
|
|
19809
|
-
const radioProps =
|
|
19868
|
+
const radioProps = {
|
|
19869
|
+
...radioCommonProps,
|
|
19810
19870
|
value: {
|
|
19811
19871
|
type: [Number, String, Boolean],
|
|
19812
19872
|
required: true,
|
|
@@ -19816,8 +19876,9 @@ const radioProps = __spreadProps(__spreadValues({}, radioCommonProps), {
|
|
|
19816
19876
|
type: Boolean,
|
|
19817
19877
|
default: false
|
|
19818
19878
|
}
|
|
19819
|
-
}
|
|
19820
|
-
const radioGroupProps =
|
|
19879
|
+
};
|
|
19880
|
+
const radioGroupProps = {
|
|
19881
|
+
...radioCommonProps,
|
|
19821
19882
|
values: {
|
|
19822
19883
|
type: Array,
|
|
19823
19884
|
default: null
|
|
@@ -19838,7 +19899,7 @@ const radioGroupProps = __spreadProps(__spreadValues({}, radioCommonProps), {
|
|
|
19838
19899
|
type: String,
|
|
19839
19900
|
default: ""
|
|
19840
19901
|
}
|
|
19841
|
-
}
|
|
19902
|
+
};
|
|
19842
19903
|
const radioGroupInjectionKey = Symbol("DRadioGroup");
|
|
19843
19904
|
function useRadio(props, ctx2) {
|
|
19844
19905
|
const formContext = inject(FORM_TOKEN, void 0);
|
|
@@ -20506,7 +20567,7 @@ const ripple = (event, el, options) => {
|
|
|
20506
20567
|
document.addEventListener("pointercancel", cancelripple);
|
|
20507
20568
|
};
|
|
20508
20569
|
const optionMap = /* @__PURE__ */ new WeakMap();
|
|
20509
|
-
const globalOptions =
|
|
20570
|
+
const globalOptions = { ...DEFAULT_PLUGIN_OPTIONS };
|
|
20510
20571
|
var RippleDirective = {
|
|
20511
20572
|
mounted(el, binding) {
|
|
20512
20573
|
var _a;
|
|
@@ -20519,7 +20580,10 @@ var RippleDirective = {
|
|
|
20519
20580
|
if (options === false) {
|
|
20520
20581
|
return;
|
|
20521
20582
|
}
|
|
20522
|
-
ripple(event, el,
|
|
20583
|
+
ripple(event, el, {
|
|
20584
|
+
...globalOptions,
|
|
20585
|
+
...options
|
|
20586
|
+
});
|
|
20523
20587
|
});
|
|
20524
20588
|
},
|
|
20525
20589
|
updated(el, binding) {
|
|
@@ -20786,10 +20850,11 @@ function useSelect$1(props, ctx2, focus, blur, isSelectFocus, t) {
|
|
|
20786
20850
|
return props.options.map((item) => {
|
|
20787
20851
|
let option2;
|
|
20788
20852
|
if (typeof item === "object") {
|
|
20789
|
-
option2 =
|
|
20853
|
+
option2 = {
|
|
20790
20854
|
name: item.name ? item.name : item.value + "",
|
|
20791
|
-
_checked: false
|
|
20792
|
-
|
|
20855
|
+
_checked: false,
|
|
20856
|
+
...item
|
|
20857
|
+
};
|
|
20793
20858
|
} else {
|
|
20794
20859
|
option2 = {
|
|
20795
20860
|
name: item + "",
|
|
@@ -21670,7 +21735,8 @@ var Select = defineComponent({
|
|
|
21670
21735
|
onMounted(() => {
|
|
21671
21736
|
isRender.value = true;
|
|
21672
21737
|
});
|
|
21673
|
-
provide(SELECT_TOKEN, reactive(
|
|
21738
|
+
provide(SELECT_TOKEN, reactive({
|
|
21739
|
+
...toRefs(props),
|
|
21674
21740
|
selectDisabled,
|
|
21675
21741
|
selectSize,
|
|
21676
21742
|
isOpen,
|
|
@@ -21683,7 +21749,7 @@ var Select = defineComponent({
|
|
|
21683
21749
|
onFocus,
|
|
21684
21750
|
onBlur,
|
|
21685
21751
|
debounceQueryFilter
|
|
21686
|
-
}))
|
|
21752
|
+
}));
|
|
21687
21753
|
return () => {
|
|
21688
21754
|
return createVNode("div", {
|
|
21689
21755
|
"class": selectCls.value,
|
|
@@ -21752,7 +21818,9 @@ var OptionGroup = defineComponent({
|
|
|
21752
21818
|
props: optionGroupProps,
|
|
21753
21819
|
setup(props, ctx2) {
|
|
21754
21820
|
const ns2 = useNamespace("select");
|
|
21755
|
-
provide(OPTION_GROUP_TOKEN, reactive(
|
|
21821
|
+
provide(OPTION_GROUP_TOKEN, reactive({
|
|
21822
|
+
...toRefs(props)
|
|
21823
|
+
}));
|
|
21756
21824
|
return () => {
|
|
21757
21825
|
var _a;
|
|
21758
21826
|
return createVNode("ul", {
|
|
@@ -22519,7 +22587,6 @@ var DSplitterBar = defineComponent({
|
|
|
22519
22587
|
});
|
|
22520
22588
|
class SplitterStore {
|
|
22521
22589
|
constructor() {
|
|
22522
|
-
__publicField(this, "state");
|
|
22523
22590
|
this.state = reactive({
|
|
22524
22591
|
panes: [],
|
|
22525
22592
|
splitterContainerSize: 0,
|
|
@@ -22968,21 +23035,6 @@ const easeInOutCirc = function(x) {
|
|
|
22968
23035
|
var easing = { easeOutCubic, linear, easeOutExpo, easeInOutExpo, easeInExpo, easeInOutCirc };
|
|
22969
23036
|
class Tween {
|
|
22970
23037
|
constructor(options) {
|
|
22971
|
-
__publicField(this, "from");
|
|
22972
|
-
__publicField(this, "to");
|
|
22973
|
-
__publicField(this, "duration");
|
|
22974
|
-
__publicField(this, "delay");
|
|
22975
|
-
__publicField(this, "easing");
|
|
22976
|
-
__publicField(this, "onStart");
|
|
22977
|
-
__publicField(this, "onUpdate");
|
|
22978
|
-
__publicField(this, "onFinish");
|
|
22979
|
-
__publicField(this, "startTime");
|
|
22980
|
-
__publicField(this, "started");
|
|
22981
|
-
__publicField(this, "finished");
|
|
22982
|
-
__publicField(this, "timer");
|
|
22983
|
-
__publicField(this, "time");
|
|
22984
|
-
__publicField(this, "elapsed");
|
|
22985
|
-
__publicField(this, "keys");
|
|
22986
23038
|
const { from, to, duration, delay, easing: easingValue, onStart, onUpdate, onFinish } = options;
|
|
22987
23039
|
for (const key in from) {
|
|
22988
23040
|
if (to[key] === void 0) {
|
|
@@ -24217,7 +24269,7 @@ function useFilterMultiple(filterList, ctx2) {
|
|
|
24217
24269
|
});
|
|
24218
24270
|
const _halfChecked = ref(false);
|
|
24219
24271
|
filterList == null ? void 0 : filterList.forEach((item) => {
|
|
24220
|
-
_checkList.value.push(
|
|
24272
|
+
_checkList.value.push({ checked: false, ...item });
|
|
24221
24273
|
});
|
|
24222
24274
|
watch(_checkList, (list2) => {
|
|
24223
24275
|
if (!list2.length) {
|
|
@@ -25100,6 +25152,8 @@ var Table = defineComponent({
|
|
|
25100
25152
|
"ref": tableRef,
|
|
25101
25153
|
"class": ns2.b(),
|
|
25102
25154
|
"style": styles.value
|
|
25155
|
+
}, [createVNode("div", {
|
|
25156
|
+
"class": ns2.e("container")
|
|
25103
25157
|
}, [createVNode("div", {
|
|
25104
25158
|
"ref": hiddenColumns,
|
|
25105
25159
|
"class": "hidden-columns"
|
|
@@ -25111,7 +25165,7 @@ var Table = defineComponent({
|
|
|
25111
25165
|
"is-empty": isEmpty2.value
|
|
25112
25166
|
}, null), isEmpty2.value && createVNode("div", {
|
|
25113
25167
|
"class": ns2.e("empty")
|
|
25114
|
-
}, [ctx2.slots.empty ? ctx2.slots.empty() : props.empty])]), [[resolveDirective("dLoading"), props.showLoading]]);
|
|
25168
|
+
}, [ctx2.slots.empty ? ctx2.slots.empty() : props.empty])])]), [[resolveDirective("dLoading"), props.showLoading]]);
|
|
25115
25169
|
};
|
|
25116
25170
|
}
|
|
25117
25171
|
});
|
|
@@ -26743,22 +26797,23 @@ const commonProps = {
|
|
|
26743
26797
|
default: false
|
|
26744
26798
|
}
|
|
26745
26799
|
};
|
|
26746
|
-
const treeProps =
|
|
26800
|
+
const treeProps = {
|
|
26747
26801
|
data: {
|
|
26748
26802
|
type: Object,
|
|
26749
26803
|
default: []
|
|
26750
|
-
}
|
|
26751
|
-
|
|
26804
|
+
},
|
|
26805
|
+
...commonProps,
|
|
26752
26806
|
height: {
|
|
26753
26807
|
type: [Number, String]
|
|
26754
26808
|
}
|
|
26755
|
-
}
|
|
26756
|
-
const treeNodeProps =
|
|
26809
|
+
};
|
|
26810
|
+
const treeNodeProps = {
|
|
26757
26811
|
data: {
|
|
26758
26812
|
type: Object,
|
|
26759
26813
|
default: {}
|
|
26760
|
-
}
|
|
26761
|
-
|
|
26814
|
+
},
|
|
26815
|
+
...commonProps
|
|
26816
|
+
};
|
|
26762
26817
|
function useCheck(options = ref({ checkStrategy: "both" })) {
|
|
26763
26818
|
return function useCheckFn(data, core, context) {
|
|
26764
26819
|
const { setNodeValue, getNode, getChildren, getParent } = core;
|
|
@@ -26877,7 +26932,7 @@ function generateInnerTree(tree2, key = "children", level = 0, path = []) {
|
|
|
26877
26932
|
newItem.parentId = parentNode.id;
|
|
26878
26933
|
}
|
|
26879
26934
|
if (!newItem[key]) {
|
|
26880
|
-
return acc.concat(
|
|
26935
|
+
return acc.concat({ ...newItem, isLeaf: newItem.isLeaf === false ? false : true });
|
|
26881
26936
|
} else {
|
|
26882
26937
|
return acc.concat(omit(newItem, "children"), generateInnerTree(newItem[key], key, level, path));
|
|
26883
26938
|
}
|
|
@@ -26929,7 +26984,7 @@ function useCore() {
|
|
|
26929
26984
|
});
|
|
26930
26985
|
};
|
|
26931
26986
|
const result2 = [];
|
|
26932
|
-
const config =
|
|
26987
|
+
const config = { ...DEFAULT_CONFIG, ...userConfig };
|
|
26933
26988
|
const treeData = config.expanded ? getInnerExpendedTree() : data;
|
|
26934
26989
|
const startIndex = treeData.value.findIndex((item) => item.id === node.id);
|
|
26935
26990
|
for (let i = startIndex + 1; i < treeData.value.length && getLevel(node) < treeData.value[i].level; i++) {
|
|
@@ -27475,8 +27530,8 @@ var stubFalse_1 = stubFalse;
|
|
|
27475
27530
|
var freeExports = exports && !exports.nodeType && exports;
|
|
27476
27531
|
var freeModule = freeExports && true && module && !module.nodeType && module;
|
|
27477
27532
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
27478
|
-
var
|
|
27479
|
-
var nativeIsBuffer =
|
|
27533
|
+
var Buffer = moduleExports ? root2.Buffer : void 0;
|
|
27534
|
+
var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0;
|
|
27480
27535
|
var isBuffer2 = nativeIsBuffer || stubFalse2;
|
|
27481
27536
|
module.exports = isBuffer2;
|
|
27482
27537
|
})(isBuffer$2, isBuffer$2.exports);
|
|
@@ -27633,7 +27688,7 @@ var _cloneBuffer = { exports: {} };
|
|
|
27633
27688
|
var freeExports = exports && !exports.nodeType && exports;
|
|
27634
27689
|
var freeModule = freeExports && true && module && !module.nodeType && module;
|
|
27635
27690
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
27636
|
-
var
|
|
27691
|
+
var Buffer = moduleExports ? root2.Buffer : void 0, allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
|
|
27637
27692
|
function cloneBuffer2(buffer, isDeep) {
|
|
27638
27693
|
if (isDeep) {
|
|
27639
27694
|
return buffer.slice();
|
|
@@ -27782,10 +27837,10 @@ var _initCloneArray = initCloneArray$1;
|
|
|
27782
27837
|
var root = _root;
|
|
27783
27838
|
var Uint8Array$1 = root.Uint8Array;
|
|
27784
27839
|
var _Uint8Array = Uint8Array$1;
|
|
27785
|
-
var
|
|
27840
|
+
var Uint8Array = _Uint8Array;
|
|
27786
27841
|
function cloneArrayBuffer$3(arrayBuffer) {
|
|
27787
27842
|
var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
27788
|
-
new
|
|
27843
|
+
new Uint8Array(result2).set(new Uint8Array(arrayBuffer));
|
|
27789
27844
|
return result2;
|
|
27790
27845
|
}
|
|
27791
27846
|
var _cloneArrayBuffer = cloneArrayBuffer$3;
|
|
@@ -27975,7 +28030,7 @@ const formatCheckStatus = (check) => {
|
|
|
27975
28030
|
const formatBasicTree = (trees, keyName = "id", childrenName = "children", parentId) => {
|
|
27976
28031
|
return trees.map((item) => {
|
|
27977
28032
|
var _a;
|
|
27978
|
-
const curItem =
|
|
28033
|
+
const curItem = { ...item, parentId };
|
|
27979
28034
|
if (!(keyName in curItem) || !curItem[keyName]) {
|
|
27980
28035
|
curItem[keyName] = randomId();
|
|
27981
28036
|
curItem.idType = "random";
|
|
@@ -28010,7 +28065,8 @@ function useDragdrop(props, data) {
|
|
|
28010
28065
|
draggingTreeNode: null
|
|
28011
28066
|
});
|
|
28012
28067
|
const treeIdMapValue = computed(() => {
|
|
28013
|
-
return data.value.reduce((acc, cur) =>
|
|
28068
|
+
return data.value.reduce((acc, cur) => ({
|
|
28069
|
+
...acc,
|
|
28014
28070
|
[cur.id]: cur
|
|
28015
28071
|
}), {});
|
|
28016
28072
|
});
|
|
@@ -28222,7 +28278,7 @@ function useLazyLoad() {
|
|
|
28222
28278
|
}
|
|
28223
28279
|
function useOperate() {
|
|
28224
28280
|
return function useOperateFn(data, core) {
|
|
28225
|
-
const { setNodeValue, getChildren, getIndex, getLevel } = core;
|
|
28281
|
+
const { setNodeValue, getChildren, getIndex, getLevel, getParent } = core;
|
|
28226
28282
|
const insertBefore = (parentNode, node, referenceNode) => {
|
|
28227
28283
|
const children = getChildren(parentNode, {
|
|
28228
28284
|
recursive: false
|
|
@@ -28239,13 +28295,14 @@ function useOperate() {
|
|
|
28239
28295
|
if (lastChild) {
|
|
28240
28296
|
setNodeValue(lastChild, "parentChildNodeCount", children.length + 1);
|
|
28241
28297
|
}
|
|
28242
|
-
const currentNode = ref(
|
|
28298
|
+
const currentNode = ref({
|
|
28299
|
+
...node,
|
|
28243
28300
|
level: getLevel(parentNode) + 1,
|
|
28244
28301
|
parentId: parentNode.id,
|
|
28245
28302
|
isLeaf: true,
|
|
28246
28303
|
parentChildNodeCount: children.length + 1,
|
|
28247
28304
|
currentIndex: (lastChild == null ? void 0 : lastChild.currentIndex) + 1
|
|
28248
|
-
})
|
|
28305
|
+
});
|
|
28249
28306
|
if (currentNode.value.id === void 0) {
|
|
28250
28307
|
currentNode.value.id = randomId();
|
|
28251
28308
|
}
|
|
@@ -28264,6 +28321,9 @@ function useOperate() {
|
|
|
28264
28321
|
return item.id !== node.id;
|
|
28265
28322
|
}
|
|
28266
28323
|
});
|
|
28324
|
+
if (getParent(node) && getChildren(getParent(node)).length === 0) {
|
|
28325
|
+
setNodeValue(getParent(node), "isLeaf", true);
|
|
28326
|
+
}
|
|
28267
28327
|
};
|
|
28268
28328
|
const editNode = (node, label) => {
|
|
28269
28329
|
setNodeValue(node, "label", label);
|
|
@@ -28509,11 +28569,13 @@ function useTree(tree2, plugins = [], context) {
|
|
|
28509
28569
|
const core = useCore()(treeData);
|
|
28510
28570
|
const lazyLode = useLazyLoad()(treeData, core, context);
|
|
28511
28571
|
const pluginMethods = DEFAULT_TREE_PLUGINS.concat(plugins).reduce((acc, plugin) => {
|
|
28512
|
-
return
|
|
28572
|
+
return { ...acc, ...plugin(treeData, core, context, lazyLode) };
|
|
28513
28573
|
}, {});
|
|
28514
|
-
return
|
|
28515
|
-
treeData
|
|
28516
|
-
|
|
28574
|
+
return {
|
|
28575
|
+
treeData,
|
|
28576
|
+
...pluginMethods,
|
|
28577
|
+
...core
|
|
28578
|
+
};
|
|
28517
28579
|
}
|
|
28518
28580
|
const ns = useNamespace("tree");
|
|
28519
28581
|
function useTreeNode(data) {
|
|
@@ -29090,12 +29152,9 @@ const useSelectFiles = (t) => {
|
|
|
29090
29152
|
};
|
|
29091
29153
|
class FileUploader {
|
|
29092
29154
|
constructor(file, uploadOptions) {
|
|
29093
|
-
__publicField(this, "xhr");
|
|
29094
|
-
__publicField(this, "status");
|
|
29095
|
-
__publicField(this, "response");
|
|
29096
|
-
__publicField(this, "percentage", 0);
|
|
29097
29155
|
this.file = file;
|
|
29098
29156
|
this.uploadOptions = uploadOptions;
|
|
29157
|
+
this.percentage = 0;
|
|
29099
29158
|
this.file = file;
|
|
29100
29159
|
this.uploadOptions = uploadOptions;
|
|
29101
29160
|
this.status = UploadStatus.preLoad;
|