vue-devui 1.0.0-rc.12 → 1.0.0-rc.15
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/README.md +161 -149
- package/alert/index.umd.js +1 -1
- package/auto-complete/index.es.js +243 -83
- package/auto-complete/index.umd.js +29 -18
- 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 +23 -43
- 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/checkbox/style.css +1 -1
- 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 +1423 -248
- package/date-picker-pro/index.umd.js +25 -14
- 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 +12 -23
- package/dropdown/index.umd.js +1 -1
- package/editable-select/index.es.js +260 -105
- 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 +21 -10
- package/fullscreen/index.umd.js +1 -1
- package/grid/index.es.js +7 -20
- package/grid/index.umd.js +1 -1
- package/icon/index.es.js +2 -1
- package/icon/index.umd.js +1 -1
- package/icon/style.css +1 -1
- package/image-preview/index.es.js +12 -23
- package/image-preview/index.umd.js +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +241 -76
- package/input/index.umd.js +27 -16
- package/input/style.css +1 -1
- package/input-number/index.es.js +2 -20
- package/input-number/index.umd.js +1 -1
- package/layout/index.es.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/message/index.d.ts +7 -0
- package/message/index.es.js +534 -0
- package/message/index.umd.js +1 -0
- package/message/package.json +7 -0
- package/message/style.css +1 -0
- package/modal/index.es.js +13 -44
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +45 -54
- package/notification/index.umd.js +1 -1
- package/notification/style.css +1 -1
- package/nuxt/components/Message.js +3 -0
- package/nuxt/components/animationInjectionKey.js +3 -0
- package/nuxt/components/messageProps.js +3 -0
- package/nuxt/components/roundInjectionKey.js +3 -0
- package/nuxt/components/skeletonItemProps.js +3 -0
- package/overlay/index.es.js +1 -1
- package/overlay/index.umd.js +1 -1
- package/package.json +2 -2
- package/pagination/index.es.js +152 -2
- 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 +28 -17
- package/radio/style.css +1 -1
- package/rate/index.umd.js +1 -1
- package/result/index.es.js +2 -1
- package/result/index.umd.js +1 -1
- package/result/style.css +1 -1
- package/ripple/index.es.js +5 -18
- package/ripple/index.umd.js +1 -1
- package/search/index.es.js +258 -80
- package/search/index.umd.js +27 -16
- package/search/style.css +1 -1
- package/select/index.es.js +352 -146
- package/select/index.umd.js +28 -17
- package/select/style.css +1 -1
- package/skeleton/index.es.js +87 -261
- package/skeleton/index.umd.js +1 -1
- package/skeleton/style.css +1 -1
- package/slider/index.umd.js +1 -1
- package/splitter/index.es.js +175 -32
- package/splitter/index.umd.js +13 -13
- package/statistic/index.es.js +0 -21
- package/statistic/index.umd.js +1 -1
- package/status/index.umd.js +1 -1
- package/steps/index.es.js +2 -1
- package/steps/index.umd.js +1 -1
- package/steps/style.css +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +85 -71
- package/switch/index.umd.js +25 -14
- package/table/index.es.js +465 -130
- package/table/index.umd.js +24 -13
- package/table/style.css +1 -1
- package/tabs/index.es.js +21 -11
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +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 +289 -116
- package/time-picker/index.umd.js +27 -16
- package/time-picker/style.css +1 -1
- package/time-select/index.es.js +352 -146
- package/time-select/index.umd.js +26 -15
- package/time-select/style.css +1 -1
- package/timeline/index.es.js +2 -1
- package/timeline/index.umd.js +1 -1
- package/timeline/style.css +1 -1
- package/tooltip/index.es.js +1 -1
- package/tooltip/index.umd.js +4 -4
- package/tree/index.es.js +515 -144
- package/tree/index.umd.js +26 -15
- package/tree/style.css +1 -1
- package/upload/index.es.js +197 -81
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +13710 -12898
- package/vue-devui.umd.js +30 -19
package/table/index.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 { computed, ref, watchEffect, watch, getCurrentInstance, unref, defineComponent, inject, createVNode, toRefs, onMounted, onUnmounted, Transition, mergeProps, nextTick, Comment, Text, h, Fragment, withDirectives, cloneVNode, provide, Teleport, vShow, resolveDynamicComponent, render, resolveDirective, toRef, reactive, createTextVNode, onBeforeUnmount, isVNode, onBeforeMount } from "vue";
|
|
1
|
+
import { computed, ref, watchEffect, watch, getCurrentInstance, unref, defineComponent, inject, createVNode, mergeProps, toRefs, onMounted, onUnmounted, Transition, nextTick, Comment, Text, Fragment, h, withDirectives, cloneVNode, provide, Teleport, vShow, resolveDynamicComponent, render, resolveDirective, toRef, reactive, createTextVNode, onBeforeUnmount, isVNode, onBeforeMount, onUpdated } from "vue";
|
|
37
2
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
38
3
|
import { onClickOutside } from "@vueuse/core";
|
|
39
4
|
const tableProps = {
|
|
@@ -124,6 +89,10 @@ const tableProps = {
|
|
|
124
89
|
indent: {
|
|
125
90
|
type: Number,
|
|
126
91
|
default: 16
|
|
92
|
+
},
|
|
93
|
+
lazy: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
default: false
|
|
127
96
|
}
|
|
128
97
|
};
|
|
129
98
|
const TABLE_TOKEN = Symbol();
|
|
@@ -429,6 +398,32 @@ function useExpand(dataSource, table2) {
|
|
|
429
398
|
toggleRowExpansion
|
|
430
399
|
};
|
|
431
400
|
}
|
|
401
|
+
function useEditTableCell() {
|
|
402
|
+
const tableInstance = getCurrentInstance();
|
|
403
|
+
const rowKey = tableInstance.props.rowKey || "";
|
|
404
|
+
const tableCellModeMap = ref(/* @__PURE__ */ new Map());
|
|
405
|
+
const setCellMode = (row, rowIndex, fields, cellMode) => {
|
|
406
|
+
if (Array.isArray(fields)) {
|
|
407
|
+
fields.forEach((item) => {
|
|
408
|
+
const cellKey = `${getRowIdentity(row, rowKey, rowIndex)}-${item}-cell`;
|
|
409
|
+
tableCellModeMap.value.set(cellKey, cellMode);
|
|
410
|
+
});
|
|
411
|
+
} else {
|
|
412
|
+
const cellKey = `${getRowIdentity(row, rowKey, rowIndex)}-${fields}-cell`;
|
|
413
|
+
tableCellModeMap.value.set(cellKey, cellMode);
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
const resetCellMode = () => {
|
|
417
|
+
for (const item of tableCellModeMap.value.keys()) {
|
|
418
|
+
tableCellModeMap.value.set(item, "readonly");
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
return {
|
|
422
|
+
tableCellModeMap,
|
|
423
|
+
setCellMode,
|
|
424
|
+
resetCellMode
|
|
425
|
+
};
|
|
426
|
+
}
|
|
432
427
|
function replaceColumn(array4, column2) {
|
|
433
428
|
return array4.map((item) => {
|
|
434
429
|
var _a;
|
|
@@ -461,6 +456,7 @@ function createColumnGenerator() {
|
|
|
461
456
|
});
|
|
462
457
|
};
|
|
463
458
|
const insertColumn = (column2, parent) => {
|
|
459
|
+
var _a;
|
|
464
460
|
const array4 = unref(_columns);
|
|
465
461
|
let newColumns = [];
|
|
466
462
|
if (!parent) {
|
|
@@ -470,7 +466,7 @@ function createColumnGenerator() {
|
|
|
470
466
|
if (parent && !parent.children) {
|
|
471
467
|
parent.children = [];
|
|
472
468
|
}
|
|
473
|
-
parent.children.push(column2);
|
|
469
|
+
(_a = parent == null ? void 0 : parent.children) == null ? void 0 : _a.push(column2);
|
|
474
470
|
newColumns = replaceColumn(array4, parent);
|
|
475
471
|
}
|
|
476
472
|
sortColumn();
|
|
@@ -639,6 +635,7 @@ function createStore(dataSource, table2) {
|
|
|
639
635
|
const { sortData, thList } = createSorter(dataSource, flatRows);
|
|
640
636
|
const { isFixedLeft } = createFixedLogic(_columns);
|
|
641
637
|
const { isRowExpanded, updateExpandRows, setExpandRows, toggleRowExpansion } = useExpand(_data, table2);
|
|
638
|
+
const { tableCellModeMap, setCellMode, resetCellMode } = useEditTableCell();
|
|
642
639
|
watch(dataSource, (value) => {
|
|
643
640
|
_data.value = [...value];
|
|
644
641
|
updateExpandRows();
|
|
@@ -657,7 +654,8 @@ function createStore(dataSource, table2) {
|
|
|
657
654
|
_halfChecked,
|
|
658
655
|
isFixedLeft,
|
|
659
656
|
thList,
|
|
660
|
-
firstDefaultColumn
|
|
657
|
+
firstDefaultColumn,
|
|
658
|
+
tableCellModeMap
|
|
661
659
|
},
|
|
662
660
|
insertColumn,
|
|
663
661
|
sortColumn,
|
|
@@ -672,7 +670,9 @@ function createStore(dataSource, table2) {
|
|
|
672
670
|
setExpandRows,
|
|
673
671
|
toggleRowExpansion,
|
|
674
672
|
toggleRowSelection,
|
|
675
|
-
updateFirstDefaultColumn
|
|
673
|
+
updateFirstDefaultColumn,
|
|
674
|
+
setCellMode,
|
|
675
|
+
resetCellMode
|
|
676
676
|
};
|
|
677
677
|
}
|
|
678
678
|
var ColGroup = defineComponent({
|
|
@@ -697,6 +697,9 @@ const sortProps = {
|
|
|
697
697
|
}
|
|
698
698
|
};
|
|
699
699
|
var sort = "";
|
|
700
|
+
const XLINK_HREF = {
|
|
701
|
+
"xlink:href": "#sort-svg-path-1"
|
|
702
|
+
};
|
|
700
703
|
var Sort = defineComponent({
|
|
701
704
|
props: sortProps,
|
|
702
705
|
emits: ["sort"],
|
|
@@ -755,10 +758,9 @@ var Sort = defineComponent({
|
|
|
755
758
|
"stroke-width": "1",
|
|
756
759
|
"fill": "none",
|
|
757
760
|
"fill-rule": "evenodd"
|
|
758
|
-
}, [createVNode("use", {
|
|
759
|
-
"fill-rule": "evenodd"
|
|
760
|
-
|
|
761
|
-
}, null), createVNode("polygon", {
|
|
761
|
+
}, [createVNode("use", mergeProps({
|
|
762
|
+
"fill-rule": "evenodd"
|
|
763
|
+
}, XLINK_HREF), null), createVNode("polygon", {
|
|
762
764
|
"points": "8 4 11 7 5 7"
|
|
763
765
|
}, null), createVNode("polygon", {
|
|
764
766
|
"points": "8 12 5 9 11 9"
|
|
@@ -828,7 +830,14 @@ function subscribeEvent(dom, type4, callback) {
|
|
|
828
830
|
dom == null ? void 0 : dom.removeEventListener(type4, callback);
|
|
829
831
|
};
|
|
830
832
|
}
|
|
831
|
-
const useDropdownEvent = ({
|
|
833
|
+
const useDropdownEvent = ({
|
|
834
|
+
id,
|
|
835
|
+
isOpen,
|
|
836
|
+
origin,
|
|
837
|
+
dropdownRef,
|
|
838
|
+
props,
|
|
839
|
+
emit
|
|
840
|
+
}) => {
|
|
832
841
|
let overlayEnter = false;
|
|
833
842
|
let originEnter = false;
|
|
834
843
|
const { trigger, closeScope, closeOnMouseLeaveMenu } = toRefs(props);
|
|
@@ -927,13 +936,14 @@ function useDropdown(id, visible, isOpen, origin, dropdownRef, popDirection, emi
|
|
|
927
936
|
watch([isOpen, dropdownRef], ([isOpenVal, dropdownEl]) => {
|
|
928
937
|
var _a;
|
|
929
938
|
if (isOpenVal) {
|
|
930
|
-
dropdownMap.set(id,
|
|
939
|
+
dropdownMap.set(id, {
|
|
940
|
+
...dropdownMap.get(id),
|
|
931
941
|
menuEl: dropdownEl,
|
|
932
942
|
toggle: () => {
|
|
933
943
|
isOpen.value = false;
|
|
934
944
|
emit("toggle", isOpen.value);
|
|
935
945
|
}
|
|
936
|
-
})
|
|
946
|
+
});
|
|
937
947
|
for (const value of dropdownMap.values()) {
|
|
938
948
|
if ((_a = value.menuEl) == null ? void 0 : _a.contains(origin.value)) {
|
|
939
949
|
value.child = dropdownEl;
|
|
@@ -1550,7 +1560,8 @@ function useIconDom(props, ctx) {
|
|
|
1550
1560
|
"class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns2.m("spin")],
|
|
1551
1561
|
"style": {
|
|
1552
1562
|
width: iconSize.value || "",
|
|
1553
|
-
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)
|
|
1563
|
+
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`,
|
|
1564
|
+
verticalAlign: "middle"
|
|
1554
1565
|
}
|
|
1555
1566
|
}, ctx.attrs), null);
|
|
1556
1567
|
};
|
|
@@ -1631,8 +1642,8 @@ defineComponent({
|
|
|
1631
1642
|
});
|
|
1632
1643
|
class View {
|
|
1633
1644
|
constructor() {
|
|
1634
|
-
|
|
1635
|
-
|
|
1645
|
+
this.top = "50%";
|
|
1646
|
+
this.left = "50%";
|
|
1636
1647
|
}
|
|
1637
1648
|
}
|
|
1638
1649
|
const loadingProps = {
|
|
@@ -1650,13 +1661,9 @@ const loadingProps = {
|
|
|
1650
1661
|
};
|
|
1651
1662
|
class LoadingOptions {
|
|
1652
1663
|
constructor() {
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
__publicField(this, "backdrop", true);
|
|
1657
|
-
__publicField(this, "positionType", "relative");
|
|
1658
|
-
__publicField(this, "view", new View());
|
|
1659
|
-
__publicField(this, "zIndex");
|
|
1664
|
+
this.backdrop = true;
|
|
1665
|
+
this.positionType = "relative";
|
|
1666
|
+
this.view = new View();
|
|
1660
1667
|
}
|
|
1661
1668
|
}
|
|
1662
1669
|
var loading = "";
|
|
@@ -1724,7 +1731,7 @@ var Loading = defineComponent({
|
|
|
1724
1731
|
});
|
|
1725
1732
|
const COMPONENT_CONTAINER_SYMBOL = Symbol("dev_component_container");
|
|
1726
1733
|
function createComponent(component, props, children = null) {
|
|
1727
|
-
const vnode = h(component,
|
|
1734
|
+
const vnode = h(component, { ...props }, children);
|
|
1728
1735
|
const container = document.createElement("div");
|
|
1729
1736
|
vnode[COMPONENT_CONTAINER_SYMBOL] = container;
|
|
1730
1737
|
render(vnode, container);
|
|
@@ -1811,9 +1818,12 @@ const removeAttribute = (el) => {
|
|
|
1811
1818
|
};
|
|
1812
1819
|
const handleProps = (el, vprops) => {
|
|
1813
1820
|
var _a;
|
|
1814
|
-
const props =
|
|
1821
|
+
const props = {
|
|
1822
|
+
...new LoadingOptions(),
|
|
1823
|
+
...vprops
|
|
1824
|
+
};
|
|
1815
1825
|
const loadingTemplateRef = props.loadingTemplateRef;
|
|
1816
|
-
const loadingInstance = createComponent(loadingConstructor,
|
|
1826
|
+
const loadingInstance = createComponent(loadingConstructor, { ...props }, loadingTemplateRef ? () => loadingTemplateRef : null);
|
|
1817
1827
|
el.style.position = props.positionType;
|
|
1818
1828
|
el.options = props;
|
|
1819
1829
|
el.instance = loadingInstance;
|
|
@@ -2580,7 +2590,7 @@ var lodash = { exports: {} };
|
|
|
2580
2590
|
var objectCtorString = funcToString.call(Object2);
|
|
2581
2591
|
var oldDash = root._;
|
|
2582
2592
|
var reIsNative = RegExp2("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
2583
|
-
var
|
|
2593
|
+
var Buffer = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array = context.Uint8Array, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined$1;
|
|
2584
2594
|
var defineProperty = function() {
|
|
2585
2595
|
try {
|
|
2586
2596
|
var func = getNative(Object2, "defineProperty");
|
|
@@ -2590,11 +2600,11 @@ var lodash = { exports: {} };
|
|
|
2590
2600
|
}
|
|
2591
2601
|
}();
|
|
2592
2602
|
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
|
2593
|
-
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer =
|
|
2594
|
-
var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"),
|
|
2595
|
-
var metaMap =
|
|
2603
|
+
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
|
|
2604
|
+
var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
|
|
2605
|
+
var metaMap = WeakMap && new WeakMap();
|
|
2596
2606
|
var realNames = {};
|
|
2597
|
-
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(
|
|
2607
|
+
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap);
|
|
2598
2608
|
var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
|
|
2599
2609
|
function lodash2(value) {
|
|
2600
2610
|
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
|
@@ -3842,7 +3852,7 @@ var lodash = { exports: {} };
|
|
|
3842
3852
|
}
|
|
3843
3853
|
function cloneArrayBuffer(arrayBuffer) {
|
|
3844
3854
|
var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
3845
|
-
new
|
|
3855
|
+
new Uint8Array(result2).set(new Uint8Array(arrayBuffer));
|
|
3846
3856
|
return result2;
|
|
3847
3857
|
}
|
|
3848
3858
|
function cloneDataView(dataView, isDeep) {
|
|
@@ -4424,7 +4434,7 @@ var lodash = { exports: {} };
|
|
|
4424
4434
|
object4 = object4.buffer;
|
|
4425
4435
|
other = other.buffer;
|
|
4426
4436
|
case arrayBufferTag:
|
|
4427
|
-
if (object4.byteLength != other.byteLength || !equalFunc(new
|
|
4437
|
+
if (object4.byteLength != other.byteLength || !equalFunc(new Uint8Array(object4), new Uint8Array(other))) {
|
|
4428
4438
|
return false;
|
|
4429
4439
|
}
|
|
4430
4440
|
return true;
|
|
@@ -4586,7 +4596,7 @@ var lodash = { exports: {} };
|
|
|
4586
4596
|
return result2;
|
|
4587
4597
|
};
|
|
4588
4598
|
var getTag = baseGetTag;
|
|
4589
|
-
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag ||
|
|
4599
|
+
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
|
|
4590
4600
|
getTag = function(value) {
|
|
4591
4601
|
var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : "";
|
|
4592
4602
|
if (ctorString) {
|
|
@@ -7413,7 +7423,8 @@ const commonProps = {
|
|
|
7413
7423
|
default: "md"
|
|
7414
7424
|
}
|
|
7415
7425
|
};
|
|
7416
|
-
const checkboxProps =
|
|
7426
|
+
const checkboxProps = {
|
|
7427
|
+
...commonProps,
|
|
7417
7428
|
checked: {
|
|
7418
7429
|
type: Boolean,
|
|
7419
7430
|
default: false
|
|
@@ -7443,8 +7454,9 @@ const checkboxProps = __spreadProps(__spreadValues({}, commonProps), {
|
|
|
7443
7454
|
type: Boolean,
|
|
7444
7455
|
default: false
|
|
7445
7456
|
}
|
|
7446
|
-
}
|
|
7447
|
-
const checkboxGroupProps =
|
|
7457
|
+
};
|
|
7458
|
+
const checkboxGroupProps = {
|
|
7459
|
+
...commonProps,
|
|
7448
7460
|
modelValue: {
|
|
7449
7461
|
type: Array,
|
|
7450
7462
|
required: true
|
|
@@ -7481,7 +7493,7 @@ const checkboxGroupProps = __spreadProps(__spreadValues({}, commonProps), {
|
|
|
7481
7493
|
type: String,
|
|
7482
7494
|
default: ""
|
|
7483
7495
|
}
|
|
7484
|
-
}
|
|
7496
|
+
};
|
|
7485
7497
|
const checkboxGroupInjectionKey = Symbol("d-checkbox-group");
|
|
7486
7498
|
const formProps = {
|
|
7487
7499
|
data: {
|
|
@@ -7560,7 +7572,10 @@ function useFormValidation(itemContexts) {
|
|
|
7560
7572
|
try {
|
|
7561
7573
|
await field.validate("");
|
|
7562
7574
|
} catch (err) {
|
|
7563
|
-
errors =
|
|
7575
|
+
errors = {
|
|
7576
|
+
...errors,
|
|
7577
|
+
...err
|
|
7578
|
+
};
|
|
7564
7579
|
}
|
|
7565
7580
|
}
|
|
7566
7581
|
if (!Object.keys(errors).length) {
|
|
@@ -7617,11 +7632,12 @@ defineComponent({
|
|
|
7617
7632
|
}, {
|
|
7618
7633
|
deep: true
|
|
7619
7634
|
});
|
|
7620
|
-
provide(FORM_TOKEN, reactive(
|
|
7635
|
+
provide(FORM_TOKEN, reactive({
|
|
7636
|
+
...toRefs(props),
|
|
7621
7637
|
emit: ctx.emit,
|
|
7622
7638
|
addItemContext,
|
|
7623
7639
|
removeItemContext
|
|
7624
|
-
}))
|
|
7640
|
+
}));
|
|
7625
7641
|
ctx.expose({
|
|
7626
7642
|
validate,
|
|
7627
7643
|
validateFields,
|
|
@@ -8194,7 +8210,7 @@ var FormControl = defineComponent({
|
|
|
8194
8210
|
}
|
|
8195
8211
|
});
|
|
8196
8212
|
function _extends() {
|
|
8197
|
-
_extends = Object.assign
|
|
8213
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
8198
8214
|
for (var i = 1; i < arguments.length; i++) {
|
|
8199
8215
|
var source = arguments[i];
|
|
8200
8216
|
for (var key in source) {
|
|
@@ -8213,13 +8229,13 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
8213
8229
|
_setPrototypeOf(subClass, superClass);
|
|
8214
8230
|
}
|
|
8215
8231
|
function _getPrototypeOf(o) {
|
|
8216
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
|
|
8232
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
|
|
8217
8233
|
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
8218
8234
|
};
|
|
8219
8235
|
return _getPrototypeOf(o);
|
|
8220
8236
|
}
|
|
8221
8237
|
function _setPrototypeOf(o, p) {
|
|
8222
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
8238
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
|
|
8223
8239
|
o2.__proto__ = p2;
|
|
8224
8240
|
return o2;
|
|
8225
8241
|
};
|
|
@@ -8242,7 +8258,7 @@ function _isNativeReflectConstruct() {
|
|
|
8242
8258
|
}
|
|
8243
8259
|
function _construct(Parent, args, Class) {
|
|
8244
8260
|
if (_isNativeReflectConstruct()) {
|
|
8245
|
-
_construct = Reflect.construct;
|
|
8261
|
+
_construct = Reflect.construct.bind();
|
|
8246
8262
|
} else {
|
|
8247
8263
|
_construct = function _construct2(Parent2, args2, Class2) {
|
|
8248
8264
|
var a = [null];
|
|
@@ -8520,9 +8536,45 @@ var whitespace = function whitespace2(rule, value, source, errors, options) {
|
|
|
8520
8536
|
errors.push(format(options.messages.whitespace, rule.fullField));
|
|
8521
8537
|
}
|
|
8522
8538
|
};
|
|
8539
|
+
var urlReg;
|
|
8540
|
+
var getUrlRegex = function() {
|
|
8541
|
+
if (urlReg) {
|
|
8542
|
+
return urlReg;
|
|
8543
|
+
}
|
|
8544
|
+
var word = "[a-fA-F\\d:]";
|
|
8545
|
+
var b = function b2(options) {
|
|
8546
|
+
return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
|
|
8547
|
+
};
|
|
8548
|
+
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}";
|
|
8549
|
+
var v6seg = "[a-fA-F\\d]{1,4}";
|
|
8550
|
+
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();
|
|
8551
|
+
var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)");
|
|
8552
|
+
var v4exact = new RegExp("^" + v4 + "$");
|
|
8553
|
+
var v6exact = new RegExp("^" + v6 + "$");
|
|
8554
|
+
var ip = function ip2(options) {
|
|
8555
|
+
return options && options.exact ? v46Exact : new RegExp("(?:" + b(options) + v4 + b(options) + ")|(?:" + b(options) + v6 + b(options) + ")", "g");
|
|
8556
|
+
};
|
|
8557
|
+
ip.v4 = function(options) {
|
|
8558
|
+
return options && options.exact ? v4exact : new RegExp("" + b(options) + v4 + b(options), "g");
|
|
8559
|
+
};
|
|
8560
|
+
ip.v6 = function(options) {
|
|
8561
|
+
return options && options.exact ? v6exact : new RegExp("" + b(options) + v6 + b(options), "g");
|
|
8562
|
+
};
|
|
8563
|
+
var protocol = "(?:(?:[a-z]+:)?//)";
|
|
8564
|
+
var auth = "(?:\\S+(?::\\S*)?@)?";
|
|
8565
|
+
var ipv4 = ip.v4().source;
|
|
8566
|
+
var ipv6 = ip.v6().source;
|
|
8567
|
+
var host = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)";
|
|
8568
|
+
var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*";
|
|
8569
|
+
var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";
|
|
8570
|
+
var port = "(?::\\d{2,5})?";
|
|
8571
|
+
var path = '(?:[/?#][^\\s"]*)?';
|
|
8572
|
+
var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|" + host + domain + tld + ")" + port + path;
|
|
8573
|
+
urlReg = new RegExp("(?:^" + regex + "$)", "i");
|
|
8574
|
+
return urlReg;
|
|
8575
|
+
};
|
|
8523
8576
|
var pattern$2 = {
|
|
8524
8577
|
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,}))$/,
|
|
8525
|
-
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"),
|
|
8526
8578
|
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
8527
8579
|
};
|
|
8528
8580
|
var types = {
|
|
@@ -8564,7 +8616,7 @@ var types = {
|
|
|
8564
8616
|
return typeof value === "string" && value.length <= 320 && !!value.match(pattern$2.email);
|
|
8565
8617
|
},
|
|
8566
8618
|
url: function url(value) {
|
|
8567
|
-
return typeof value === "string" && value.length <= 2048 && !!value.match(
|
|
8619
|
+
return typeof value === "string" && value.length <= 2048 && !!value.match(getUrlRegex());
|
|
8568
8620
|
},
|
|
8569
8621
|
hex: function hex(value) {
|
|
8570
8622
|
return typeof value === "string" && !!value.match(pattern$2.hex);
|
|
@@ -9139,7 +9191,17 @@ var Schema = /* @__PURE__ */ function() {
|
|
|
9139
9191
|
if (rule.asyncValidator) {
|
|
9140
9192
|
res = rule.asyncValidator(rule, data.value, cb, data.source, options);
|
|
9141
9193
|
} else if (rule.validator) {
|
|
9142
|
-
|
|
9194
|
+
try {
|
|
9195
|
+
res = rule.validator(rule, data.value, cb, data.source, options);
|
|
9196
|
+
} catch (error) {
|
|
9197
|
+
console.error == null ? void 0 : console.error(error);
|
|
9198
|
+
if (!options.suppressValidatorError) {
|
|
9199
|
+
setTimeout(function() {
|
|
9200
|
+
throw error;
|
|
9201
|
+
}, 0);
|
|
9202
|
+
}
|
|
9203
|
+
cb(error.message);
|
|
9204
|
+
}
|
|
9143
9205
|
if (res === true) {
|
|
9144
9206
|
cb();
|
|
9145
9207
|
} else if (res === false) {
|
|
@@ -9260,10 +9322,7 @@ function useFormItemValidate(props, _rules) {
|
|
|
9260
9322
|
} else {
|
|
9261
9323
|
return rule.trigger === triggerVal;
|
|
9262
9324
|
}
|
|
9263
|
-
}).map((
|
|
9264
|
-
var _b = _a, { trigger } = _b, rule = __objRest(_b, ["trigger"]);
|
|
9265
|
-
return rule;
|
|
9266
|
-
});
|
|
9325
|
+
}).map(({ ...rule }) => rule);
|
|
9267
9326
|
};
|
|
9268
9327
|
const onValidateSuccess = () => {
|
|
9269
9328
|
validateState.value = "success";
|
|
@@ -9336,15 +9395,12 @@ defineComponent({
|
|
|
9336
9395
|
props: formItemProps,
|
|
9337
9396
|
setup(props, ctx) {
|
|
9338
9397
|
const formContext = inject(FORM_TOKEN);
|
|
9339
|
-
const
|
|
9398
|
+
const {
|
|
9340
9399
|
messageType: itemMessageType,
|
|
9341
9400
|
popPosition: itemPopPosition,
|
|
9342
|
-
showFeedback: itemShowFeedback
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
"popPosition",
|
|
9346
|
-
"showFeedback"
|
|
9347
|
-
]);
|
|
9401
|
+
showFeedback: itemShowFeedback,
|
|
9402
|
+
...otherProps
|
|
9403
|
+
} = toRefs(props);
|
|
9348
9404
|
const {
|
|
9349
9405
|
label,
|
|
9350
9406
|
helpTips,
|
|
@@ -9374,7 +9430,8 @@ defineComponent({
|
|
|
9374
9430
|
labelAlign: formContext.labelAlign
|
|
9375
9431
|
}));
|
|
9376
9432
|
provide(LABEL_DATA, labelData);
|
|
9377
|
-
const context = reactive(
|
|
9433
|
+
const context = reactive({
|
|
9434
|
+
...otherProps,
|
|
9378
9435
|
showFeedback,
|
|
9379
9436
|
messageType,
|
|
9380
9437
|
popPosition,
|
|
@@ -9384,7 +9441,7 @@ defineComponent({
|
|
|
9384
9441
|
validate,
|
|
9385
9442
|
resetField,
|
|
9386
9443
|
clearValidate
|
|
9387
|
-
})
|
|
9444
|
+
});
|
|
9388
9445
|
provide(FORM_ITEM_TOKEN, context);
|
|
9389
9446
|
ctx.expose({
|
|
9390
9447
|
resetField,
|
|
@@ -9409,8 +9466,8 @@ defineComponent({
|
|
|
9409
9466
|
"extra-info": extraInfo.value
|
|
9410
9467
|
}, {
|
|
9411
9468
|
default: () => {
|
|
9412
|
-
var
|
|
9413
|
-
return [(_b = (
|
|
9469
|
+
var _a, _b;
|
|
9470
|
+
return [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)];
|
|
9414
9471
|
}
|
|
9415
9472
|
})]);
|
|
9416
9473
|
}
|
|
@@ -9711,9 +9768,10 @@ defineComponent({
|
|
|
9711
9768
|
value: opt
|
|
9712
9769
|
});
|
|
9713
9770
|
} else if (typeof opt === "object") {
|
|
9714
|
-
mergedOpt = Object.assign({}, defaultOpt,
|
|
9771
|
+
mergedOpt = Object.assign({}, defaultOpt, {
|
|
9772
|
+
...opt,
|
|
9715
9773
|
label: opt.name
|
|
9716
|
-
})
|
|
9774
|
+
});
|
|
9717
9775
|
}
|
|
9718
9776
|
return createVNode(Checkbox, mergedOpt, null);
|
|
9719
9777
|
});
|
|
@@ -9830,7 +9888,7 @@ function useFilterMultiple(filterList, ctx) {
|
|
|
9830
9888
|
});
|
|
9831
9889
|
const _halfChecked = ref(false);
|
|
9832
9890
|
filterList == null ? void 0 : filterList.forEach((item) => {
|
|
9833
|
-
_checkList.value.push(
|
|
9891
|
+
_checkList.value.push({ checked: false, ...item });
|
|
9834
9892
|
});
|
|
9835
9893
|
watch(_checkList, (list2) => {
|
|
9836
9894
|
if (!list2.length) {
|
|
@@ -9861,6 +9919,155 @@ function useFilterSingle(ctx) {
|
|
|
9861
9919
|
};
|
|
9862
9920
|
return { selectedItem, handleSelect };
|
|
9863
9921
|
}
|
|
9922
|
+
function deepAssign(...objects) {
|
|
9923
|
+
const isObject2 = (obj) => obj && typeof obj === "object";
|
|
9924
|
+
return objects.reduce((prev, from) => {
|
|
9925
|
+
Object.keys(from).forEach((key) => {
|
|
9926
|
+
const pVal = prev[key];
|
|
9927
|
+
const oVal = from[key];
|
|
9928
|
+
if (Array.isArray(pVal) && Array.isArray(oVal)) {
|
|
9929
|
+
prev[key] = Array.from(/* @__PURE__ */ new Set([...oVal, ...pVal]));
|
|
9930
|
+
} else if (isObject2(pVal) && isObject2(oVal)) {
|
|
9931
|
+
prev[key] = deepAssign(pVal, oVal);
|
|
9932
|
+
} else {
|
|
9933
|
+
prev[key] = oVal;
|
|
9934
|
+
}
|
|
9935
|
+
});
|
|
9936
|
+
return prev;
|
|
9937
|
+
}, {});
|
|
9938
|
+
}
|
|
9939
|
+
var zhCN = {
|
|
9940
|
+
pagination: {
|
|
9941
|
+
totalItemText: "\u6240\u6709\u6761\u76EE",
|
|
9942
|
+
goToText: "\u8DF3\u81F3"
|
|
9943
|
+
},
|
|
9944
|
+
accordion: {
|
|
9945
|
+
loading: "\u52A0\u8F7D\u4E2D",
|
|
9946
|
+
noData: "\u6CA1\u6709\u6570\u636E"
|
|
9947
|
+
},
|
|
9948
|
+
autoCompleteDropdown: {
|
|
9949
|
+
latestInput: "\u6700\u8FD1\u8F93\u5165"
|
|
9950
|
+
},
|
|
9951
|
+
cascaderList: {
|
|
9952
|
+
noData: "\u6CA1\u6709\u6570\u636E"
|
|
9953
|
+
},
|
|
9954
|
+
colorPicker: {
|
|
9955
|
+
foundationPanel: "\u57FA\u7840\u9762\u677F",
|
|
9956
|
+
advancedPanel: "\u9AD8\u7EA7\u9762\u677F"
|
|
9957
|
+
},
|
|
9958
|
+
datePickerPro: {
|
|
9959
|
+
ok: "\u786E\u5B9A",
|
|
9960
|
+
placeholder: "\u8BF7\u9009\u62E9\u65E5\u671F",
|
|
9961
|
+
month1: "1\u6708",
|
|
9962
|
+
month2: "2\u6708",
|
|
9963
|
+
month3: "3\u6708",
|
|
9964
|
+
month4: "4\u6708",
|
|
9965
|
+
month5: "5\u6708",
|
|
9966
|
+
month6: "6\u6708",
|
|
9967
|
+
month7: "7\u6708",
|
|
9968
|
+
month8: "8\u6708",
|
|
9969
|
+
month9: "9\u6708",
|
|
9970
|
+
month10: "10\u6708",
|
|
9971
|
+
month11: "11\u6708",
|
|
9972
|
+
month12: "12\u6708",
|
|
9973
|
+
year: "\u5E74",
|
|
9974
|
+
startPlaceholder: "\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F",
|
|
9975
|
+
endPlaceholder: "\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F",
|
|
9976
|
+
getWeekDays() {
|
|
9977
|
+
return ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
|
|
9978
|
+
},
|
|
9979
|
+
getTimeArr() {
|
|
9980
|
+
return ["\u65F6", "\u5206", "\u79D2"];
|
|
9981
|
+
},
|
|
9982
|
+
getYearMonthStr(year, month) {
|
|
9983
|
+
return `${year}\u5E74${month}\u6708`;
|
|
9984
|
+
}
|
|
9985
|
+
},
|
|
9986
|
+
editableSelect: {
|
|
9987
|
+
noRelatedRecords: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
|
|
9988
|
+
noData: "\u6CA1\u6709\u6570\u636E"
|
|
9989
|
+
},
|
|
9990
|
+
input: {
|
|
9991
|
+
placeholder: "\u8BF7\u8F93\u5165"
|
|
9992
|
+
},
|
|
9993
|
+
splitterBar: {
|
|
9994
|
+
collapse: "\u6536\u8D77",
|
|
9995
|
+
expand: "\u5C55\u5F00"
|
|
9996
|
+
},
|
|
9997
|
+
stepsGuide: {
|
|
9998
|
+
previous: "\u4E0A\u4E00\u6B65",
|
|
9999
|
+
continue: "\u6211\u77E5\u9053\u5566\uFF0C\u7EE7\u7EED",
|
|
10000
|
+
ok: "\u6211\u77E5\u9053\u5566"
|
|
10001
|
+
},
|
|
10002
|
+
table: {
|
|
10003
|
+
selectAll: "\u5168\u9009",
|
|
10004
|
+
ok: "\u786E\u5B9A"
|
|
10005
|
+
},
|
|
10006
|
+
timePopup: {
|
|
10007
|
+
ok: "\u786E\u5B9A"
|
|
10008
|
+
},
|
|
10009
|
+
transfer: {
|
|
10010
|
+
unit: "\u9879",
|
|
10011
|
+
panelUnit: "\u9879",
|
|
10012
|
+
headerUnit: "\u9879",
|
|
10013
|
+
noData: "\u6682\u65E0\u6570\u636E",
|
|
10014
|
+
placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"
|
|
10015
|
+
},
|
|
10016
|
+
tree: {
|
|
10017
|
+
loading: "\u52A0\u8F7D\u4E2D",
|
|
10018
|
+
newNode: "\u65B0\u8282\u70B9",
|
|
10019
|
+
selectPlaceholder: "\u8BF7\u9009\u62E9"
|
|
10020
|
+
},
|
|
10021
|
+
upload: {
|
|
10022
|
+
placeholder: "\u9009\u62E9\u6587\u4EF6",
|
|
10023
|
+
getExistSameNameFilesMsg(sameNames) {
|
|
10024
|
+
return `\u60A8\u4E0A\u4F20\u7684 "${sameNames}" \u5B58\u5728\u91CD\u540D\u6587\u4EF6, \u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`;
|
|
10025
|
+
},
|
|
10026
|
+
getAllFilesBeyondMaximalFileSizeMsg(maximalSize) {
|
|
10027
|
+
return `\u6700\u5927\u652F\u6301\u4E0A\u4F20${maximalSize}MB\u7684\u6587\u4EF6, \u60A8\u672C\u6B21\u4E0A\u4F20\u7684\u6240\u6709\u6587\u4EF6\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`;
|
|
10028
|
+
},
|
|
10029
|
+
getBeyondMaximalFileSizeMsg(filename, maximalSize) {
|
|
10030
|
+
return `\u6700\u5927\u652F\u6301\u4E0A\u4F20${maximalSize}MB\u7684\u6587\u4EF6, \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${filename}"\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`;
|
|
10031
|
+
},
|
|
10032
|
+
getNotAllowedFileTypeMsg(filename, scope) {
|
|
10033
|
+
return `\u652F\u6301\u7684\u6587\u4EF6\u7C7B\u578B: "${scope}", \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${filename}"\u4E0D\u5728\u5141\u8BB8\u8303\u56F4\u5185\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`;
|
|
10034
|
+
}
|
|
10035
|
+
},
|
|
10036
|
+
search: {
|
|
10037
|
+
placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57"
|
|
10038
|
+
},
|
|
10039
|
+
select: {
|
|
10040
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
10041
|
+
noDataText: "\u65E0\u6570\u636E",
|
|
10042
|
+
noMatchText: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
|
|
10043
|
+
loadingText: "\u52A0\u8F7D\u4E2D..."
|
|
10044
|
+
},
|
|
10045
|
+
tagInput: {
|
|
10046
|
+
maxTagsText: "\u5DF2\u8FBE\u5230\u6700\u5927\u4E2A\u6570\uFF1A"
|
|
10047
|
+
},
|
|
10048
|
+
timeSelect: {
|
|
10049
|
+
placeholder: "\u8BF7\u9009\u62E9\u65F6\u95F4"
|
|
10050
|
+
}
|
|
10051
|
+
};
|
|
10052
|
+
const lang = ref("zh-CN");
|
|
10053
|
+
let langMessages = reactive({
|
|
10054
|
+
[lang.value]: zhCN
|
|
10055
|
+
});
|
|
10056
|
+
const Locale = {
|
|
10057
|
+
messages() {
|
|
10058
|
+
return langMessages[lang.value];
|
|
10059
|
+
},
|
|
10060
|
+
lang() {
|
|
10061
|
+
return lang.value;
|
|
10062
|
+
},
|
|
10063
|
+
use(newLang, newMessages2) {
|
|
10064
|
+
lang.value = newLang;
|
|
10065
|
+
this.add({ [newLang]: newMessages2 });
|
|
10066
|
+
},
|
|
10067
|
+
add(newMessages2 = {}) {
|
|
10068
|
+
langMessages = deepAssign(langMessages, newMessages2);
|
|
10069
|
+
}
|
|
10070
|
+
};
|
|
9864
10071
|
const camelize = (name) => name.substring(1).replace(/^\S/, (s) => s.toLocaleLowerCase());
|
|
9865
10072
|
function get(object4, path) {
|
|
9866
10073
|
const keys = path.split(".");
|
|
@@ -9874,7 +10081,8 @@ function get(object4, path) {
|
|
|
9874
10081
|
function createI18nTranslate(name, app, newPrefix) {
|
|
9875
10082
|
const prefix = newPrefix || camelize(name) + ".";
|
|
9876
10083
|
return (path) => {
|
|
9877
|
-
|
|
10084
|
+
var _a;
|
|
10085
|
+
const messages2 = ((_a = app == null ? void 0 : app.appContext.config.globalProperties.langMessages) == null ? void 0 : _a.value) || Locale.messages();
|
|
9878
10086
|
const message = get(messages2, prefix + path) || get(messages2, path);
|
|
9879
10087
|
return message;
|
|
9880
10088
|
};
|
|
@@ -10174,14 +10382,21 @@ function useDragColumnWidth(elementRef, column2) {
|
|
|
10174
10382
|
};
|
|
10175
10383
|
return { resizing, dragClass, onMousedown };
|
|
10176
10384
|
}
|
|
10385
|
+
const headerThProps = {
|
|
10386
|
+
column: {
|
|
10387
|
+
type: Object,
|
|
10388
|
+
required: true
|
|
10389
|
+
},
|
|
10390
|
+
colspan: {
|
|
10391
|
+
type: Number
|
|
10392
|
+
},
|
|
10393
|
+
rowspan: {
|
|
10394
|
+
type: Number
|
|
10395
|
+
}
|
|
10396
|
+
};
|
|
10177
10397
|
var TH = defineComponent({
|
|
10178
10398
|
name: "DTableHeaderTh",
|
|
10179
|
-
props:
|
|
10180
|
-
column: {
|
|
10181
|
-
type: Object,
|
|
10182
|
-
required: true
|
|
10183
|
-
}
|
|
10184
|
-
},
|
|
10399
|
+
props: headerThProps,
|
|
10185
10400
|
setup(props, {
|
|
10186
10401
|
expose
|
|
10187
10402
|
}) {
|
|
@@ -10189,7 +10404,9 @@ var TH = defineComponent({
|
|
|
10189
10404
|
const store = table2.store;
|
|
10190
10405
|
const headerContainerRef = ref();
|
|
10191
10406
|
const {
|
|
10192
|
-
column: column2
|
|
10407
|
+
column: column2,
|
|
10408
|
+
colspan,
|
|
10409
|
+
rowspan
|
|
10193
10410
|
} = toRefs(props);
|
|
10194
10411
|
const {
|
|
10195
10412
|
baseClass
|
|
@@ -10220,7 +10437,9 @@ var TH = defineComponent({
|
|
|
10220
10437
|
var _a, _b;
|
|
10221
10438
|
return createVNode("th", {
|
|
10222
10439
|
"class": [baseClass.value, stickyClass.value, sortClass.value, filterClass.value, dragClass.value],
|
|
10223
|
-
"style": stickyStyle.value
|
|
10440
|
+
"style": stickyStyle.value,
|
|
10441
|
+
"colspan": colspan == null ? void 0 : colspan.value,
|
|
10442
|
+
"rowspan": rowspan == null ? void 0 : rowspan.value
|
|
10224
10443
|
}, [createVNode("div", {
|
|
10225
10444
|
"ref": headerContainerRef,
|
|
10226
10445
|
"class": "header-container",
|
|
@@ -10267,7 +10486,7 @@ function convertToRows(originColumns) {
|
|
|
10267
10486
|
let colSpan = 0;
|
|
10268
10487
|
column2.children.forEach((subColumn) => {
|
|
10269
10488
|
traverse(subColumn, column2);
|
|
10270
|
-
colSpan += subColumn.colSpan;
|
|
10489
|
+
colSpan += subColumn.colSpan || 0;
|
|
10271
10490
|
});
|
|
10272
10491
|
column2.colSpan = colSpan;
|
|
10273
10492
|
} else {
|
|
@@ -10285,7 +10504,7 @@ function convertToRows(originColumns) {
|
|
|
10285
10504
|
const allColumns = getAllColumns(originColumns);
|
|
10286
10505
|
allColumns.forEach((column2) => {
|
|
10287
10506
|
if (!column2.children) {
|
|
10288
|
-
column2.rowSpan = maxLevel - column2.level + 1;
|
|
10507
|
+
column2.rowSpan = maxLevel - (column2.level || 0) + 1;
|
|
10289
10508
|
} else {
|
|
10290
10509
|
column2.rowSpan = 1;
|
|
10291
10510
|
column2.children.forEach((col) => col.isSubColumn = true);
|
|
@@ -10329,6 +10548,12 @@ const bodyTdProps = {
|
|
|
10329
10548
|
type: Object,
|
|
10330
10549
|
default: () => ({})
|
|
10331
10550
|
},
|
|
10551
|
+
rowspan: {
|
|
10552
|
+
type: Number
|
|
10553
|
+
},
|
|
10554
|
+
colspan: {
|
|
10555
|
+
type: Number
|
|
10556
|
+
},
|
|
10332
10557
|
index: {
|
|
10333
10558
|
type: Number,
|
|
10334
10559
|
default: 0
|
|
@@ -10484,11 +10709,12 @@ var Tooltip = defineComponent({
|
|
|
10484
10709
|
})]);
|
|
10485
10710
|
}
|
|
10486
10711
|
});
|
|
10487
|
-
function useBodyTd(props) {
|
|
10712
|
+
function useBodyTd(props, ctx) {
|
|
10488
10713
|
const tooltipContent = ref();
|
|
10489
10714
|
const isShowTooltip = ref(false);
|
|
10490
10715
|
const tdRef = ref();
|
|
10491
10716
|
let observer;
|
|
10717
|
+
const table2 = inject(TABLE_TOKEN);
|
|
10492
10718
|
function getTooltipContent() {
|
|
10493
10719
|
var _a, _b;
|
|
10494
10720
|
return ((_a = tdRef.value) == null ? void 0 : _a.innerText) || ((_b = tdRef.value) == null ? void 0 : _b.textContent);
|
|
@@ -10502,26 +10728,56 @@ function useBodyTd(props) {
|
|
|
10502
10728
|
range3.setEnd(tdRef.value, tdRef.value.childNodes.length);
|
|
10503
10729
|
const rangeWidth = range3.getBoundingClientRect().width;
|
|
10504
10730
|
const padding = parseInt(window.getComputedStyle(tdRef.value)["paddingLeft"], 10) + parseInt(window.getComputedStyle(tdRef.value)["paddingRight"], 10);
|
|
10505
|
-
isShowTooltip.value = props.column.showOverflowTooltip && rangeWidth + padding > tdRef.value.offsetWidth;
|
|
10731
|
+
isShowTooltip.value = !!(props.column.showOverflowTooltip && rangeWidth + padding > tdRef.value.offsetWidth);
|
|
10506
10732
|
}
|
|
10507
10733
|
onMounted(() => {
|
|
10508
10734
|
if (inBrowser && window.ResizeObserver && props.column.showOverflowTooltip) {
|
|
10509
|
-
const
|
|
10510
|
-
tdRef.value &&
|
|
10735
|
+
const innerObserver = new window.ResizeObserver(shouldShowTooltip);
|
|
10736
|
+
tdRef.value && innerObserver.observe(tdRef.value);
|
|
10511
10737
|
}
|
|
10512
10738
|
tooltipContent.value = getTooltipContent();
|
|
10513
10739
|
});
|
|
10514
10740
|
onBeforeMount(() => {
|
|
10515
10741
|
tdRef.value && observer.unobserve(tdRef.value);
|
|
10516
10742
|
});
|
|
10517
|
-
|
|
10743
|
+
onUpdated(() => {
|
|
10744
|
+
const modeMap = table2.store.states.tableCellModeMap.value;
|
|
10745
|
+
for (const child of modeMap.keys()) {
|
|
10746
|
+
modeMap.set(child, "readonly");
|
|
10747
|
+
}
|
|
10748
|
+
});
|
|
10749
|
+
const getCellKsy = () => {
|
|
10750
|
+
return `${getRowIdentity(props.row, table2.props.rowKey, props.index)}-${props.column.field}-cell`;
|
|
10751
|
+
};
|
|
10752
|
+
const cellMode = computed(() => {
|
|
10753
|
+
const cellKey = getCellKsy();
|
|
10754
|
+
const mode = table2.store.states.tableCellModeMap.value.get(cellKey);
|
|
10755
|
+
return mode || "readonly";
|
|
10756
|
+
});
|
|
10757
|
+
const onCellClick = () => {
|
|
10758
|
+
const modeMap = table2.store.states.tableCellModeMap.value;
|
|
10759
|
+
const cellKey = getCellKsy();
|
|
10760
|
+
for (const child of modeMap.keys()) {
|
|
10761
|
+
modeMap.set(child, "readonly");
|
|
10762
|
+
}
|
|
10763
|
+
if (props.column.type === "editable" && modeMap.get(cellKey) === "edit") {
|
|
10764
|
+
return;
|
|
10765
|
+
}
|
|
10766
|
+
ctx.emit("cellClick");
|
|
10767
|
+
};
|
|
10768
|
+
return { tdRef, isShowTooltip, tooltipContent, cellMode, onCellClick };
|
|
10518
10769
|
}
|
|
10519
10770
|
var TD = defineComponent({
|
|
10520
10771
|
name: "DTableBodyTd",
|
|
10521
10772
|
inheritAttrs: false,
|
|
10522
10773
|
props: bodyTdProps,
|
|
10774
|
+
emits: ["cellClick"],
|
|
10523
10775
|
setup(props, ctx) {
|
|
10524
|
-
const
|
|
10776
|
+
const {
|
|
10777
|
+
column: column2,
|
|
10778
|
+
rowspan,
|
|
10779
|
+
colspan
|
|
10780
|
+
} = toRefs(props);
|
|
10525
10781
|
const table2 = inject(TABLE_TOKEN);
|
|
10526
10782
|
const {
|
|
10527
10783
|
stickyClass,
|
|
@@ -10530,8 +10786,10 @@ var TD = defineComponent({
|
|
|
10530
10786
|
const {
|
|
10531
10787
|
tdRef,
|
|
10532
10788
|
isShowTooltip,
|
|
10533
|
-
tooltipContent
|
|
10534
|
-
|
|
10789
|
+
tooltipContent,
|
|
10790
|
+
cellMode,
|
|
10791
|
+
onCellClick
|
|
10792
|
+
} = useBodyTd(props, ctx);
|
|
10535
10793
|
return () => {
|
|
10536
10794
|
return createVNode(Tooltip, {
|
|
10537
10795
|
"content": tooltipContent.value,
|
|
@@ -10543,7 +10801,11 @@ var TD = defineComponent({
|
|
|
10543
10801
|
"ref": tdRef,
|
|
10544
10802
|
"class": stickyClass.value,
|
|
10545
10803
|
"style": stickyStyle.value
|
|
10546
|
-
}, ctx.attrs
|
|
10804
|
+
}, ctx.attrs, {
|
|
10805
|
+
"rowspan": rowspan == null ? void 0 : rowspan.value,
|
|
10806
|
+
"colspan": colspan == null ? void 0 : colspan.value,
|
|
10807
|
+
"onClick": onCellClick
|
|
10808
|
+
}), [(_b = (_a = props.column).renderCell) == null ? void 0 : _b.call(_a, props.row, props.column, table2.store, props.index, table2.props, cellMode)])];
|
|
10547
10809
|
}
|
|
10548
10810
|
});
|
|
10549
10811
|
};
|
|
@@ -10619,6 +10881,35 @@ function useBodyRender() {
|
|
|
10619
10881
|
};
|
|
10620
10882
|
return { getTableRowClass };
|
|
10621
10883
|
}
|
|
10884
|
+
function useLazyLoad() {
|
|
10885
|
+
const table2 = inject(TABLE_TOKEN);
|
|
10886
|
+
const { lazy } = table2.props;
|
|
10887
|
+
const lazyFlagRef = ref();
|
|
10888
|
+
let lazyObserver;
|
|
10889
|
+
onMounted(() => {
|
|
10890
|
+
if (lazy) {
|
|
10891
|
+
lazyObserver = new IntersectionObserver((entries) => {
|
|
10892
|
+
const lazyFlagOb = entries[0];
|
|
10893
|
+
if (lazyFlagOb.isIntersecting) {
|
|
10894
|
+
table2.emit("load-more");
|
|
10895
|
+
}
|
|
10896
|
+
}, {
|
|
10897
|
+
root: table2.tableRef.value
|
|
10898
|
+
});
|
|
10899
|
+
lazyObserver.observe(lazyFlagRef.value);
|
|
10900
|
+
}
|
|
10901
|
+
});
|
|
10902
|
+
onBeforeUnmount(() => {
|
|
10903
|
+
if (lazy) {
|
|
10904
|
+
lazyObserver.unobserve(lazyFlagRef.value);
|
|
10905
|
+
lazyObserver.disconnect();
|
|
10906
|
+
}
|
|
10907
|
+
});
|
|
10908
|
+
return {
|
|
10909
|
+
lazy,
|
|
10910
|
+
lazyFlagRef
|
|
10911
|
+
};
|
|
10912
|
+
}
|
|
10622
10913
|
var TableBody = defineComponent({
|
|
10623
10914
|
name: "DTableBody",
|
|
10624
10915
|
setup() {
|
|
@@ -10635,6 +10926,10 @@ var TableBody = defineComponent({
|
|
|
10635
10926
|
const {
|
|
10636
10927
|
getTableRowClass
|
|
10637
10928
|
} = useBodyRender();
|
|
10929
|
+
const {
|
|
10930
|
+
lazy,
|
|
10931
|
+
lazyFlagRef
|
|
10932
|
+
} = useLazyLoad();
|
|
10638
10933
|
const onCellClick = (cellClickArg) => {
|
|
10639
10934
|
table2.emit("cell-click", cellClickArg);
|
|
10640
10935
|
};
|
|
@@ -10664,7 +10959,7 @@ var TableBody = defineComponent({
|
|
|
10664
10959
|
"row": row,
|
|
10665
10960
|
"rowspan": rowspan,
|
|
10666
10961
|
"colspan": colspan,
|
|
10667
|
-
"
|
|
10962
|
+
"onCellClick": () => onCellClick({
|
|
10668
10963
|
rowIndex,
|
|
10669
10964
|
columnIndex,
|
|
10670
10965
|
column: column2,
|
|
@@ -10676,7 +10971,10 @@ var TableBody = defineComponent({
|
|
|
10676
10971
|
}, [(_d = (_c = (_b = (_a = flatColumns.value.filter((column2) => column2.type === "expand")) == null ? void 0 : _a[0]) == null ? void 0 : _b.slots) == null ? void 0 : _c.default) == null ? void 0 : _d.call(_c, {
|
|
10677
10972
|
row
|
|
10678
10973
|
})])])]);
|
|
10679
|
-
})
|
|
10974
|
+
}), lazy && createVNode("span", {
|
|
10975
|
+
"ref": lazyFlagRef,
|
|
10976
|
+
"class": ns2.e("lazy__flag")
|
|
10977
|
+
}, null)]);
|
|
10680
10978
|
}
|
|
10681
10979
|
});
|
|
10682
10980
|
var FixHeader = defineComponent({
|
|
@@ -10743,7 +11041,7 @@ var Table = defineComponent({
|
|
|
10743
11041
|
dLoading: loadingDirective
|
|
10744
11042
|
},
|
|
10745
11043
|
props: tableProps,
|
|
10746
|
-
emits: ["sort-change", "cell-click", "row-click", "check-change", "check-all-change", "expand-change"],
|
|
11044
|
+
emits: ["sort-change", "cell-click", "row-click", "check-change", "check-all-change", "expand-change", "load-more"],
|
|
10747
11045
|
setup(props, ctx) {
|
|
10748
11046
|
const table2 = getCurrentInstance();
|
|
10749
11047
|
const store = createStore(toRef(props, "data"), table2);
|
|
@@ -10965,7 +11263,7 @@ const cellMap = {
|
|
|
10965
11263
|
renderHeader() {
|
|
10966
11264
|
return createVNode("span", null, null);
|
|
10967
11265
|
},
|
|
10968
|
-
renderCell(rowData, column2, store
|
|
11266
|
+
renderCell(rowData, column2, store) {
|
|
10969
11267
|
return createVNode(Icon, {
|
|
10970
11268
|
"name": "chevron-right",
|
|
10971
11269
|
"class": "icon-expand-row",
|
|
@@ -10975,6 +11273,44 @@ const cellMap = {
|
|
|
10975
11273
|
}, null);
|
|
10976
11274
|
}
|
|
10977
11275
|
},
|
|
11276
|
+
editable: {
|
|
11277
|
+
renderHeader(column2) {
|
|
11278
|
+
var _a;
|
|
11279
|
+
return h("span", {
|
|
11280
|
+
class: "title"
|
|
11281
|
+
}, (_a = column2.header) != null ? _a : "");
|
|
11282
|
+
},
|
|
11283
|
+
renderCell(rowData, column2, store, rowIndex, props, cellMode, ctx) {
|
|
11284
|
+
var _a, _b;
|
|
11285
|
+
let columnValue;
|
|
11286
|
+
if (cellMode.value === "edit") {
|
|
11287
|
+
columnValue = ctx.slots.cellEdit ? ctx.slots.cellEdit({
|
|
11288
|
+
row: rowData,
|
|
11289
|
+
rowIndex
|
|
11290
|
+
}) : "";
|
|
11291
|
+
} else {
|
|
11292
|
+
if (ctx.slots.cell) {
|
|
11293
|
+
columnValue = createVNode("div", {
|
|
11294
|
+
"class": "cell-text"
|
|
11295
|
+
}, [ctx.slots.cell({
|
|
11296
|
+
row: rowData,
|
|
11297
|
+
rowIndex
|
|
11298
|
+
})]);
|
|
11299
|
+
} else {
|
|
11300
|
+
const value = column2.field ? rowData[column2.field] : "";
|
|
11301
|
+
if (column2.formatter) {
|
|
11302
|
+
columnValue = column2.formatter(rowData, column2, value, rowIndex);
|
|
11303
|
+
}
|
|
11304
|
+
columnValue = createVNode("div", {
|
|
11305
|
+
"class": "cell-text"
|
|
11306
|
+
}, [(_b = (_a = value == null ? void 0 : value.toString) == null ? void 0 : _a.call(value)) != null ? _b : ""]);
|
|
11307
|
+
}
|
|
11308
|
+
}
|
|
11309
|
+
return h("div", {
|
|
11310
|
+
class: [ns.e("cell"), column2.type === "editable" && (cellMode == null ? void 0 : cellMode.value) === "readonly" && "editable-cell"]
|
|
11311
|
+
}, columnValue);
|
|
11312
|
+
}
|
|
11313
|
+
},
|
|
10978
11314
|
default: {
|
|
10979
11315
|
renderHeader(column2) {
|
|
10980
11316
|
var _a;
|
|
@@ -10982,7 +11318,7 @@ const cellMap = {
|
|
|
10982
11318
|
class: "title"
|
|
10983
11319
|
}, (_a = column2.header) != null ? _a : "");
|
|
10984
11320
|
},
|
|
10985
|
-
renderCell(rowData, column2, store, rowIndex, props, ctx) {
|
|
11321
|
+
renderCell(rowData, column2, store, rowIndex, props, cellMode, ctx) {
|
|
10986
11322
|
var _a, _b, _c;
|
|
10987
11323
|
let columnValue;
|
|
10988
11324
|
if (ctx.slots.default) {
|
|
@@ -11063,11 +11399,11 @@ function createColumn(id, props, ctx) {
|
|
|
11063
11399
|
}
|
|
11064
11400
|
return cellMap[type4.value || "default"].renderHeader(columnItem, store);
|
|
11065
11401
|
}
|
|
11066
|
-
function renderCell(rowData, columnItem, store, rowIndex, tableProps2) {
|
|
11402
|
+
function renderCell(rowData, columnItem, store, rowIndex, tableProps2, cellMode) {
|
|
11067
11403
|
if (ctx.slots.default && columnItem.type === "index") {
|
|
11068
11404
|
return ctx.slots.default({ row: rowData, rowIndex });
|
|
11069
11405
|
}
|
|
11070
|
-
return cellMap[type4.value || "default"].renderCell(rowData, columnItem, store, rowIndex, tableProps2, ctx);
|
|
11406
|
+
return cellMap[type4.value || "default"].renderCell(rowData, columnItem, store, rowIndex, tableProps2, cellMode, ctx);
|
|
11071
11407
|
}
|
|
11072
11408
|
watch([field, header2, order], ([fieldVal, headerVal, orderVal]) => {
|
|
11073
11409
|
column2.field = fieldVal;
|
|
@@ -11135,7 +11471,6 @@ var Column = defineComponent({
|
|
|
11135
11471
|
props: tableColumnProps,
|
|
11136
11472
|
emits: ["filter-change", "resize-start", "resizing", "resize-end"],
|
|
11137
11473
|
setup(props, ctx) {
|
|
11138
|
-
toRefs(props);
|
|
11139
11474
|
const owner = inject(TABLE_TOKEN);
|
|
11140
11475
|
const isSubColumn = ref(false);
|
|
11141
11476
|
const {
|
|
@@ -11151,8 +11486,8 @@ var Column = defineComponent({
|
|
|
11151
11486
|
isSubColumn.value = owner !== parent;
|
|
11152
11487
|
});
|
|
11153
11488
|
onMounted(() => {
|
|
11154
|
-
var _a;
|
|
11155
|
-
const children = isSubColumn.value ? parent.vnode.el.children : (
|
|
11489
|
+
var _a, _b, _c;
|
|
11490
|
+
const children = isSubColumn.value ? (_b = (_a = parent == null ? void 0 : parent.vnode) == null ? void 0 : _a.el) == null ? void 0 : _b.children : (_c = owner == null ? void 0 : owner.hiddenColumns.value) == null ? void 0 : _c.children;
|
|
11156
11491
|
const columnIndex = getColumnIndex(children || [], instance.vnode.el);
|
|
11157
11492
|
columnIndex > -1 && (owner == null ? void 0 : owner.store.insertColumn(column2, isSubColumn.value ? parent.columnConfig : null));
|
|
11158
11493
|
if (typeof props.checkable === "function") {
|
|
@@ -11176,7 +11511,7 @@ var Column = defineComponent({
|
|
|
11176
11511
|
column: {},
|
|
11177
11512
|
$index: -1
|
|
11178
11513
|
});
|
|
11179
|
-
return createVNode("div", null, [Array.isArray(defaultSlot) ? defaultSlot.filter((child) => child.type.name === "DColumn").map((child) => createVNode(Fragment, null, [child])) : createVNode("div", null, null)]);
|
|
11514
|
+
return createVNode("div", null, [defaultSlot && Array.isArray(defaultSlot) ? defaultSlot.filter((child) => child.type.name === "DColumn").map((child) => createVNode(Fragment, null, [child])) : createVNode("div", null, null)]);
|
|
11180
11515
|
};
|
|
11181
11516
|
}
|
|
11182
11517
|
});
|