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/tree/index.es.js
CHANGED
|
@@ -1,35 +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
|
-
import { ref, onUnmounted, computed, reactive, createVNode, defineComponent, toRefs, inject, getCurrentInstance, watch, provide, Transition, mergeProps, unref, nextTick, Comment, Text, h, Fragment, withDirectives, cloneVNode, onMounted, Teleport, withModifiers, createTextVNode, onBeforeUnmount, toRef, renderSlot, useSlots, resolveComponent, isVNode, onUpdated, shallowRef, toRaw, watchEffect } from "vue";
|
|
1
|
+
import { ref, onUnmounted, computed, reactive, createVNode, defineComponent, toRefs, inject, getCurrentInstance, watch, provide, Transition, mergeProps, nextTick, unref, Comment, Text, Fragment, h, withDirectives, cloneVNode, onMounted, Teleport, withModifiers, createTextVNode, onBeforeUnmount, toRef, renderSlot, useSlots, resolveComponent, isVNode, onUpdated, shallowRef, toRaw, watchEffect } from "vue";
|
|
33
2
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
34
3
|
const USE_TREE_TOKEN = "use-tree-token";
|
|
35
4
|
const TREE_INSTANCE = "tree-instance";
|
|
@@ -49,22 +18,23 @@ const commonProps$1 = {
|
|
|
49
18
|
default: false
|
|
50
19
|
}
|
|
51
20
|
};
|
|
52
|
-
const treeProps =
|
|
21
|
+
const treeProps = {
|
|
53
22
|
data: {
|
|
54
23
|
type: Object,
|
|
55
24
|
default: []
|
|
56
|
-
}
|
|
57
|
-
|
|
25
|
+
},
|
|
26
|
+
...commonProps$1,
|
|
58
27
|
height: {
|
|
59
28
|
type: [Number, String]
|
|
60
29
|
}
|
|
61
|
-
}
|
|
62
|
-
const treeNodeProps =
|
|
30
|
+
};
|
|
31
|
+
const treeNodeProps = {
|
|
63
32
|
data: {
|
|
64
33
|
type: Object,
|
|
65
34
|
default: {}
|
|
66
|
-
}
|
|
67
|
-
|
|
35
|
+
},
|
|
36
|
+
...commonProps$1
|
|
37
|
+
};
|
|
68
38
|
function useCheck(options = ref({ checkStrategy: "both" })) {
|
|
69
39
|
return function useCheckFn(data, core, context) {
|
|
70
40
|
const { setNodeValue, getNode, getChildren, getParent } = core;
|
|
@@ -218,7 +188,7 @@ function generateInnerTree(tree2, key = "children", level = 0, path = []) {
|
|
|
218
188
|
newItem.parentId = parentNode.id;
|
|
219
189
|
}
|
|
220
190
|
if (!newItem[key]) {
|
|
221
|
-
return acc.concat(
|
|
191
|
+
return acc.concat({ ...newItem, isLeaf: newItem.isLeaf === false ? false : true });
|
|
222
192
|
} else {
|
|
223
193
|
return acc.concat(omit(newItem, "children"), generateInnerTree(newItem[key], key, level, path));
|
|
224
194
|
}
|
|
@@ -270,7 +240,7 @@ function useCore() {
|
|
|
270
240
|
});
|
|
271
241
|
};
|
|
272
242
|
const result = [];
|
|
273
|
-
const config =
|
|
243
|
+
const config = { ...DEFAULT_CONFIG, ...userConfig };
|
|
274
244
|
const treeData = config.expanded ? getInnerExpendedTree() : data;
|
|
275
245
|
const startIndex = treeData.value.findIndex((item) => item.id === node.id);
|
|
276
246
|
for (let i = startIndex + 1; i < treeData.value.length && getLevel(node) < treeData.value[i].level; i++) {
|
|
@@ -817,8 +787,8 @@ var stubFalse_1 = stubFalse;
|
|
|
817
787
|
var freeExports = exports && !exports.nodeType && exports;
|
|
818
788
|
var freeModule = freeExports && true && module && !module.nodeType && module;
|
|
819
789
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
820
|
-
var
|
|
821
|
-
var nativeIsBuffer =
|
|
790
|
+
var Buffer = moduleExports ? root2.Buffer : void 0;
|
|
791
|
+
var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0;
|
|
822
792
|
var isBuffer2 = nativeIsBuffer || stubFalse2;
|
|
823
793
|
module.exports = isBuffer2;
|
|
824
794
|
})(isBuffer$2, isBuffer$2.exports);
|
|
@@ -975,7 +945,7 @@ var _cloneBuffer = { exports: {} };
|
|
|
975
945
|
var freeExports = exports && !exports.nodeType && exports;
|
|
976
946
|
var freeModule = freeExports && true && module && !module.nodeType && module;
|
|
977
947
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
978
|
-
var
|
|
948
|
+
var Buffer = moduleExports ? root2.Buffer : void 0, allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
|
|
979
949
|
function cloneBuffer2(buffer, isDeep) {
|
|
980
950
|
if (isDeep) {
|
|
981
951
|
return buffer.slice();
|
|
@@ -1084,12 +1054,12 @@ var _Set = Set$2;
|
|
|
1084
1054
|
var getNative = _getNative, root$1 = _root;
|
|
1085
1055
|
var WeakMap$1 = getNative(root$1, "WeakMap");
|
|
1086
1056
|
var _WeakMap = WeakMap$1;
|
|
1087
|
-
var DataView = _DataView, Map$1 = _Map, Promise$1 = _Promise, Set$1 = _Set,
|
|
1057
|
+
var DataView = _DataView, Map$1 = _Map, Promise$1 = _Promise, Set$1 = _Set, WeakMap = _WeakMap, baseGetTag = _baseGetTag, toSource = _toSource;
|
|
1088
1058
|
var mapTag$3 = "[object Map]", objectTag$1 = "[object Object]", promiseTag = "[object Promise]", setTag$3 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
|
|
1089
1059
|
var dataViewTag$2 = "[object DataView]";
|
|
1090
|
-
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$1), weakMapCtorString = toSource(
|
|
1060
|
+
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap);
|
|
1091
1061
|
var getTag$3 = baseGetTag;
|
|
1092
|
-
if (DataView && getTag$3(new DataView(new ArrayBuffer(1))) != dataViewTag$2 || Map$1 && getTag$3(new Map$1()) != mapTag$3 || Promise$1 && getTag$3(Promise$1.resolve()) != promiseTag || Set$1 && getTag$3(new Set$1()) != setTag$3 ||
|
|
1062
|
+
if (DataView && getTag$3(new DataView(new ArrayBuffer(1))) != dataViewTag$2 || Map$1 && getTag$3(new Map$1()) != mapTag$3 || Promise$1 && getTag$3(Promise$1.resolve()) != promiseTag || Set$1 && getTag$3(new Set$1()) != setTag$3 || WeakMap && getTag$3(new WeakMap()) != weakMapTag$1) {
|
|
1093
1063
|
getTag$3 = function(value) {
|
|
1094
1064
|
var result = baseGetTag(value), Ctor = result == objectTag$1 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
1095
1065
|
if (ctorString) {
|
|
@@ -1124,10 +1094,10 @@ var _initCloneArray = initCloneArray$1;
|
|
|
1124
1094
|
var root = _root;
|
|
1125
1095
|
var Uint8Array$1 = root.Uint8Array;
|
|
1126
1096
|
var _Uint8Array = Uint8Array$1;
|
|
1127
|
-
var
|
|
1097
|
+
var Uint8Array = _Uint8Array;
|
|
1128
1098
|
function cloneArrayBuffer$3(arrayBuffer) {
|
|
1129
1099
|
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
1130
|
-
new
|
|
1100
|
+
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
|
|
1131
1101
|
return result;
|
|
1132
1102
|
}
|
|
1133
1103
|
var _cloneArrayBuffer = cloneArrayBuffer$3;
|
|
@@ -1340,7 +1310,7 @@ const formatCheckStatus = (check) => {
|
|
|
1340
1310
|
const formatBasicTree = (trees, keyName = "id", childrenName = "children", parentId) => {
|
|
1341
1311
|
return trees.map((item) => {
|
|
1342
1312
|
var _a;
|
|
1343
|
-
const curItem =
|
|
1313
|
+
const curItem = { ...item, parentId };
|
|
1344
1314
|
if (!(keyName in curItem) || !curItem[keyName]) {
|
|
1345
1315
|
curItem[keyName] = randomId();
|
|
1346
1316
|
curItem.idType = "random";
|
|
@@ -1375,7 +1345,8 @@ function useDragdrop(props, data) {
|
|
|
1375
1345
|
draggingTreeNode: null
|
|
1376
1346
|
});
|
|
1377
1347
|
const treeIdMapValue = computed(() => {
|
|
1378
|
-
return data.value.reduce((acc, cur) =>
|
|
1348
|
+
return data.value.reduce((acc, cur) => ({
|
|
1349
|
+
...acc,
|
|
1379
1350
|
[cur.id]: cur
|
|
1380
1351
|
}), {});
|
|
1381
1352
|
});
|
|
@@ -1587,7 +1558,7 @@ function useLazyLoad() {
|
|
|
1587
1558
|
}
|
|
1588
1559
|
function useOperate() {
|
|
1589
1560
|
return function useOperateFn(data, core) {
|
|
1590
|
-
const { setNodeValue, getChildren, getIndex, getLevel } = core;
|
|
1561
|
+
const { setNodeValue, getChildren, getIndex, getLevel, getParent } = core;
|
|
1591
1562
|
const insertBefore = (parentNode, node, referenceNode) => {
|
|
1592
1563
|
const children = getChildren(parentNode, {
|
|
1593
1564
|
recursive: false
|
|
@@ -1604,13 +1575,14 @@ function useOperate() {
|
|
|
1604
1575
|
if (lastChild) {
|
|
1605
1576
|
setNodeValue(lastChild, "parentChildNodeCount", children.length + 1);
|
|
1606
1577
|
}
|
|
1607
|
-
const currentNode = ref(
|
|
1578
|
+
const currentNode = ref({
|
|
1579
|
+
...node,
|
|
1608
1580
|
level: getLevel(parentNode) + 1,
|
|
1609
1581
|
parentId: parentNode.id,
|
|
1610
1582
|
isLeaf: true,
|
|
1611
1583
|
parentChildNodeCount: children.length + 1,
|
|
1612
1584
|
currentIndex: (lastChild == null ? void 0 : lastChild.currentIndex) + 1
|
|
1613
|
-
})
|
|
1585
|
+
});
|
|
1614
1586
|
if (currentNode.value.id === void 0) {
|
|
1615
1587
|
currentNode.value.id = randomId();
|
|
1616
1588
|
}
|
|
@@ -1629,6 +1601,9 @@ function useOperate() {
|
|
|
1629
1601
|
return item.id !== node.id;
|
|
1630
1602
|
}
|
|
1631
1603
|
});
|
|
1604
|
+
if (getParent(node) && getChildren(getParent(node)).length === 0) {
|
|
1605
|
+
setNodeValue(getParent(node), "isLeaf", true);
|
|
1606
|
+
}
|
|
1632
1607
|
};
|
|
1633
1608
|
const editNode = (node, label) => {
|
|
1634
1609
|
setNodeValue(node, "label", label);
|
|
@@ -2385,7 +2360,7 @@ var lodash = { exports: {} };
|
|
|
2385
2360
|
var objectCtorString = funcToString2.call(Object2);
|
|
2386
2361
|
var oldDash = root2._;
|
|
2387
2362
|
var reIsNative2 = RegExp2("^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar2, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
2388
|
-
var
|
|
2363
|
+
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;
|
|
2389
2364
|
var defineProperty2 = function() {
|
|
2390
2365
|
try {
|
|
2391
2366
|
var func = getNative2(Object2, "defineProperty");
|
|
@@ -2395,11 +2370,11 @@ var lodash = { exports: {} };
|
|
|
2395
2370
|
}
|
|
2396
2371
|
}();
|
|
2397
2372
|
var ctxClearTimeout = context.clearTimeout !== root2.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root2.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root2.setTimeout && context.setTimeout;
|
|
2398
|
-
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols2 = Object2.getOwnPropertySymbols, nativeIsBuffer =
|
|
2399
|
-
var DataView2 = getNative2(context, "DataView"), Map2 = getNative2(context, "Map"), Promise2 = getNative2(context, "Promise"), Set2 = getNative2(context, "Set"),
|
|
2400
|
-
var metaMap =
|
|
2373
|
+
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;
|
|
2374
|
+
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");
|
|
2375
|
+
var metaMap = WeakMap2 && new WeakMap2();
|
|
2401
2376
|
var realNames = {};
|
|
2402
|
-
var dataViewCtorString2 = toSource2(DataView2), mapCtorString2 = toSource2(Map2), promiseCtorString2 = toSource2(Promise2), setCtorString2 = toSource2(Set2), weakMapCtorString2 = toSource2(
|
|
2377
|
+
var dataViewCtorString2 = toSource2(DataView2), mapCtorString2 = toSource2(Map2), promiseCtorString2 = toSource2(Promise2), setCtorString2 = toSource2(Set2), weakMapCtorString2 = toSource2(WeakMap2);
|
|
2403
2378
|
var symbolProto2 = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf2 = symbolProto2 ? symbolProto2.valueOf : undefined$1, symbolToString = symbolProto2 ? symbolProto2.toString : undefined$1;
|
|
2404
2379
|
function lodash2(value) {
|
|
2405
2380
|
if (isObjectLike2(value) && !isArray2(value) && !(value instanceof LazyWrapper)) {
|
|
@@ -3647,7 +3622,7 @@ var lodash = { exports: {} };
|
|
|
3647
3622
|
}
|
|
3648
3623
|
function cloneArrayBuffer2(arrayBuffer) {
|
|
3649
3624
|
var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
3650
|
-
new
|
|
3625
|
+
new Uint8Array2(result2).set(new Uint8Array2(arrayBuffer));
|
|
3651
3626
|
return result2;
|
|
3652
3627
|
}
|
|
3653
3628
|
function cloneDataView2(dataView, isDeep) {
|
|
@@ -4229,7 +4204,7 @@ var lodash = { exports: {} };
|
|
|
4229
4204
|
object4 = object4.buffer;
|
|
4230
4205
|
other = other.buffer;
|
|
4231
4206
|
case arrayBufferTag2:
|
|
4232
|
-
if (object4.byteLength != other.byteLength || !equalFunc(new
|
|
4207
|
+
if (object4.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object4), new Uint8Array2(other))) {
|
|
4233
4208
|
return false;
|
|
4234
4209
|
}
|
|
4235
4210
|
return true;
|
|
@@ -4391,7 +4366,7 @@ var lodash = { exports: {} };
|
|
|
4391
4366
|
return result2;
|
|
4392
4367
|
};
|
|
4393
4368
|
var getTag2 = baseGetTag2;
|
|
4394
|
-
if (DataView2 && getTag2(new DataView2(new ArrayBuffer(1))) != dataViewTag2 || Map2 && getTag2(new Map2()) != mapTag2 || Promise2 && getTag2(Promise2.resolve()) != promiseTag2 || Set2 && getTag2(new Set2()) != setTag2 ||
|
|
4369
|
+
if (DataView2 && getTag2(new DataView2(new ArrayBuffer(1))) != dataViewTag2 || Map2 && getTag2(new Map2()) != mapTag2 || Promise2 && getTag2(Promise2.resolve()) != promiseTag2 || Set2 && getTag2(new Set2()) != setTag2 || WeakMap2 && getTag2(new WeakMap2()) != weakMapTag2) {
|
|
4395
4370
|
getTag2 = function(value) {
|
|
4396
4371
|
var result2 = baseGetTag2(value), Ctor = result2 == objectTag2 ? value.constructor : undefined$1, ctorString = Ctor ? toSource2(Ctor) : "";
|
|
4397
4372
|
if (ctorString) {
|
|
@@ -7285,11 +7260,13 @@ function useTree(tree2, plugins = [], context) {
|
|
|
7285
7260
|
const core = useCore()(treeData);
|
|
7286
7261
|
const lazyLode = useLazyLoad()(treeData, core, context);
|
|
7287
7262
|
const pluginMethods = DEFAULT_TREE_PLUGINS.concat(plugins).reduce((acc, plugin) => {
|
|
7288
|
-
return
|
|
7263
|
+
return { ...acc, ...plugin(treeData, core, context, lazyLode) };
|
|
7289
7264
|
}, {});
|
|
7290
|
-
return
|
|
7291
|
-
treeData
|
|
7292
|
-
|
|
7265
|
+
return {
|
|
7266
|
+
treeData,
|
|
7267
|
+
...pluginMethods,
|
|
7268
|
+
...core
|
|
7269
|
+
};
|
|
7293
7270
|
}
|
|
7294
7271
|
const ns$2 = useNamespace("tree");
|
|
7295
7272
|
function useTreeNode(data) {
|
|
@@ -7653,7 +7630,8 @@ const commonProps = {
|
|
|
7653
7630
|
default: "md"
|
|
7654
7631
|
}
|
|
7655
7632
|
};
|
|
7656
|
-
const checkboxProps =
|
|
7633
|
+
const checkboxProps = {
|
|
7634
|
+
...commonProps,
|
|
7657
7635
|
checked: {
|
|
7658
7636
|
type: Boolean,
|
|
7659
7637
|
default: false
|
|
@@ -7683,8 +7661,9 @@ const checkboxProps = __spreadProps(__spreadValues({}, commonProps), {
|
|
|
7683
7661
|
type: Boolean,
|
|
7684
7662
|
default: false
|
|
7685
7663
|
}
|
|
7686
|
-
}
|
|
7687
|
-
const checkboxGroupProps =
|
|
7664
|
+
};
|
|
7665
|
+
const checkboxGroupProps = {
|
|
7666
|
+
...commonProps,
|
|
7688
7667
|
modelValue: {
|
|
7689
7668
|
type: Array,
|
|
7690
7669
|
required: true
|
|
@@ -7721,7 +7700,7 @@ const checkboxGroupProps = __spreadProps(__spreadValues({}, commonProps), {
|
|
|
7721
7700
|
type: String,
|
|
7722
7701
|
default: ""
|
|
7723
7702
|
}
|
|
7724
|
-
}
|
|
7703
|
+
};
|
|
7725
7704
|
const checkboxGroupInjectionKey = Symbol("d-checkbox-group");
|
|
7726
7705
|
const formProps = {
|
|
7727
7706
|
data: {
|
|
@@ -7800,7 +7779,10 @@ function useFormValidation(itemContexts) {
|
|
|
7800
7779
|
try {
|
|
7801
7780
|
await field.validate("");
|
|
7802
7781
|
} catch (err) {
|
|
7803
|
-
errors =
|
|
7782
|
+
errors = {
|
|
7783
|
+
...errors,
|
|
7784
|
+
...err
|
|
7785
|
+
};
|
|
7804
7786
|
}
|
|
7805
7787
|
}
|
|
7806
7788
|
if (!Object.keys(errors).length) {
|
|
@@ -7857,11 +7839,12 @@ defineComponent({
|
|
|
7857
7839
|
}, {
|
|
7858
7840
|
deep: true
|
|
7859
7841
|
});
|
|
7860
|
-
provide(FORM_TOKEN, reactive(
|
|
7842
|
+
provide(FORM_TOKEN, reactive({
|
|
7843
|
+
...toRefs(props),
|
|
7861
7844
|
emit: ctx.emit,
|
|
7862
7845
|
addItemContext,
|
|
7863
7846
|
removeItemContext
|
|
7864
|
-
}))
|
|
7847
|
+
}));
|
|
7865
7848
|
ctx.expose({
|
|
7866
7849
|
validate,
|
|
7867
7850
|
validateFields,
|
|
@@ -8721,7 +8704,7 @@ var FormControl = defineComponent({
|
|
|
8721
8704
|
}
|
|
8722
8705
|
});
|
|
8723
8706
|
function _extends() {
|
|
8724
|
-
_extends = Object.assign
|
|
8707
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
8725
8708
|
for (var i = 1; i < arguments.length; i++) {
|
|
8726
8709
|
var source = arguments[i];
|
|
8727
8710
|
for (var key in source) {
|
|
@@ -8740,13 +8723,13 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
8740
8723
|
_setPrototypeOf(subClass, superClass);
|
|
8741
8724
|
}
|
|
8742
8725
|
function _getPrototypeOf(o) {
|
|
8743
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
|
|
8726
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
|
|
8744
8727
|
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
8745
8728
|
};
|
|
8746
8729
|
return _getPrototypeOf(o);
|
|
8747
8730
|
}
|
|
8748
8731
|
function _setPrototypeOf(o, p) {
|
|
8749
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
8732
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
|
|
8750
8733
|
o2.__proto__ = p2;
|
|
8751
8734
|
return o2;
|
|
8752
8735
|
};
|
|
@@ -8769,7 +8752,7 @@ function _isNativeReflectConstruct() {
|
|
|
8769
8752
|
}
|
|
8770
8753
|
function _construct(Parent, args, Class) {
|
|
8771
8754
|
if (_isNativeReflectConstruct()) {
|
|
8772
|
-
_construct = Reflect.construct;
|
|
8755
|
+
_construct = Reflect.construct.bind();
|
|
8773
8756
|
} else {
|
|
8774
8757
|
_construct = function _construct2(Parent2, args2, Class2) {
|
|
8775
8758
|
var a = [null];
|
|
@@ -9047,9 +9030,45 @@ var whitespace = function whitespace2(rule, value, source, errors, options) {
|
|
|
9047
9030
|
errors.push(format(options.messages.whitespace, rule.fullField));
|
|
9048
9031
|
}
|
|
9049
9032
|
};
|
|
9033
|
+
var urlReg;
|
|
9034
|
+
var getUrlRegex = function() {
|
|
9035
|
+
if (urlReg) {
|
|
9036
|
+
return urlReg;
|
|
9037
|
+
}
|
|
9038
|
+
var word = "[a-fA-F\\d:]";
|
|
9039
|
+
var b = function b2(options) {
|
|
9040
|
+
return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
|
|
9041
|
+
};
|
|
9042
|
+
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}";
|
|
9043
|
+
var v6seg = "[a-fA-F\\d]{1,4}";
|
|
9044
|
+
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();
|
|
9045
|
+
var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)");
|
|
9046
|
+
var v4exact = new RegExp("^" + v4 + "$");
|
|
9047
|
+
var v6exact = new RegExp("^" + v6 + "$");
|
|
9048
|
+
var ip = function ip2(options) {
|
|
9049
|
+
return options && options.exact ? v46Exact : new RegExp("(?:" + b(options) + v4 + b(options) + ")|(?:" + b(options) + v6 + b(options) + ")", "g");
|
|
9050
|
+
};
|
|
9051
|
+
ip.v4 = function(options) {
|
|
9052
|
+
return options && options.exact ? v4exact : new RegExp("" + b(options) + v4 + b(options), "g");
|
|
9053
|
+
};
|
|
9054
|
+
ip.v6 = function(options) {
|
|
9055
|
+
return options && options.exact ? v6exact : new RegExp("" + b(options) + v6 + b(options), "g");
|
|
9056
|
+
};
|
|
9057
|
+
var protocol = "(?:(?:[a-z]+:)?//)";
|
|
9058
|
+
var auth = "(?:\\S+(?::\\S*)?@)?";
|
|
9059
|
+
var ipv4 = ip.v4().source;
|
|
9060
|
+
var ipv6 = ip.v6().source;
|
|
9061
|
+
var host = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)";
|
|
9062
|
+
var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*";
|
|
9063
|
+
var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";
|
|
9064
|
+
var port = "(?::\\d{2,5})?";
|
|
9065
|
+
var path = '(?:[/?#][^\\s"]*)?';
|
|
9066
|
+
var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|" + host + domain + tld + ")" + port + path;
|
|
9067
|
+
urlReg = new RegExp("(?:^" + regex + "$)", "i");
|
|
9068
|
+
return urlReg;
|
|
9069
|
+
};
|
|
9050
9070
|
var pattern$2 = {
|
|
9051
9071
|
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,}))$/,
|
|
9052
|
-
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"),
|
|
9053
9072
|
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
9054
9073
|
};
|
|
9055
9074
|
var types = {
|
|
@@ -9091,7 +9110,7 @@ var types = {
|
|
|
9091
9110
|
return typeof value === "string" && value.length <= 320 && !!value.match(pattern$2.email);
|
|
9092
9111
|
},
|
|
9093
9112
|
url: function url(value) {
|
|
9094
|
-
return typeof value === "string" && value.length <= 2048 && !!value.match(
|
|
9113
|
+
return typeof value === "string" && value.length <= 2048 && !!value.match(getUrlRegex());
|
|
9095
9114
|
},
|
|
9096
9115
|
hex: function hex(value) {
|
|
9097
9116
|
return typeof value === "string" && !!value.match(pattern$2.hex);
|
|
@@ -9666,7 +9685,17 @@ var Schema = /* @__PURE__ */ function() {
|
|
|
9666
9685
|
if (rule.asyncValidator) {
|
|
9667
9686
|
res = rule.asyncValidator(rule, data.value, cb, data.source, options);
|
|
9668
9687
|
} else if (rule.validator) {
|
|
9669
|
-
|
|
9688
|
+
try {
|
|
9689
|
+
res = rule.validator(rule, data.value, cb, data.source, options);
|
|
9690
|
+
} catch (error) {
|
|
9691
|
+
console.error == null ? void 0 : console.error(error);
|
|
9692
|
+
if (!options.suppressValidatorError) {
|
|
9693
|
+
setTimeout(function() {
|
|
9694
|
+
throw error;
|
|
9695
|
+
}, 0);
|
|
9696
|
+
}
|
|
9697
|
+
cb(error.message);
|
|
9698
|
+
}
|
|
9670
9699
|
if (res === true) {
|
|
9671
9700
|
cb();
|
|
9672
9701
|
} else if (res === false) {
|
|
@@ -9787,10 +9816,7 @@ function useFormItemValidate(props, _rules) {
|
|
|
9787
9816
|
} else {
|
|
9788
9817
|
return rule.trigger === triggerVal;
|
|
9789
9818
|
}
|
|
9790
|
-
}).map((
|
|
9791
|
-
var rule = __objRest(_a, []);
|
|
9792
|
-
return rule;
|
|
9793
|
-
});
|
|
9819
|
+
}).map(({ ...rule }) => rule);
|
|
9794
9820
|
};
|
|
9795
9821
|
const onValidateSuccess = () => {
|
|
9796
9822
|
validateState.value = "success";
|
|
@@ -9863,15 +9889,12 @@ defineComponent({
|
|
|
9863
9889
|
props: formItemProps,
|
|
9864
9890
|
setup(props, ctx) {
|
|
9865
9891
|
const formContext = inject(FORM_TOKEN);
|
|
9866
|
-
const
|
|
9892
|
+
const {
|
|
9867
9893
|
messageType: itemMessageType,
|
|
9868
9894
|
popPosition: itemPopPosition,
|
|
9869
|
-
showFeedback: itemShowFeedback
|
|
9870
|
-
|
|
9871
|
-
|
|
9872
|
-
"popPosition",
|
|
9873
|
-
"showFeedback"
|
|
9874
|
-
]);
|
|
9895
|
+
showFeedback: itemShowFeedback,
|
|
9896
|
+
...otherProps
|
|
9897
|
+
} = toRefs(props);
|
|
9875
9898
|
const {
|
|
9876
9899
|
label,
|
|
9877
9900
|
helpTips,
|
|
@@ -9901,7 +9924,8 @@ defineComponent({
|
|
|
9901
9924
|
labelAlign: formContext.labelAlign
|
|
9902
9925
|
}));
|
|
9903
9926
|
provide(LABEL_DATA, labelData);
|
|
9904
|
-
const context = reactive(
|
|
9927
|
+
const context = reactive({
|
|
9928
|
+
...otherProps,
|
|
9905
9929
|
showFeedback,
|
|
9906
9930
|
messageType,
|
|
9907
9931
|
popPosition,
|
|
@@ -9911,7 +9935,7 @@ defineComponent({
|
|
|
9911
9935
|
validate,
|
|
9912
9936
|
resetField,
|
|
9913
9937
|
clearValidate
|
|
9914
|
-
})
|
|
9938
|
+
});
|
|
9915
9939
|
provide(FORM_ITEM_TOKEN, context);
|
|
9916
9940
|
ctx.expose({
|
|
9917
9941
|
resetField,
|
|
@@ -9936,8 +9960,8 @@ defineComponent({
|
|
|
9936
9960
|
"extra-info": extraInfo.value
|
|
9937
9961
|
}, {
|
|
9938
9962
|
default: () => {
|
|
9939
|
-
var
|
|
9940
|
-
return [(_b = (
|
|
9963
|
+
var _a, _b;
|
|
9964
|
+
return [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)];
|
|
9941
9965
|
}
|
|
9942
9966
|
})]);
|
|
9943
9967
|
}
|
|
@@ -10238,9 +10262,10 @@ defineComponent({
|
|
|
10238
10262
|
value: opt
|
|
10239
10263
|
});
|
|
10240
10264
|
} else if (typeof opt === "object") {
|
|
10241
|
-
mergedOpt = Object.assign({}, defaultOpt,
|
|
10265
|
+
mergedOpt = Object.assign({}, defaultOpt, {
|
|
10266
|
+
...opt,
|
|
10242
10267
|
label: opt.name
|
|
10243
|
-
})
|
|
10268
|
+
});
|
|
10244
10269
|
}
|
|
10245
10270
|
return createVNode(Checkbox, mergedOpt, null);
|
|
10246
10271
|
});
|
|
@@ -10829,10 +10854,11 @@ var ResizeObserver$1 = defineComponent({
|
|
|
10829
10854
|
Object.assign(state, size);
|
|
10830
10855
|
if (onResize) {
|
|
10831
10856
|
Promise.resolve().then(() => {
|
|
10832
|
-
onResize(
|
|
10857
|
+
onResize({
|
|
10858
|
+
...size,
|
|
10833
10859
|
offsetWidth,
|
|
10834
10860
|
offsetHeight
|
|
10835
|
-
}
|
|
10861
|
+
}, target);
|
|
10836
10862
|
});
|
|
10837
10863
|
}
|
|
10838
10864
|
}
|
|
@@ -10895,13 +10921,14 @@ var ResizeObserverContainer = defineComponent({
|
|
|
10895
10921
|
position: "relative",
|
|
10896
10922
|
overflow: "hidden"
|
|
10897
10923
|
};
|
|
10898
|
-
innerStyle.value =
|
|
10924
|
+
innerStyle.value = {
|
|
10925
|
+
...innerStyle.value,
|
|
10899
10926
|
transform: `translateY(${offset2.value}px)`,
|
|
10900
10927
|
position: "absolute",
|
|
10901
10928
|
left: 0,
|
|
10902
10929
|
right: 0,
|
|
10903
10930
|
top: 0
|
|
10904
|
-
}
|
|
10931
|
+
};
|
|
10905
10932
|
}
|
|
10906
10933
|
}, {
|
|
10907
10934
|
immediate: true
|
|
@@ -11389,9 +11416,10 @@ var VirtualList = defineComponent({
|
|
|
11389
11416
|
const componentStyle = computed(() => {
|
|
11390
11417
|
let cs = null;
|
|
11391
11418
|
if (props.height) {
|
|
11392
|
-
cs =
|
|
11393
|
-
maxHeight: isVirtual.value ? props.height + "px" : void 0
|
|
11394
|
-
|
|
11419
|
+
cs = {
|
|
11420
|
+
maxHeight: isVirtual.value ? props.height + "px" : void 0,
|
|
11421
|
+
...ScrollStyle
|
|
11422
|
+
};
|
|
11395
11423
|
if (isVirtual.value) {
|
|
11396
11424
|
cs.overflowY = "hidden";
|
|
11397
11425
|
if (state.scrollMoving) {
|