lew-ui 2.7.67 → 2.7.69
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/dist/components/data/tree/src/LewTree.vue.d.ts +26 -11
- package/dist/components/data/tree/src/LewTreeItem.vue.d.ts +1 -1
- package/dist/components/data/tree/src/types.d.ts +31 -0
- package/dist/components/form/tree-select/src/LewTreeSelect.vue.d.ts +1435 -293
- package/dist/components/form/tree-select/src/emits.d.ts +1 -1
- package/dist/components/form/tree-select/src/props.d.ts +11 -1
- package/dist/components/general/text-trim/index.d.ts +0 -1
- package/dist/components/general/text-trim/src/LewTextTrim.vue.d.ts +2 -10
- package/dist/components/navigation/action-box/src/LewActionBox.vue.d.ts +4 -0
- package/dist/components/navigation/action-box/src/props.d.ts +2 -0
- package/dist/index.css +1 -1
- package/dist/index.js +613 -605
- package/dist/index.umd.cjs +6 -6
- package/package.json +1 -1
- package/dist/components/form/tree-select-multiple/index.d.ts +0 -3
- package/dist/components/form/tree-select-multiple/src/LewTreeSelectMultiple.vue.d.ts +0 -1331
- package/dist/components/form/tree-select-multiple/src/emits.d.ts +0 -4
- package/dist/components/form/tree-select-multiple/src/props.d.ts +0 -127
- package/dist/components/general/text-trim/src/emits.d.ts +0 -5
package/dist/index.js
CHANGED
|
@@ -5347,16 +5347,6 @@ function insertChildByKey(tree, key, newChild) {
|
|
|
5347
5347
|
}
|
|
5348
5348
|
return false;
|
|
5349
5349
|
}
|
|
5350
|
-
function findAllChildrenKeys(node) {
|
|
5351
|
-
const keys2 = [];
|
|
5352
|
-
const traverse = (item) => {
|
|
5353
|
-
if (item.key !== void 0)
|
|
5354
|
-
keys2.push(item.key);
|
|
5355
|
-
item.children?.forEach(traverse);
|
|
5356
|
-
};
|
|
5357
|
-
node.children?.forEach(traverse);
|
|
5358
|
-
return keys2;
|
|
5359
|
-
}
|
|
5360
5350
|
function findNodeByKey(key, tree) {
|
|
5361
5351
|
const queue = cloneDeep(tree);
|
|
5362
5352
|
while (queue.length > 0) {
|
|
@@ -8469,8 +8459,8 @@ const SortIcon = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["__scopeId", "data-
|
|
|
8469
8459
|
const _hoisted_1$P = { class: "lew-table-header" };
|
|
8470
8460
|
const _hoisted_2$y = { class: "lew-table-tr" };
|
|
8471
8461
|
const _hoisted_3$r = { class: "lew-table-main" };
|
|
8472
|
-
const _hoisted_4$
|
|
8473
|
-
const _hoisted_5$
|
|
8462
|
+
const _hoisted_4$h = { class: "lew-table-tr" };
|
|
8463
|
+
const _hoisted_5$f = { class: "lew-table-tr" };
|
|
8474
8464
|
const _hoisted_6$b = {
|
|
8475
8465
|
key: 0,
|
|
8476
8466
|
class: "lew-table-empty"
|
|
@@ -8648,8 +8638,10 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
8648
8638
|
}));
|
|
8649
8639
|
const totalColumnWidth = computed(() => {
|
|
8650
8640
|
let width = sumBy(leafColumns.value, "width");
|
|
8651
|
-
if (props.checkable)
|
|
8652
|
-
|
|
8641
|
+
if (props.checkable)
|
|
8642
|
+
width += getCheckableWidth.value;
|
|
8643
|
+
if (props.sortable)
|
|
8644
|
+
width += getDragColumnWidth.value;
|
|
8653
8645
|
return width;
|
|
8654
8646
|
});
|
|
8655
8647
|
const fixedWidths = computed(() => {
|
|
@@ -8690,7 +8682,8 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
8690
8682
|
});
|
|
8691
8683
|
const columnLevel = computed(() => {
|
|
8692
8684
|
const findMaxDepth = (columns, currentDepth = 1) => {
|
|
8693
|
-
if (!columns || columns.length === 0)
|
|
8685
|
+
if (!columns || columns.length === 0)
|
|
8686
|
+
return currentDepth;
|
|
8694
8687
|
let maxDepth = currentDepth;
|
|
8695
8688
|
for (const col of columns) {
|
|
8696
8689
|
if (col.children && col.children.length > 0) {
|
|
@@ -8883,8 +8876,8 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
8883
8876
|
column?.title,
|
|
8884
8877
|
column.sortable && h(SortIcon, {
|
|
8885
8878
|
"sort-value": sortValue.value[column.field],
|
|
8886
|
-
size: props.size,
|
|
8887
|
-
class: "lew-table-sorter"
|
|
8879
|
+
"size": props.size,
|
|
8880
|
+
"class": "lew-table-sorter"
|
|
8888
8881
|
})
|
|
8889
8882
|
]
|
|
8890
8883
|
}
|
|
@@ -8928,7 +8921,8 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
8928
8921
|
}
|
|
8929
8922
|
}
|
|
8930
8923
|
function updateScrollState() {
|
|
8931
|
-
if (!tableRef.value)
|
|
8924
|
+
if (!tableRef.value)
|
|
8925
|
+
return;
|
|
8932
8926
|
const element = tableRef.value;
|
|
8933
8927
|
const { clientWidth, scrollWidth, scrollLeft } = element;
|
|
8934
8928
|
if (scrollWidth === clientWidth) {
|
|
@@ -9000,7 +8994,8 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
9000
8994
|
}
|
|
9001
8995
|
const handleTableResize = throttle(() => {
|
|
9002
8996
|
const table = tableRef.value;
|
|
9003
|
-
if (!table)
|
|
8997
|
+
if (!table)
|
|
8998
|
+
return;
|
|
9004
8999
|
const newScrollClientWidth = table.clientWidth;
|
|
9005
9000
|
const newIsScroll = table.scrollWidth > table.clientWidth + 5;
|
|
9006
9001
|
if (state.scrollClientWidth !== newScrollClientWidth) {
|
|
@@ -9058,7 +9053,8 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
9058
9053
|
}
|
|
9059
9054
|
const throttledTooltipUpdate = throttle(updateTooltipPosition, TOOLTIP_THROTTLE_DELAY);
|
|
9060
9055
|
function dragStart(event, row, index2) {
|
|
9061
|
-
if (!props.sortable)
|
|
9056
|
+
if (!props.sortable)
|
|
9057
|
+
return;
|
|
9062
9058
|
initDragState();
|
|
9063
9059
|
computeTableRowHeight();
|
|
9064
9060
|
state.dragIndex = index2;
|
|
@@ -9143,7 +9139,8 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
9143
9139
|
}
|
|
9144
9140
|
function updateDragTarget(mouseY) {
|
|
9145
9141
|
state.lastMouseY = mouseY;
|
|
9146
|
-
if (!state.dragRowId || Object.keys(state.trPositionsMap).length === 0)
|
|
9142
|
+
if (!state.dragRowId || Object.keys(state.trPositionsMap).length === 0)
|
|
9143
|
+
return;
|
|
9147
9144
|
const dragDistance = Math.abs(state.initialDragY - mouseY);
|
|
9148
9145
|
const minDragDistance = 5;
|
|
9149
9146
|
if (dragDistance < minDragDistance) {
|
|
@@ -9157,7 +9154,8 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
9157
9154
|
}));
|
|
9158
9155
|
positionEntries.sort((a, b) => a.top - b.top);
|
|
9159
9156
|
for (const entry of positionEntries) {
|
|
9160
|
-
if (entry.id === state.dragRowId)
|
|
9157
|
+
if (entry.id === state.dragRowId)
|
|
9158
|
+
continue;
|
|
9161
9159
|
const position = entry;
|
|
9162
9160
|
if (mouseY >= position.top && mouseY <= position.bottom) {
|
|
9163
9161
|
targetRowId = position.id;
|
|
@@ -9167,8 +9165,10 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
9167
9165
|
}
|
|
9168
9166
|
if (!targetRowId) {
|
|
9169
9167
|
for (let i = 0; i < positionEntries.length - 1; i++) {
|
|
9170
|
-
if (positionEntries[i].id === state.dragRowId)
|
|
9171
|
-
|
|
9168
|
+
if (positionEntries[i].id === state.dragRowId)
|
|
9169
|
+
continue;
|
|
9170
|
+
if (positionEntries[i + 1].id === state.dragRowId)
|
|
9171
|
+
continue;
|
|
9172
9172
|
if (mouseY > positionEntries[i].bottom && mouseY < positionEntries[i + 1].top) {
|
|
9173
9173
|
if (mouseY - positionEntries[i].bottom < positionEntries[i + 1].top - mouseY) {
|
|
9174
9174
|
targetRowId = positionEntries[i].id;
|
|
@@ -9203,7 +9203,8 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
9203
9203
|
`;
|
|
9204
9204
|
}
|
|
9205
9205
|
const targetPosition = state.trPositionsMap[state.targetRowId];
|
|
9206
|
-
if (!targetPosition)
|
|
9206
|
+
if (!targetPosition)
|
|
9207
|
+
return "display: none;";
|
|
9207
9208
|
const top2 = state.isAboveTarget ? targetPosition.top : targetPosition.bottom;
|
|
9208
9209
|
const tableRect = tableRef.value?.getBoundingClientRect();
|
|
9209
9210
|
const offsetTop = tableRect ? top2 - tableRect.top : 0;
|
|
@@ -9222,7 +9223,8 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
9222
9223
|
});
|
|
9223
9224
|
}
|
|
9224
9225
|
function getRowHeight(row) {
|
|
9225
|
-
if (!row || !row._lew_table_tr_id)
|
|
9226
|
+
if (!row || !row._lew_table_tr_id)
|
|
9227
|
+
return "auto";
|
|
9226
9228
|
const height = state.trHeightMap[row._lew_table_tr_id];
|
|
9227
9229
|
if (!height) {
|
|
9228
9230
|
const minHeightMap = {
|
|
@@ -9435,7 +9437,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
9435
9437
|
])
|
|
9436
9438
|
], 512)) : createCommentVNode("", true),
|
|
9437
9439
|
createElementVNode("div", _hoisted_3$r, [
|
|
9438
|
-
createElementVNode("div", _hoisted_4$
|
|
9440
|
+
createElementVNode("div", _hoisted_4$h, [
|
|
9439
9441
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(nonFixedHeaderColumns), (column) => {
|
|
9440
9442
|
return openBlock(), createBlock(readerHeaderTd, {
|
|
9441
9443
|
key: column.field,
|
|
@@ -9454,7 +9456,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
9454
9456
|
ref: fixedRightRef,
|
|
9455
9457
|
class: "lew-table-fixed-right"
|
|
9456
9458
|
}, [
|
|
9457
|
-
createElementVNode("div", _hoisted_5$
|
|
9459
|
+
createElementVNode("div", _hoisted_5$f, [
|
|
9458
9460
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(getFixedHeaderColumns)("right"), (column) => {
|
|
9459
9461
|
return openBlock(), createBlock(readerHeaderTd, {
|
|
9460
9462
|
key: column.field,
|
|
@@ -9704,6 +9706,250 @@ const treeEmits = {
|
|
|
9704
9706
|
loadStart: () => true,
|
|
9705
9707
|
loadEnd: (text) => text
|
|
9706
9708
|
};
|
|
9709
|
+
function useDOMCreate(nodeId) {
|
|
9710
|
+
const node = document.getElementById(nodeId);
|
|
9711
|
+
if (node) ;
|
|
9712
|
+
else {
|
|
9713
|
+
const newNode = document.createElement("div");
|
|
9714
|
+
newNode.id = nodeId;
|
|
9715
|
+
document.body.appendChild(newNode);
|
|
9716
|
+
}
|
|
9717
|
+
}
|
|
9718
|
+
function useEventListener(target, event, callback) {
|
|
9719
|
+
onMounted(() => target.addEventListener(event, callback, true));
|
|
9720
|
+
onUnmounted(() => target.removeEventListener(event, callback, true));
|
|
9721
|
+
}
|
|
9722
|
+
function useTreeSelection() {
|
|
9723
|
+
const tree = ref([]);
|
|
9724
|
+
const parentMap = /* @__PURE__ */ new Map();
|
|
9725
|
+
const childrenMap = /* @__PURE__ */ new Map();
|
|
9726
|
+
const allDescendantsMap = /* @__PURE__ */ new Map();
|
|
9727
|
+
const disabledMap = /* @__PURE__ */ new Map();
|
|
9728
|
+
const selectedSet = /* @__PURE__ */ new Set();
|
|
9729
|
+
const indeterminateSet = /* @__PURE__ */ new Set();
|
|
9730
|
+
const selectedKeys = ref([]);
|
|
9731
|
+
const indeterminateKeys = ref([]);
|
|
9732
|
+
function buildMaps() {
|
|
9733
|
+
parentMap.clear();
|
|
9734
|
+
childrenMap.clear();
|
|
9735
|
+
allDescendantsMap.clear();
|
|
9736
|
+
disabledMap.clear();
|
|
9737
|
+
const dfs = (node, parent) => {
|
|
9738
|
+
parentMap.set(node.key, parent);
|
|
9739
|
+
const directChildren = node.children?.map((c) => c.key) || [];
|
|
9740
|
+
childrenMap.set(node.key, directChildren);
|
|
9741
|
+
disabledMap.set(node.key, !!node.disabled);
|
|
9742
|
+
const allDescendants = [];
|
|
9743
|
+
const collectDescendants = (n) => {
|
|
9744
|
+
n.children?.forEach((child) => {
|
|
9745
|
+
allDescendants.push(child.key);
|
|
9746
|
+
collectDescendants(child);
|
|
9747
|
+
});
|
|
9748
|
+
};
|
|
9749
|
+
collectDescendants(node);
|
|
9750
|
+
allDescendantsMap.set(node.key, allDescendants);
|
|
9751
|
+
node.children?.forEach((child) => dfs(child, node.key));
|
|
9752
|
+
};
|
|
9753
|
+
unref(tree).forEach((root2) => dfs(root2, null));
|
|
9754
|
+
}
|
|
9755
|
+
buildMaps();
|
|
9756
|
+
function flush() {
|
|
9757
|
+
selectedKeys.value = Array.from(selectedSet);
|
|
9758
|
+
indeterminateKeys.value = Array.from(indeterminateSet);
|
|
9759
|
+
}
|
|
9760
|
+
function isLeafNode(key) {
|
|
9761
|
+
const children = childrenMap.get(key) || [];
|
|
9762
|
+
return children.length === 0;
|
|
9763
|
+
}
|
|
9764
|
+
function isNodeDisabled(key) {
|
|
9765
|
+
return disabledMap.get(key) || false;
|
|
9766
|
+
}
|
|
9767
|
+
function updateNodeState(key) {
|
|
9768
|
+
const children = childrenMap.get(key) || [];
|
|
9769
|
+
if (children.length === 0) {
|
|
9770
|
+
indeterminateSet.delete(key);
|
|
9771
|
+
return;
|
|
9772
|
+
}
|
|
9773
|
+
const enabledChildren = children.filter((child) => !isNodeDisabled(child));
|
|
9774
|
+
if (enabledChildren.length === 0) {
|
|
9775
|
+
selectedSet.delete(key);
|
|
9776
|
+
indeterminateSet.delete(key);
|
|
9777
|
+
return;
|
|
9778
|
+
}
|
|
9779
|
+
const selectedChildren = enabledChildren.filter((child) => selectedSet.has(child));
|
|
9780
|
+
const indeterminateChildren = enabledChildren.filter((child) => indeterminateSet.has(child));
|
|
9781
|
+
if (selectedChildren.length === enabledChildren.length) {
|
|
9782
|
+
selectedSet.add(key);
|
|
9783
|
+
indeterminateSet.delete(key);
|
|
9784
|
+
} else if (selectedChildren.length > 0 || indeterminateChildren.length > 0) {
|
|
9785
|
+
selectedSet.delete(key);
|
|
9786
|
+
indeterminateSet.add(key);
|
|
9787
|
+
} else {
|
|
9788
|
+
selectedSet.delete(key);
|
|
9789
|
+
indeterminateSet.delete(key);
|
|
9790
|
+
}
|
|
9791
|
+
}
|
|
9792
|
+
function updateAncestors(key) {
|
|
9793
|
+
let parent = parentMap.get(key);
|
|
9794
|
+
while (parent !== void 0 && parent !== null) {
|
|
9795
|
+
updateNodeState(parent);
|
|
9796
|
+
parent = parentMap.get(parent);
|
|
9797
|
+
}
|
|
9798
|
+
}
|
|
9799
|
+
function selectNodeAndDescendants(key) {
|
|
9800
|
+
if (isNodeDisabled(key)) {
|
|
9801
|
+
return;
|
|
9802
|
+
}
|
|
9803
|
+
selectedSet.add(key);
|
|
9804
|
+
indeterminateSet.delete(key);
|
|
9805
|
+
const descendants = allDescendantsMap.get(key) || [];
|
|
9806
|
+
descendants.forEach((descendant) => {
|
|
9807
|
+
if (!isNodeDisabled(descendant)) {
|
|
9808
|
+
selectedSet.add(descendant);
|
|
9809
|
+
indeterminateSet.delete(descendant);
|
|
9810
|
+
}
|
|
9811
|
+
});
|
|
9812
|
+
}
|
|
9813
|
+
function deselectNodeAndDescendants(key) {
|
|
9814
|
+
selectedSet.delete(key);
|
|
9815
|
+
indeterminateSet.delete(key);
|
|
9816
|
+
const descendants = allDescendantsMap.get(key) || [];
|
|
9817
|
+
descendants.forEach((descendant) => {
|
|
9818
|
+
selectedSet.delete(descendant);
|
|
9819
|
+
indeterminateSet.delete(descendant);
|
|
9820
|
+
});
|
|
9821
|
+
}
|
|
9822
|
+
function init({ tree: _tree, keys: keys2 }) {
|
|
9823
|
+
if ((_tree || []).length > 0) {
|
|
9824
|
+
tree.value = _tree;
|
|
9825
|
+
}
|
|
9826
|
+
buildMaps();
|
|
9827
|
+
for (const key of selectedSet) {
|
|
9828
|
+
if (!parentMap.has(key) && !childrenMap.has(key)) {
|
|
9829
|
+
selectedSet.delete(key);
|
|
9830
|
+
}
|
|
9831
|
+
}
|
|
9832
|
+
for (const key of indeterminateSet) {
|
|
9833
|
+
if (!parentMap.has(key) && !childrenMap.has(key)) {
|
|
9834
|
+
indeterminateSet.delete(key);
|
|
9835
|
+
}
|
|
9836
|
+
}
|
|
9837
|
+
recompute();
|
|
9838
|
+
selectedSet.clear();
|
|
9839
|
+
indeterminateSet.clear();
|
|
9840
|
+
if (Array.isArray(keys2)) {
|
|
9841
|
+
keys2.forEach((key) => {
|
|
9842
|
+
if (parentMap.has(key) || childrenMap.has(key)) {
|
|
9843
|
+
if (isNodeDisabled(key)) {
|
|
9844
|
+
return;
|
|
9845
|
+
}
|
|
9846
|
+
selectNodeAndDescendants(key);
|
|
9847
|
+
}
|
|
9848
|
+
});
|
|
9849
|
+
const processedAncestors = /* @__PURE__ */ new Set();
|
|
9850
|
+
keys2.forEach((key) => {
|
|
9851
|
+
if (parentMap.has(key) || childrenMap.has(key)) {
|
|
9852
|
+
let parent = parentMap.get(key);
|
|
9853
|
+
while (parent !== void 0 && parent !== null && !processedAncestors.has(parent)) {
|
|
9854
|
+
updateNodeState(parent);
|
|
9855
|
+
processedAncestors.add(parent);
|
|
9856
|
+
parent = parentMap.get(parent);
|
|
9857
|
+
}
|
|
9858
|
+
}
|
|
9859
|
+
});
|
|
9860
|
+
}
|
|
9861
|
+
flush();
|
|
9862
|
+
}
|
|
9863
|
+
function recompute() {
|
|
9864
|
+
indeterminateSet.clear();
|
|
9865
|
+
const allKeys = Array.from(parentMap.keys());
|
|
9866
|
+
const sortedKeys = allKeys.sort((a, b) => {
|
|
9867
|
+
const aChildren = childrenMap.get(a) || [];
|
|
9868
|
+
const bChildren = childrenMap.get(b) || [];
|
|
9869
|
+
return aChildren.length - bChildren.length;
|
|
9870
|
+
});
|
|
9871
|
+
sortedKeys.forEach((key) => {
|
|
9872
|
+
updateNodeState(key);
|
|
9873
|
+
});
|
|
9874
|
+
flush();
|
|
9875
|
+
}
|
|
9876
|
+
function addKey(key) {
|
|
9877
|
+
if (!parentMap.has(key) && !childrenMap.has(key)) {
|
|
9878
|
+
return;
|
|
9879
|
+
}
|
|
9880
|
+
if (isNodeDisabled(key)) {
|
|
9881
|
+
return;
|
|
9882
|
+
}
|
|
9883
|
+
selectNodeAndDescendants(key);
|
|
9884
|
+
updateAncestors(key);
|
|
9885
|
+
flush();
|
|
9886
|
+
}
|
|
9887
|
+
function removeKey(key) {
|
|
9888
|
+
if (!selectedSet.has(key) && !indeterminateSet.has(key)) {
|
|
9889
|
+
return;
|
|
9890
|
+
}
|
|
9891
|
+
deselectNodeAndDescendants(key);
|
|
9892
|
+
updateAncestors(key);
|
|
9893
|
+
flush();
|
|
9894
|
+
}
|
|
9895
|
+
function toggleKey(key) {
|
|
9896
|
+
if (isNodeDisabled(key)) {
|
|
9897
|
+
return;
|
|
9898
|
+
}
|
|
9899
|
+
if (selectedSet.has(key)) {
|
|
9900
|
+
removeKey(key);
|
|
9901
|
+
} else {
|
|
9902
|
+
addKey(key);
|
|
9903
|
+
}
|
|
9904
|
+
}
|
|
9905
|
+
const isSelected = computed(() => {
|
|
9906
|
+
return (key) => {
|
|
9907
|
+
return selectedKeys.value.includes(key);
|
|
9908
|
+
};
|
|
9909
|
+
});
|
|
9910
|
+
const isIndeterminate = computed(() => {
|
|
9911
|
+
return (key) => {
|
|
9912
|
+
return indeterminateKeys.value.includes(key);
|
|
9913
|
+
};
|
|
9914
|
+
});
|
|
9915
|
+
function getSelectedLeafKeys() {
|
|
9916
|
+
return Array.from(selectedSet).filter((key) => isLeafNode(key));
|
|
9917
|
+
}
|
|
9918
|
+
function findItemsByValues(values) {
|
|
9919
|
+
const foundItems = [];
|
|
9920
|
+
const findInTree = (nodes, targetValues) => {
|
|
9921
|
+
for (const node of nodes) {
|
|
9922
|
+
if (targetValues.includes(node.key)) {
|
|
9923
|
+
const item = {
|
|
9924
|
+
...node,
|
|
9925
|
+
isLeaf: !node.children || node.children.length === 0
|
|
9926
|
+
};
|
|
9927
|
+
delete item.children;
|
|
9928
|
+
foundItems.push(item);
|
|
9929
|
+
}
|
|
9930
|
+
if (node.children && node.children.length > 0) {
|
|
9931
|
+
findInTree(node.children, targetValues);
|
|
9932
|
+
}
|
|
9933
|
+
}
|
|
9934
|
+
};
|
|
9935
|
+
findInTree(unref(tree), values);
|
|
9936
|
+
return foundItems;
|
|
9937
|
+
}
|
|
9938
|
+
flush();
|
|
9939
|
+
return {
|
|
9940
|
+
selectedKeys,
|
|
9941
|
+
indeterminateKeys,
|
|
9942
|
+
init,
|
|
9943
|
+
addKey,
|
|
9944
|
+
removeKey,
|
|
9945
|
+
toggleKey,
|
|
9946
|
+
isSelected,
|
|
9947
|
+
isIndeterminate,
|
|
9948
|
+
isNodeDisabled,
|
|
9949
|
+
getSelectedLeafKeys,
|
|
9950
|
+
findItemsByValues
|
|
9951
|
+
};
|
|
9952
|
+
}
|
|
9707
9953
|
const treeModel = {
|
|
9708
9954
|
modelValue: {
|
|
9709
9955
|
type: [Array, String],
|
|
@@ -9765,7 +10011,7 @@ const treeProps = {
|
|
|
9765
10011
|
},
|
|
9766
10012
|
free: {
|
|
9767
10013
|
type: Boolean,
|
|
9768
|
-
default:
|
|
10014
|
+
default: false,
|
|
9769
10015
|
validator: validators.boolean({
|
|
9770
10016
|
componentName: "LewTree",
|
|
9771
10017
|
propName: "free"
|
|
@@ -9887,7 +10133,7 @@ const treeItemProps = {
|
|
|
9887
10133
|
function findAllNodes(tree = [], keyField = "key") {
|
|
9888
10134
|
const nodes = /* @__PURE__ */ new Set();
|
|
9889
10135
|
const traverse = (node) => {
|
|
9890
|
-
nodes.add(node[keyField]);
|
|
10136
|
+
nodes.add(String(node[keyField]));
|
|
9891
10137
|
if (node.children?.length > 0) {
|
|
9892
10138
|
node.children.forEach((child) => traverse(child));
|
|
9893
10139
|
}
|
|
@@ -9899,7 +10145,7 @@ function findLeafNodes(tree = [], keyField = "key") {
|
|
|
9899
10145
|
const leafNodes = /* @__PURE__ */ new Set();
|
|
9900
10146
|
const traverse = (node) => {
|
|
9901
10147
|
if (!node.children?.length) {
|
|
9902
|
-
leafNodes.add(node[keyField]);
|
|
10148
|
+
leafNodes.add(String(node[keyField]));
|
|
9903
10149
|
} else {
|
|
9904
10150
|
node.children.forEach((child) => traverse(child));
|
|
9905
10151
|
}
|
|
@@ -9918,7 +10164,7 @@ function formatTree$1({
|
|
|
9918
10164
|
}) {
|
|
9919
10165
|
return dataSource.map((node, index2) => {
|
|
9920
10166
|
const { children, ...rest } = node;
|
|
9921
|
-
const key = rest[keyField];
|
|
10167
|
+
const key = String(rest[keyField]);
|
|
9922
10168
|
const label = rest[labelField];
|
|
9923
10169
|
const keyPaths = [...parentKeyPaths, key];
|
|
9924
10170
|
const labelPaths = [...parentLabelPaths, label];
|
|
@@ -9930,7 +10176,7 @@ function formatTree$1({
|
|
|
9930
10176
|
keyPaths,
|
|
9931
10177
|
labelPaths,
|
|
9932
10178
|
isLeaf,
|
|
9933
|
-
parentKey: parent?.[keyField]
|
|
10179
|
+
parentKey: parent?.[keyField] ? String(parent[keyField]) : null,
|
|
9934
10180
|
level: parentKeyPaths.length,
|
|
9935
10181
|
parentKeyPaths,
|
|
9936
10182
|
parentLabelPaths,
|
|
@@ -10047,6 +10293,7 @@ const treeItemEmits = {
|
|
|
10047
10293
|
change: () => true,
|
|
10048
10294
|
expand: () => true
|
|
10049
10295
|
};
|
|
10296
|
+
const TREE_INJECTION_KEY = Symbol("lew-tree");
|
|
10050
10297
|
const _hoisted_1$O = {
|
|
10051
10298
|
key: 0,
|
|
10052
10299
|
class: "lew-tree-item-main"
|
|
@@ -10058,91 +10305,50 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
10058
10305
|
setup(__props, { emit: __emit }) {
|
|
10059
10306
|
const props = __props;
|
|
10060
10307
|
const emit = __emit;
|
|
10308
|
+
const treeContext = inject(TREE_INJECTION_KEY);
|
|
10061
10309
|
const {
|
|
10062
10310
|
modelValue,
|
|
10063
10311
|
expandKeys,
|
|
10312
|
+
dataSource,
|
|
10313
|
+
cacheDataSource,
|
|
10064
10314
|
multiple,
|
|
10065
10315
|
checkable,
|
|
10066
10316
|
expandAll,
|
|
10067
|
-
_dataSource,
|
|
10068
10317
|
loadMethod,
|
|
10069
10318
|
keyField,
|
|
10070
10319
|
labelField,
|
|
10071
10320
|
free,
|
|
10072
|
-
|
|
10073
|
-
} =
|
|
10321
|
+
treeSelection
|
|
10322
|
+
} = treeContext;
|
|
10074
10323
|
const loading = ref(false);
|
|
10075
10324
|
const loaded = ref(false);
|
|
10076
|
-
function areSomeChildrenSelected(node) {
|
|
10077
|
-
if (!node.children || node.children.length === 0)
|
|
10078
|
-
return false;
|
|
10079
|
-
const childKeys = findAllChildrenKeys(node);
|
|
10080
|
-
return childKeys.some((key) => modelValue.value.includes(key)) && !childKeys.every((key) => modelValue.value.includes(key));
|
|
10081
|
-
}
|
|
10082
10325
|
function select() {
|
|
10083
|
-
if (props.disabled)
|
|
10326
|
+
if (props.disabled || !props.__key)
|
|
10084
10327
|
return;
|
|
10085
|
-
|
|
10328
|
+
const nodeKey = props.__key;
|
|
10086
10329
|
if (multiple) {
|
|
10087
|
-
const index2 = newModelValue.indexOf(props.__key);
|
|
10088
10330
|
if (free) {
|
|
10331
|
+
const currentValue = modelValue.value;
|
|
10332
|
+
const newModelValue = Array.isArray(currentValue) ? [...currentValue] : [];
|
|
10333
|
+
const index2 = newModelValue.indexOf(nodeKey);
|
|
10089
10334
|
if (index2 > -1) {
|
|
10090
10335
|
newModelValue.splice(index2, 1);
|
|
10091
10336
|
} else {
|
|
10092
|
-
newModelValue.push(
|
|
10337
|
+
newModelValue.push(nodeKey);
|
|
10093
10338
|
}
|
|
10339
|
+
modelValue.value = newModelValue;
|
|
10094
10340
|
} else {
|
|
10095
|
-
|
|
10096
|
-
newModelValue.splice(index2, 1);
|
|
10097
|
-
if (props.extend && props.extend.children && props.extend.children.length > 0) {
|
|
10098
|
-
const childKeys = findAllChildrenKeys(props.extend);
|
|
10099
|
-
newModelValue = newModelValue.filter(
|
|
10100
|
-
(key) => !childKeys.includes(key)
|
|
10101
|
-
);
|
|
10102
|
-
}
|
|
10103
|
-
if (props.extend && props.extend.parentKeyPaths && props.extend.parentKeyPaths.length > 0) {
|
|
10104
|
-
props.extend.parentKeyPaths.forEach((parentKey) => {
|
|
10105
|
-
const parentIndex = newModelValue.indexOf(parentKey);
|
|
10106
|
-
if (parentIndex > -1) {
|
|
10107
|
-
newModelValue.splice(parentIndex, 1);
|
|
10108
|
-
}
|
|
10109
|
-
});
|
|
10110
|
-
}
|
|
10111
|
-
} else {
|
|
10112
|
-
newModelValue.push(props.__key);
|
|
10113
|
-
if (props.extend && props.extend.children && props.extend.children.length > 0) {
|
|
10114
|
-
const childKeys = findAllChildrenKeys(props.extend);
|
|
10115
|
-
childKeys.forEach((key) => {
|
|
10116
|
-
if (!newModelValue.includes(key)) {
|
|
10117
|
-
newModelValue.push(key);
|
|
10118
|
-
}
|
|
10119
|
-
});
|
|
10120
|
-
}
|
|
10121
|
-
}
|
|
10122
|
-
if (props.extend && props.extend.parentKey && props.extend.parentKeyPaths) {
|
|
10123
|
-
const parentKey = props.extend.parentKey;
|
|
10124
|
-
const parentNode = findNodeByKey(parentKey, _dataSource.value);
|
|
10125
|
-
const siblingKeys = (parentNode?.children || []).map((e) => e.key);
|
|
10126
|
-
if (siblingKeys.length > 0 && siblingKeys.every((key) => newModelValue.includes(key))) {
|
|
10127
|
-
if (!newModelValue.includes(parentKey)) {
|
|
10128
|
-
newModelValue.push(parentKey);
|
|
10129
|
-
}
|
|
10130
|
-
} else {
|
|
10131
|
-
newModelValue = newModelValue.filter(
|
|
10132
|
-
(key) => key !== parentKey
|
|
10133
|
-
);
|
|
10134
|
-
}
|
|
10135
|
-
}
|
|
10341
|
+
treeSelection?.toggleKey(nodeKey);
|
|
10136
10342
|
}
|
|
10137
10343
|
} else {
|
|
10138
|
-
|
|
10344
|
+
modelValue.value = nodeKey;
|
|
10139
10345
|
}
|
|
10140
|
-
modelValue.value = newModelValue;
|
|
10141
10346
|
emit("change");
|
|
10142
10347
|
}
|
|
10143
10348
|
async function expand() {
|
|
10144
|
-
if (!props.isLeaf) {
|
|
10145
|
-
const
|
|
10349
|
+
if (!props.isLeaf && props.__key) {
|
|
10350
|
+
const nodeKey = props.__key;
|
|
10351
|
+
const index2 = expandKeys.value.indexOf(nodeKey);
|
|
10146
10352
|
if (index2 > -1) {
|
|
10147
10353
|
expandKeys.value.splice(index2, 1);
|
|
10148
10354
|
} else if (loadMethod && !loading.value && !loaded.value) {
|
|
@@ -10150,8 +10356,8 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
10150
10356
|
const _tree = await loadMethod(
|
|
10151
10357
|
cloneDeep({
|
|
10152
10358
|
...props,
|
|
10153
|
-
key:
|
|
10154
|
-
value:
|
|
10359
|
+
key: nodeKey,
|
|
10360
|
+
value: nodeKey,
|
|
10155
10361
|
extend: props.extend
|
|
10156
10362
|
})
|
|
10157
10363
|
) || [];
|
|
@@ -10163,45 +10369,51 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
10163
10369
|
});
|
|
10164
10370
|
if (status === "success") {
|
|
10165
10371
|
loaded.value = true;
|
|
10166
|
-
insertChildByKey(
|
|
10167
|
-
|
|
10168
|
-
dataSource:
|
|
10372
|
+
insertChildByKey(dataSource.value, nodeKey, result);
|
|
10373
|
+
dataSource.value = formatTree$1({
|
|
10374
|
+
dataSource: dataSource.value,
|
|
10169
10375
|
keyField,
|
|
10170
10376
|
labelField,
|
|
10171
10377
|
free
|
|
10172
10378
|
});
|
|
10173
|
-
cacheDataSource.value = cloneDeep(
|
|
10174
|
-
expandKeys.value = [...expandKeys.value,
|
|
10379
|
+
cacheDataSource.value = cloneDeep(dataSource.value);
|
|
10380
|
+
expandKeys.value = [...expandKeys.value, nodeKey];
|
|
10175
10381
|
} else {
|
|
10176
10382
|
loaded.value = false;
|
|
10177
10383
|
LewMessage.error(error.message);
|
|
10178
10384
|
}
|
|
10179
10385
|
loading.value = false;
|
|
10180
10386
|
} else {
|
|
10181
|
-
expandKeys.value.push(
|
|
10387
|
+
expandKeys.value.push(nodeKey);
|
|
10182
10388
|
}
|
|
10183
10389
|
}
|
|
10184
10390
|
expandKeys.value = cloneDeep(expandKeys.value);
|
|
10185
10391
|
emit("expand");
|
|
10186
10392
|
}
|
|
10187
10393
|
const isNodeSelected = computed(() => {
|
|
10394
|
+
if (!props.__key)
|
|
10395
|
+
return false;
|
|
10188
10396
|
if (multiple) {
|
|
10189
|
-
|
|
10397
|
+
if (free) {
|
|
10398
|
+
return modelValue.value?.includes(props.__key) || false;
|
|
10399
|
+
} else {
|
|
10400
|
+
return treeSelection?.isSelected(props.__key) || false;
|
|
10401
|
+
}
|
|
10190
10402
|
} else {
|
|
10191
10403
|
return modelValue.value === props.__key;
|
|
10192
10404
|
}
|
|
10193
10405
|
});
|
|
10194
10406
|
const isNodePartiallySelected = computed(() => {
|
|
10195
|
-
if (!multiple || free)
|
|
10407
|
+
if (!multiple || free || !props.__key)
|
|
10196
10408
|
return false;
|
|
10197
|
-
return props.
|
|
10409
|
+
return treeSelection?.isIndeterminate(props.__key) || false;
|
|
10198
10410
|
});
|
|
10199
10411
|
return (_ctx, _cache) => {
|
|
10200
10412
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
10201
10413
|
createElementVNode("div", {
|
|
10202
10414
|
class: normalizeClass(["lew-tree-item", {
|
|
10203
10415
|
"lew-tree-item-expand-all": unref(expandAll),
|
|
10204
|
-
"lew-tree-item-expand": (unref(expandKeys) || []).includes(_ctx.__key),
|
|
10416
|
+
"lew-tree-item-expand": _ctx.__key ? (unref(expandKeys) || []).includes(_ctx.__key) : false,
|
|
10205
10417
|
"lew-tree-item-certain": unref(isNodePartiallySelected),
|
|
10206
10418
|
"lew-tree-item-selected": unref(isNodeSelected),
|
|
10207
10419
|
"lew-tree-item-leaf": _ctx.isLeaf,
|
|
@@ -10257,7 +10469,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
10257
10469
|
], 2),
|
|
10258
10470
|
!_ctx.isLeaf ? (openBlock(), createBlock(unref(_sfc_main$1a), { key: 0 }, {
|
|
10259
10471
|
default: withCtx(() => [
|
|
10260
|
-
(unref(expandKeys) || []).length > 0 && unref(expandKeys).includes(_ctx.__key) || unref(expandAll) ? (openBlock(), createElementBlock("div", _hoisted_1$O, [
|
|
10472
|
+
(unref(expandKeys) || []).length > 0 && _ctx.__key && unref(expandKeys).includes(_ctx.__key) || unref(expandAll) ? (openBlock(), createElementBlock("div", _hoisted_1$O, [
|
|
10261
10473
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
10262
10474
|
])) : createCommentVNode("", true)
|
|
10263
10475
|
]),
|
|
@@ -10267,12 +10479,11 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
10267
10479
|
};
|
|
10268
10480
|
}
|
|
10269
10481
|
});
|
|
10270
|
-
const LewTreeItem = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-
|
|
10482
|
+
const LewTreeItem = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-cd8b4ad5"]]);
|
|
10271
10483
|
const _hoisted_1$N = {
|
|
10272
10484
|
key: 0,
|
|
10273
10485
|
class: "lew-result-count"
|
|
10274
10486
|
};
|
|
10275
|
-
const DEBOUNCE_TIME = 250;
|
|
10276
10487
|
const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
10277
10488
|
__name: "LewTree",
|
|
10278
10489
|
props: /* @__PURE__ */ mergeModels(treeProps, {
|
|
@@ -10287,30 +10498,52 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
10287
10498
|
const emit = __emit;
|
|
10288
10499
|
const modelValue = useModel(__props, "modelValue");
|
|
10289
10500
|
const expandKeys = useModel(__props, "expandKeys");
|
|
10290
|
-
const
|
|
10501
|
+
const dataSource = ref([]);
|
|
10291
10502
|
const loading = ref(false);
|
|
10292
10503
|
const keyword = ref("");
|
|
10293
10504
|
const lastSearchKeyword = ref("");
|
|
10294
|
-
const searchTimer = ref(null);
|
|
10295
10505
|
const cacheDataSource = ref([]);
|
|
10296
|
-
|
|
10297
|
-
|
|
10298
|
-
|
|
10506
|
+
let isInternalUpdate = false;
|
|
10507
|
+
const {
|
|
10508
|
+
selectedKeys,
|
|
10509
|
+
init: initTreeSelection,
|
|
10510
|
+
isSelected,
|
|
10511
|
+
isIndeterminate,
|
|
10512
|
+
toggleKey,
|
|
10513
|
+
addKey,
|
|
10514
|
+
removeKey,
|
|
10515
|
+
findItemsByValues
|
|
10516
|
+
} = useTreeSelection();
|
|
10517
|
+
const treeContext = {
|
|
10518
|
+
// 只读配置
|
|
10299
10519
|
multiple: props.multiple,
|
|
10300
10520
|
checkable: props.checkable,
|
|
10301
10521
|
expandAll: props.expandAll,
|
|
10302
10522
|
free: props.free,
|
|
10303
10523
|
showLine: props.showLine,
|
|
10304
|
-
|
|
10524
|
+
onlyLeafSelectable: props.onlyLeafSelectable,
|
|
10305
10525
|
keyField: props.keyField,
|
|
10306
10526
|
labelField: props.labelField,
|
|
10307
|
-
|
|
10527
|
+
// 状态 refs
|
|
10528
|
+
modelValue,
|
|
10529
|
+
expandKeys,
|
|
10530
|
+
dataSource,
|
|
10308
10531
|
cacheDataSource,
|
|
10309
|
-
|
|
10310
|
-
|
|
10532
|
+
// 方法
|
|
10533
|
+
loadMethod: props.loadMethod,
|
|
10534
|
+
// Tree Selection - 只在多选且非 free 模式下提供
|
|
10535
|
+
treeSelection: props.multiple && !props.free ? {
|
|
10536
|
+
isSelected: isSelected.value,
|
|
10537
|
+
isIndeterminate: isIndeterminate.value,
|
|
10538
|
+
toggleKey,
|
|
10539
|
+
addKey,
|
|
10540
|
+
removeKey
|
|
10541
|
+
} : void 0
|
|
10542
|
+
};
|
|
10543
|
+
provide(TREE_INJECTION_KEY, treeContext);
|
|
10311
10544
|
const getResultText = computed(() => {
|
|
10312
|
-
return
|
|
10313
|
-
num: numFormat(
|
|
10545
|
+
return dataSource.value.length > 0 ? locale.t("tree.resultCount", {
|
|
10546
|
+
num: numFormat(dataSource.value.length)
|
|
10314
10547
|
}) : "";
|
|
10315
10548
|
});
|
|
10316
10549
|
function renderMenuTreeItem(item, level = 0) {
|
|
@@ -10325,7 +10558,12 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
10325
10558
|
isLeaf: isLeaf !== void 0 ? isLeaf : (children || []).length === 0,
|
|
10326
10559
|
disabled,
|
|
10327
10560
|
extend: item,
|
|
10328
|
-
onChange: () =>
|
|
10561
|
+
onChange: () => {
|
|
10562
|
+
nextTick(() => {
|
|
10563
|
+
const value = props.multiple ? modelValue.value : key;
|
|
10564
|
+
emit("change", cloneDeep({ extend: item, key, value }));
|
|
10565
|
+
});
|
|
10566
|
+
},
|
|
10329
10567
|
onExpand: () => emit("expand", cloneDeep({ extend: item, key, value: key }))
|
|
10330
10568
|
},
|
|
10331
10569
|
() => (item.children || []).map(
|
|
@@ -10333,9 +10571,32 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
10333
10571
|
)
|
|
10334
10572
|
);
|
|
10335
10573
|
}
|
|
10574
|
+
function updateModelValue() {
|
|
10575
|
+
isInternalUpdate = true;
|
|
10576
|
+
if (!props.multiple) {
|
|
10577
|
+
modelValue.value = selectedKeys.value[0] || void 0;
|
|
10578
|
+
} else if (props.onlyLeafSelectable) {
|
|
10579
|
+
const items = findItemsByValues(selectedKeys.value).filter(
|
|
10580
|
+
(item) => item.isLeaf
|
|
10581
|
+
);
|
|
10582
|
+
modelValue.value = items.map((item) => item.key);
|
|
10583
|
+
} else {
|
|
10584
|
+
modelValue.value = cloneDeep(selectedKeys.value);
|
|
10585
|
+
}
|
|
10586
|
+
nextTick(() => {
|
|
10587
|
+
isInternalUpdate = false;
|
|
10588
|
+
});
|
|
10589
|
+
}
|
|
10590
|
+
function initTreeStructure() {
|
|
10591
|
+
if (dataSource.value.length > 0 && props.multiple && !props.free) {
|
|
10592
|
+
const currentKeys = modelValue.value && Array.isArray(modelValue.value) ? modelValue.value : [];
|
|
10593
|
+
initTreeSelection({ tree: dataSource.value, keys: currentKeys });
|
|
10594
|
+
}
|
|
10595
|
+
}
|
|
10336
10596
|
async function init(searchKeyword = "") {
|
|
10337
10597
|
if (searchKeyword === "" && cacheDataSource.value.length > 0) {
|
|
10338
|
-
|
|
10598
|
+
dataSource.value = cacheDataSource.value;
|
|
10599
|
+
initTreeStructure();
|
|
10339
10600
|
emit("loadEnd", getResultText.value);
|
|
10340
10601
|
return;
|
|
10341
10602
|
}
|
|
@@ -10344,10 +10605,10 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
10344
10605
|
}
|
|
10345
10606
|
emit("loadStart");
|
|
10346
10607
|
lastSearchKeyword.value = searchKeyword;
|
|
10347
|
-
const { dataSource, initMethod, keyField, labelField, free } = props;
|
|
10608
|
+
const { dataSource: propsDataSource, initMethod, keyField, labelField, free } = props;
|
|
10348
10609
|
const { status, result, error } = await transformTree({
|
|
10349
10610
|
initMethod,
|
|
10350
|
-
dataSource,
|
|
10611
|
+
dataSource: propsDataSource,
|
|
10351
10612
|
keyField,
|
|
10352
10613
|
labelField,
|
|
10353
10614
|
free,
|
|
@@ -10358,35 +10619,62 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
10358
10619
|
return;
|
|
10359
10620
|
}
|
|
10360
10621
|
if (status === "success") {
|
|
10361
|
-
|
|
10622
|
+
dataSource.value = result;
|
|
10362
10623
|
if (searchKeyword === "" && cacheDataSource.value.length === 0) {
|
|
10363
10624
|
cacheDataSource.value = cloneDeep(result);
|
|
10364
10625
|
}
|
|
10626
|
+
initTreeStructure();
|
|
10365
10627
|
} else {
|
|
10366
10628
|
LewMessage.error(error.message);
|
|
10367
10629
|
}
|
|
10368
|
-
expandKeys.value = cloneDeep(expandKeys.value);
|
|
10369
|
-
modelValue.value = cloneDeep(modelValue.value);
|
|
10370
10630
|
loading.value = false;
|
|
10371
10631
|
emit("loadEnd", getResultText.value);
|
|
10372
10632
|
}
|
|
10373
10633
|
function reset() {
|
|
10374
|
-
|
|
10634
|
+
dataSource.value = cloneDeep(cacheDataSource.value);
|
|
10635
|
+
if (props.multiple && !props.free) {
|
|
10636
|
+
initTreeSelection({ keys: [] });
|
|
10637
|
+
} else {
|
|
10638
|
+
modelValue.value = props.multiple ? [] : void 0;
|
|
10639
|
+
}
|
|
10640
|
+
keyword.value = "";
|
|
10641
|
+
lastSearchKeyword.value = "";
|
|
10375
10642
|
emit("loadEnd", getResultText.value);
|
|
10376
10643
|
}
|
|
10377
|
-
|
|
10378
|
-
|
|
10379
|
-
|
|
10644
|
+
const search = /* @__PURE__ */ useDebounceFn((keyword2) => {
|
|
10645
|
+
init(keyword2);
|
|
10646
|
+
}, 250);
|
|
10647
|
+
watch(selectedKeys, () => {
|
|
10648
|
+
if (!isInternalUpdate && props.multiple && !props.free) {
|
|
10649
|
+
updateModelValue();
|
|
10380
10650
|
}
|
|
10381
|
-
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
-
|
|
10651
|
+
});
|
|
10652
|
+
watch(
|
|
10653
|
+
() => modelValue.value,
|
|
10654
|
+
(newValue) => {
|
|
10655
|
+
if (isInternalUpdate) {
|
|
10656
|
+
return;
|
|
10657
|
+
}
|
|
10658
|
+
if (props.multiple && !props.free && dataSource.value.length > 0) {
|
|
10659
|
+
const keys2 = Array.isArray(newValue) ? newValue : [];
|
|
10660
|
+
initTreeSelection({ keys: keys2 });
|
|
10661
|
+
}
|
|
10662
|
+
},
|
|
10663
|
+
{ immediate: false, deep: true }
|
|
10664
|
+
);
|
|
10665
|
+
watch(
|
|
10666
|
+
() => props.multiple,
|
|
10667
|
+
(isMultiple) => {
|
|
10668
|
+
if (isMultiple && !Array.isArray(modelValue.value)) {
|
|
10669
|
+
modelValue.value = modelValue.value ? [modelValue.value] : [];
|
|
10670
|
+
}
|
|
10671
|
+
},
|
|
10672
|
+
{ immediate: true }
|
|
10673
|
+
);
|
|
10386
10674
|
__expose({
|
|
10387
10675
|
search,
|
|
10388
10676
|
reset,
|
|
10389
|
-
getTree: () =>
|
|
10677
|
+
getTree: () => dataSource.value
|
|
10390
10678
|
});
|
|
10391
10679
|
onMounted(() => {
|
|
10392
10680
|
init();
|
|
@@ -10414,13 +10702,13 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
10414
10702
|
width: "100%",
|
|
10415
10703
|
size: "small",
|
|
10416
10704
|
placeholder: unref(locale).t("tree.searchPlaceholder"),
|
|
10417
|
-
onInput: _cache[1] || (_cache[1] = ($event) => search(unref(keyword)))
|
|
10705
|
+
onInput: _cache[1] || (_cache[1] = ($event) => unref(search)(unref(keyword)))
|
|
10418
10706
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
10419
10707
|
_ctx.searchable && unref(getResultText) ? (openBlock(), createElementBlock("div", _hoisted_1$N, toDisplayString$1(unref(getResultText)), 1)) : createCommentVNode("", true)
|
|
10420
10708
|
]),
|
|
10421
10709
|
_: 1
|
|
10422
10710
|
})) : createCommentVNode("", true),
|
|
10423
|
-
unref(
|
|
10711
|
+
unref(dataSource) && unref(dataSource).length === 0 ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
10424
10712
|
_ctx.$slots.empty ? renderSlot(_ctx.$slots, "empty", { key: 0 }, void 0, true) : (openBlock(), createBlock(unref(LewFlex), {
|
|
10425
10713
|
key: 1,
|
|
10426
10714
|
direction: "y",
|
|
@@ -10443,7 +10731,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
10443
10731
|
style: normalizeStyle({ height: unref(any2px)(_ctx.height) })
|
|
10444
10732
|
}, {
|
|
10445
10733
|
default: withCtx(() => [
|
|
10446
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(
|
|
10734
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(dataSource), (item) => {
|
|
10447
10735
|
return openBlock(), createBlock(resolveDynamicComponent(renderMenuTreeItem(item)), {
|
|
10448
10736
|
key: item.key
|
|
10449
10737
|
});
|
|
@@ -10462,7 +10750,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
10462
10750
|
};
|
|
10463
10751
|
}
|
|
10464
10752
|
});
|
|
10465
|
-
const LewTree = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-
|
|
10753
|
+
const LewTree = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-3590b828"]]);
|
|
10466
10754
|
const alertEmits = {
|
|
10467
10755
|
close: () => true
|
|
10468
10756
|
};
|
|
@@ -10509,11 +10797,11 @@ const _hoisted_3$q = {
|
|
|
10509
10797
|
key: 1,
|
|
10510
10798
|
class: "lew-alert-title"
|
|
10511
10799
|
};
|
|
10512
|
-
const _hoisted_4$
|
|
10800
|
+
const _hoisted_4$g = {
|
|
10513
10801
|
key: 2,
|
|
10514
10802
|
class: "lew-alert-content"
|
|
10515
10803
|
};
|
|
10516
|
-
const _hoisted_5$
|
|
10804
|
+
const _hoisted_5$e = {
|
|
10517
10805
|
key: 3,
|
|
10518
10806
|
class: "lew-alert-content"
|
|
10519
10807
|
};
|
|
@@ -10548,9 +10836,9 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
|
10548
10836
|
_ctx.$slots.title ? (openBlock(), createElementBlock("div", _hoisted_2$x, [
|
|
10549
10837
|
renderSlot(_ctx.$slots, "title", {}, void 0, true)
|
|
10550
10838
|
])) : props.title ? (openBlock(), createElementBlock("div", _hoisted_3$q, toDisplayString$1(props.title), 1)) : createCommentVNode("", true),
|
|
10551
|
-
_ctx.$slots.content ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
10839
|
+
_ctx.$slots.content ? (openBlock(), createElementBlock("div", _hoisted_4$g, [
|
|
10552
10840
|
renderSlot(_ctx.$slots, "content", {}, void 0, true)
|
|
10553
|
-
])) : props.content ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
10841
|
+
])) : props.content ? (openBlock(), createElementBlock("div", _hoisted_5$e, toDisplayString$1(props.content), 1)) : createCommentVNode("", true),
|
|
10554
10842
|
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_6$a, [
|
|
10555
10843
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
10556
10844
|
])) : createCommentVNode("", true)
|
|
@@ -10569,250 +10857,6 @@ const LewAlert = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v
|
|
|
10569
10857
|
const drawerEmits = {
|
|
10570
10858
|
close: () => true
|
|
10571
10859
|
};
|
|
10572
|
-
function useDOMCreate(nodeId) {
|
|
10573
|
-
const node = document.getElementById(nodeId);
|
|
10574
|
-
if (node) ;
|
|
10575
|
-
else {
|
|
10576
|
-
const newNode = document.createElement("div");
|
|
10577
|
-
newNode.id = nodeId;
|
|
10578
|
-
document.body.appendChild(newNode);
|
|
10579
|
-
}
|
|
10580
|
-
}
|
|
10581
|
-
function useEventListener(target, event, callback) {
|
|
10582
|
-
onMounted(() => target.addEventListener(event, callback, true));
|
|
10583
|
-
onUnmounted(() => target.removeEventListener(event, callback, true));
|
|
10584
|
-
}
|
|
10585
|
-
function useTreeSelection() {
|
|
10586
|
-
const tree = ref([]);
|
|
10587
|
-
const parentMap = /* @__PURE__ */ new Map();
|
|
10588
|
-
const childrenMap = /* @__PURE__ */ new Map();
|
|
10589
|
-
const allDescendantsMap = /* @__PURE__ */ new Map();
|
|
10590
|
-
const disabledMap = /* @__PURE__ */ new Map();
|
|
10591
|
-
const selectedSet = /* @__PURE__ */ new Set();
|
|
10592
|
-
const indeterminateSet = /* @__PURE__ */ new Set();
|
|
10593
|
-
const selectedKeys = ref([]);
|
|
10594
|
-
const indeterminateKeys = ref([]);
|
|
10595
|
-
function buildMaps() {
|
|
10596
|
-
parentMap.clear();
|
|
10597
|
-
childrenMap.clear();
|
|
10598
|
-
allDescendantsMap.clear();
|
|
10599
|
-
disabledMap.clear();
|
|
10600
|
-
const dfs = (node, parent) => {
|
|
10601
|
-
parentMap.set(node.key, parent);
|
|
10602
|
-
const directChildren = node.children?.map((c) => c.key) || [];
|
|
10603
|
-
childrenMap.set(node.key, directChildren);
|
|
10604
|
-
disabledMap.set(node.key, !!node.disabled);
|
|
10605
|
-
const allDescendants = [];
|
|
10606
|
-
const collectDescendants = (n) => {
|
|
10607
|
-
n.children?.forEach((child) => {
|
|
10608
|
-
allDescendants.push(child.key);
|
|
10609
|
-
collectDescendants(child);
|
|
10610
|
-
});
|
|
10611
|
-
};
|
|
10612
|
-
collectDescendants(node);
|
|
10613
|
-
allDescendantsMap.set(node.key, allDescendants);
|
|
10614
|
-
node.children?.forEach((child) => dfs(child, node.key));
|
|
10615
|
-
};
|
|
10616
|
-
unref(tree).forEach((root2) => dfs(root2, null));
|
|
10617
|
-
}
|
|
10618
|
-
buildMaps();
|
|
10619
|
-
function flush() {
|
|
10620
|
-
selectedKeys.value = Array.from(selectedSet);
|
|
10621
|
-
indeterminateKeys.value = Array.from(indeterminateSet);
|
|
10622
|
-
}
|
|
10623
|
-
function isLeafNode(key) {
|
|
10624
|
-
const children = childrenMap.get(key) || [];
|
|
10625
|
-
return children.length === 0;
|
|
10626
|
-
}
|
|
10627
|
-
function isNodeDisabled(key) {
|
|
10628
|
-
return disabledMap.get(key) || false;
|
|
10629
|
-
}
|
|
10630
|
-
function updateNodeState(key) {
|
|
10631
|
-
const children = childrenMap.get(key) || [];
|
|
10632
|
-
if (children.length === 0) {
|
|
10633
|
-
indeterminateSet.delete(key);
|
|
10634
|
-
return;
|
|
10635
|
-
}
|
|
10636
|
-
const enabledChildren = children.filter((child) => !isNodeDisabled(child));
|
|
10637
|
-
if (enabledChildren.length === 0) {
|
|
10638
|
-
selectedSet.delete(key);
|
|
10639
|
-
indeterminateSet.delete(key);
|
|
10640
|
-
return;
|
|
10641
|
-
}
|
|
10642
|
-
const selectedChildren = enabledChildren.filter((child) => selectedSet.has(child));
|
|
10643
|
-
const indeterminateChildren = enabledChildren.filter((child) => indeterminateSet.has(child));
|
|
10644
|
-
if (selectedChildren.length === enabledChildren.length) {
|
|
10645
|
-
selectedSet.add(key);
|
|
10646
|
-
indeterminateSet.delete(key);
|
|
10647
|
-
} else if (selectedChildren.length > 0 || indeterminateChildren.length > 0) {
|
|
10648
|
-
selectedSet.delete(key);
|
|
10649
|
-
indeterminateSet.add(key);
|
|
10650
|
-
} else {
|
|
10651
|
-
selectedSet.delete(key);
|
|
10652
|
-
indeterminateSet.delete(key);
|
|
10653
|
-
}
|
|
10654
|
-
}
|
|
10655
|
-
function updateAncestors(key) {
|
|
10656
|
-
let parent = parentMap.get(key);
|
|
10657
|
-
while (parent !== void 0 && parent !== null) {
|
|
10658
|
-
updateNodeState(parent);
|
|
10659
|
-
parent = parentMap.get(parent);
|
|
10660
|
-
}
|
|
10661
|
-
}
|
|
10662
|
-
function selectNodeAndDescendants(key) {
|
|
10663
|
-
if (isNodeDisabled(key)) {
|
|
10664
|
-
return;
|
|
10665
|
-
}
|
|
10666
|
-
selectedSet.add(key);
|
|
10667
|
-
indeterminateSet.delete(key);
|
|
10668
|
-
const descendants = allDescendantsMap.get(key) || [];
|
|
10669
|
-
descendants.forEach((descendant) => {
|
|
10670
|
-
if (!isNodeDisabled(descendant)) {
|
|
10671
|
-
selectedSet.add(descendant);
|
|
10672
|
-
indeterminateSet.delete(descendant);
|
|
10673
|
-
}
|
|
10674
|
-
});
|
|
10675
|
-
}
|
|
10676
|
-
function deselectNodeAndDescendants(key) {
|
|
10677
|
-
selectedSet.delete(key);
|
|
10678
|
-
indeterminateSet.delete(key);
|
|
10679
|
-
const descendants = allDescendantsMap.get(key) || [];
|
|
10680
|
-
descendants.forEach((descendant) => {
|
|
10681
|
-
selectedSet.delete(descendant);
|
|
10682
|
-
indeterminateSet.delete(descendant);
|
|
10683
|
-
});
|
|
10684
|
-
}
|
|
10685
|
-
function init({ tree: _tree, keys: keys2 }) {
|
|
10686
|
-
if ((_tree || []).length > 0) {
|
|
10687
|
-
tree.value = _tree;
|
|
10688
|
-
}
|
|
10689
|
-
buildMaps();
|
|
10690
|
-
for (const key of selectedSet) {
|
|
10691
|
-
if (!parentMap.has(key) && !childrenMap.has(key)) {
|
|
10692
|
-
selectedSet.delete(key);
|
|
10693
|
-
}
|
|
10694
|
-
}
|
|
10695
|
-
for (const key of indeterminateSet) {
|
|
10696
|
-
if (!parentMap.has(key) && !childrenMap.has(key)) {
|
|
10697
|
-
indeterminateSet.delete(key);
|
|
10698
|
-
}
|
|
10699
|
-
}
|
|
10700
|
-
recompute();
|
|
10701
|
-
selectedSet.clear();
|
|
10702
|
-
indeterminateSet.clear();
|
|
10703
|
-
if (Array.isArray(keys2)) {
|
|
10704
|
-
keys2.forEach((key) => {
|
|
10705
|
-
if (parentMap.has(key) || childrenMap.has(key)) {
|
|
10706
|
-
if (isNodeDisabled(key)) {
|
|
10707
|
-
return;
|
|
10708
|
-
}
|
|
10709
|
-
selectNodeAndDescendants(key);
|
|
10710
|
-
}
|
|
10711
|
-
});
|
|
10712
|
-
const processedAncestors = /* @__PURE__ */ new Set();
|
|
10713
|
-
keys2.forEach((key) => {
|
|
10714
|
-
if (parentMap.has(key) || childrenMap.has(key)) {
|
|
10715
|
-
let parent = parentMap.get(key);
|
|
10716
|
-
while (parent !== void 0 && parent !== null && !processedAncestors.has(parent)) {
|
|
10717
|
-
updateNodeState(parent);
|
|
10718
|
-
processedAncestors.add(parent);
|
|
10719
|
-
parent = parentMap.get(parent);
|
|
10720
|
-
}
|
|
10721
|
-
}
|
|
10722
|
-
});
|
|
10723
|
-
}
|
|
10724
|
-
flush();
|
|
10725
|
-
}
|
|
10726
|
-
function recompute() {
|
|
10727
|
-
indeterminateSet.clear();
|
|
10728
|
-
const allKeys = Array.from(parentMap.keys());
|
|
10729
|
-
const sortedKeys = allKeys.sort((a, b) => {
|
|
10730
|
-
const aChildren = childrenMap.get(a) || [];
|
|
10731
|
-
const bChildren = childrenMap.get(b) || [];
|
|
10732
|
-
return aChildren.length - bChildren.length;
|
|
10733
|
-
});
|
|
10734
|
-
sortedKeys.forEach((key) => {
|
|
10735
|
-
updateNodeState(key);
|
|
10736
|
-
});
|
|
10737
|
-
flush();
|
|
10738
|
-
}
|
|
10739
|
-
function addKey(key) {
|
|
10740
|
-
if (!parentMap.has(key) && !childrenMap.has(key)) {
|
|
10741
|
-
return;
|
|
10742
|
-
}
|
|
10743
|
-
if (isNodeDisabled(key)) {
|
|
10744
|
-
return;
|
|
10745
|
-
}
|
|
10746
|
-
selectNodeAndDescendants(key);
|
|
10747
|
-
updateAncestors(key);
|
|
10748
|
-
flush();
|
|
10749
|
-
}
|
|
10750
|
-
function removeKey(key) {
|
|
10751
|
-
if (!selectedSet.has(key) && !indeterminateSet.has(key)) {
|
|
10752
|
-
return;
|
|
10753
|
-
}
|
|
10754
|
-
deselectNodeAndDescendants(key);
|
|
10755
|
-
updateAncestors(key);
|
|
10756
|
-
flush();
|
|
10757
|
-
}
|
|
10758
|
-
function toggleKey(key) {
|
|
10759
|
-
if (isNodeDisabled(key)) {
|
|
10760
|
-
return;
|
|
10761
|
-
}
|
|
10762
|
-
if (selectedSet.has(key)) {
|
|
10763
|
-
removeKey(key);
|
|
10764
|
-
} else {
|
|
10765
|
-
addKey(key);
|
|
10766
|
-
}
|
|
10767
|
-
}
|
|
10768
|
-
const isSelected = computed(() => {
|
|
10769
|
-
return (key) => {
|
|
10770
|
-
return selectedKeys.value.includes(key);
|
|
10771
|
-
};
|
|
10772
|
-
});
|
|
10773
|
-
const isIndeterminate = computed(() => {
|
|
10774
|
-
return (key) => {
|
|
10775
|
-
return indeterminateKeys.value.includes(key);
|
|
10776
|
-
};
|
|
10777
|
-
});
|
|
10778
|
-
function getSelectedLeafKeys() {
|
|
10779
|
-
return Array.from(selectedSet).filter((key) => isLeafNode(key));
|
|
10780
|
-
}
|
|
10781
|
-
function findItemsByValues(values) {
|
|
10782
|
-
const foundItems = [];
|
|
10783
|
-
const findInTree = (nodes, targetValues) => {
|
|
10784
|
-
for (const node of nodes) {
|
|
10785
|
-
if (targetValues.includes(node.key)) {
|
|
10786
|
-
const item = {
|
|
10787
|
-
...node,
|
|
10788
|
-
isLeaf: !node.children || node.children.length === 0
|
|
10789
|
-
};
|
|
10790
|
-
delete item.children;
|
|
10791
|
-
foundItems.push(item);
|
|
10792
|
-
}
|
|
10793
|
-
if (node.children && node.children.length > 0) {
|
|
10794
|
-
findInTree(node.children, targetValues);
|
|
10795
|
-
}
|
|
10796
|
-
}
|
|
10797
|
-
};
|
|
10798
|
-
findInTree(unref(tree), values);
|
|
10799
|
-
return foundItems;
|
|
10800
|
-
}
|
|
10801
|
-
flush();
|
|
10802
|
-
return {
|
|
10803
|
-
selectedKeys,
|
|
10804
|
-
indeterminateKeys,
|
|
10805
|
-
init,
|
|
10806
|
-
addKey,
|
|
10807
|
-
removeKey,
|
|
10808
|
-
toggleKey,
|
|
10809
|
-
isSelected,
|
|
10810
|
-
isIndeterminate,
|
|
10811
|
-
isNodeDisabled,
|
|
10812
|
-
getSelectedLeafKeys,
|
|
10813
|
-
findItemsByValues
|
|
10814
|
-
};
|
|
10815
|
-
}
|
|
10816
10860
|
const drawerModel = {
|
|
10817
10861
|
visible: {
|
|
10818
10862
|
type: Boolean,
|
|
@@ -10926,7 +10970,7 @@ const _hoisted_1$L = {
|
|
|
10926
10970
|
};
|
|
10927
10971
|
const _hoisted_2$w = { class: "lew-drawer-title" };
|
|
10928
10972
|
const _hoisted_3$p = { class: "lew-drawer-body-slot" };
|
|
10929
|
-
const _hoisted_4$
|
|
10973
|
+
const _hoisted_4$f = {
|
|
10930
10974
|
key: 2,
|
|
10931
10975
|
class: "lew-drawer-footer-slot"
|
|
10932
10976
|
};
|
|
@@ -11106,7 +11150,7 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
|
11106
11150
|
createElementVNode("div", _hoisted_3$p, [
|
|
11107
11151
|
renderSlot(_ctx.$slots, "default")
|
|
11108
11152
|
]),
|
|
11109
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
11153
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_4$f, [
|
|
11110
11154
|
renderSlot(_ctx.$slots, "footer")
|
|
11111
11155
|
])) : !props.hideFooter ? (openBlock(), createBlock(unref(LewFlex), {
|
|
11112
11156
|
key: 3,
|
|
@@ -11672,8 +11716,8 @@ const _hoisted_1$I = {
|
|
|
11672
11716
|
};
|
|
11673
11717
|
const _hoisted_2$u = { class: "lew-popok-box-right" };
|
|
11674
11718
|
const _hoisted_3$o = { class: "lew-popok-box-right-header" };
|
|
11675
|
-
const _hoisted_4$
|
|
11676
|
-
const _hoisted_5$
|
|
11719
|
+
const _hoisted_4$e = { class: "lew-popok-box-right-main" };
|
|
11720
|
+
const _hoisted_5$d = { class: "lew-popok-box-footer" };
|
|
11677
11721
|
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
11678
11722
|
__name: "LewPopok",
|
|
11679
11723
|
props: popokButtonProps,
|
|
@@ -11749,14 +11793,14 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
11749
11793
|
createElementVNode("div", _hoisted_3$o, [
|
|
11750
11794
|
createVNode(_sfc_main$16, { "render-fn": _ctx.title }, null, 8, ["render-fn"])
|
|
11751
11795
|
]),
|
|
11752
|
-
createElementVNode("div", _hoisted_4$
|
|
11796
|
+
createElementVNode("div", _hoisted_4$e, [
|
|
11753
11797
|
createVNode(_sfc_main$16, { "render-fn": _ctx.content }, null, 8, ["render-fn"])
|
|
11754
11798
|
])
|
|
11755
11799
|
])
|
|
11756
11800
|
]),
|
|
11757
11801
|
_: 1
|
|
11758
11802
|
}),
|
|
11759
|
-
createElementVNode("div", _hoisted_5$
|
|
11803
|
+
createElementVNode("div", _hoisted_5$d, [
|
|
11760
11804
|
createVNode(unref(LewButton), {
|
|
11761
11805
|
text: _ctx.cancelText || unref(locale).t("popok.cancelText"),
|
|
11762
11806
|
color: "gray",
|
|
@@ -16354,7 +16398,8 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
16354
16398
|
}
|
|
16355
16399
|
}
|
|
16356
16400
|
async function selectItem(item, level) {
|
|
16357
|
-
if (item.disabled)
|
|
16401
|
+
if (item.disabled)
|
|
16402
|
+
return;
|
|
16358
16403
|
if (!item.isLeaf && !isEqual(item.valuePaths, state.activeValues)) {
|
|
16359
16404
|
state.optionsGroup = state.optionsGroup.slice(0, level + 1);
|
|
16360
16405
|
if (_loadMethod.value && !item.isLeaf) {
|
|
@@ -16419,7 +16464,8 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
16419
16464
|
}, 100);
|
|
16420
16465
|
}
|
|
16421
16466
|
}
|
|
16422
|
-
if (item.isLeaf)
|
|
16467
|
+
if (item.isLeaf)
|
|
16468
|
+
return;
|
|
16423
16469
|
if (isEqual(item.valuePaths, state.activeValues)) {
|
|
16424
16470
|
state.activeValues = item.parentValuePaths || [];
|
|
16425
16471
|
if (level < state.optionsGroup.length - 1) {
|
|
@@ -16651,7 +16697,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
16651
16697
|
};
|
|
16652
16698
|
}
|
|
16653
16699
|
});
|
|
16654
|
-
const LewCascader = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-
|
|
16700
|
+
const LewCascader = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-2fd52a92"]]);
|
|
16655
16701
|
const cascaderModel = {
|
|
16656
16702
|
modelValue: {
|
|
16657
16703
|
type: String
|
|
@@ -17779,8 +17825,8 @@ function getMonthDate(year, month) {
|
|
|
17779
17825
|
const _hoisted_1$C = { class: "lew-date" };
|
|
17780
17826
|
const _hoisted_2$q = { class: "lew-date-control-left" };
|
|
17781
17827
|
const _hoisted_3$l = { class: "cur-date" };
|
|
17782
|
-
const _hoisted_4$
|
|
17783
|
-
const _hoisted_5$
|
|
17828
|
+
const _hoisted_4$d = { class: "lew-date-control-right" };
|
|
17829
|
+
const _hoisted_5$c = { class: "lew-date-box" };
|
|
17784
17830
|
const _hoisted_6$9 = { class: "lew-date-num" };
|
|
17785
17831
|
const _hoisted_7$7 = ["onClick"];
|
|
17786
17832
|
const _hoisted_8$6 = { class: "lew-date-label" };
|
|
@@ -17937,7 +17983,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
17937
17983
|
})
|
|
17938
17984
|
]),
|
|
17939
17985
|
createElementVNode("div", _hoisted_3$l, toDisplayString$1(unref(dayjs)(`${unref(dateState).year}-${unref(dateState).month}`).format("YYYY-MM")), 1),
|
|
17940
|
-
createElementVNode("div", _hoisted_4$
|
|
17986
|
+
createElementVNode("div", _hoisted_4$d, [
|
|
17941
17987
|
createVNode(unref(LewButton), {
|
|
17942
17988
|
type: "light",
|
|
17943
17989
|
color: "gray",
|
|
@@ -17966,7 +18012,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
17966
18012
|
]),
|
|
17967
18013
|
_: 1
|
|
17968
18014
|
}),
|
|
17969
|
-
createElementVNode("div", _hoisted_5$
|
|
18015
|
+
createElementVNode("div", _hoisted_5$c, [
|
|
17970
18016
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(headDate), (item, index2) => {
|
|
17971
18017
|
return openBlock(), createElementBlock("div", {
|
|
17972
18018
|
key: `h${index2}`,
|
|
@@ -17996,8 +18042,8 @@ const LewDate = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-
|
|
|
17996
18042
|
const _hoisted_1$B = { class: "lew-time-control" };
|
|
17997
18043
|
const _hoisted_2$p = { class: "cur-time" };
|
|
17998
18044
|
const _hoisted_3$k = { class: "lew-time-container" };
|
|
17999
|
-
const _hoisted_4$
|
|
18000
|
-
const _hoisted_5$
|
|
18045
|
+
const _hoisted_4$c = { class: "lew-time-column" };
|
|
18046
|
+
const _hoisted_5$b = ["data-value", "onClick"];
|
|
18001
18047
|
const _hoisted_6$8 = ["data-text"];
|
|
18002
18048
|
const _hoisted_7$6 = { class: "lew-time-column" };
|
|
18003
18049
|
const _hoisted_8$5 = ["data-value", "onClick"];
|
|
@@ -18302,7 +18348,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
18302
18348
|
_cache[16] || (_cache[16] = createElementVNode("div", { class: "lew-time-center-mask" }, null, -1)),
|
|
18303
18349
|
_cache[17] || (_cache[17] = createElementVNode("div", { class: "lew-time-gradient-top" }, null, -1)),
|
|
18304
18350
|
_cache[18] || (_cache[18] = createElementVNode("div", { class: "lew-time-gradient-bottom" }, null, -1)),
|
|
18305
|
-
createElementVNode("div", _hoisted_4$
|
|
18351
|
+
createElementVNode("div", _hoisted_4$c, [
|
|
18306
18352
|
createElementVNode("div", {
|
|
18307
18353
|
ref_key: "hourRef",
|
|
18308
18354
|
ref: hourRef,
|
|
@@ -18323,7 +18369,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
18323
18369
|
class: "lew-time-value",
|
|
18324
18370
|
"data-text": hour.label
|
|
18325
18371
|
}, toDisplayString$1(hour.label), 9, _hoisted_6$8)
|
|
18326
|
-
], 8, _hoisted_5$
|
|
18372
|
+
], 8, _hoisted_5$b);
|
|
18327
18373
|
}), 128)),
|
|
18328
18374
|
_cache[11] || (_cache[11] = createElementVNode("div", { class: "lew-time-padding" }, null, -1))
|
|
18329
18375
|
], 544)
|
|
@@ -18413,8 +18459,8 @@ const LewTime = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-
|
|
|
18413
18459
|
const _hoisted_1$A = { class: "lew-datetime" };
|
|
18414
18460
|
const _hoisted_2$o = { class: "lew-datetime-content" };
|
|
18415
18461
|
const _hoisted_3$j = { class: "lew-datetime-panel lew-datetime-date-panel" };
|
|
18416
|
-
const _hoisted_4$
|
|
18417
|
-
const _hoisted_5$
|
|
18462
|
+
const _hoisted_4$b = { class: "lew-datetime-panel lew-datetime-time-panel" };
|
|
18463
|
+
const _hoisted_5$a = { class: "lew-datetime-actions" };
|
|
18418
18464
|
const _hoisted_6$7 = { class: "lew-datetime-actions-left" };
|
|
18419
18465
|
const _hoisted_7$5 = { class: "lew-datetime-actions-right" };
|
|
18420
18466
|
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
@@ -18498,7 +18544,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
18498
18544
|
"value-format": unref(dateFormat)
|
|
18499
18545
|
}, null, 8, ["value-format"])
|
|
18500
18546
|
]),
|
|
18501
|
-
createElementVNode("div", _hoisted_4$
|
|
18547
|
+
createElementVNode("div", _hoisted_4$b, [
|
|
18502
18548
|
createVNode(LewTime, {
|
|
18503
18549
|
ref_key: "timeRef",
|
|
18504
18550
|
ref: timeRef,
|
|
@@ -18508,7 +18554,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
18508
18554
|
}, null, 8, ["value-format"])
|
|
18509
18555
|
])
|
|
18510
18556
|
]),
|
|
18511
|
-
createElementVNode("div", _hoisted_5$
|
|
18557
|
+
createElementVNode("div", _hoisted_5$a, [
|
|
18512
18558
|
createElementVNode("div", _hoisted_6$7, [
|
|
18513
18559
|
createVNode(unref(LewButton), {
|
|
18514
18560
|
type: "light",
|
|
@@ -18556,8 +18602,8 @@ const LewDateTime = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "dat
|
|
|
18556
18602
|
const _hoisted_1$z = { class: "lew-month" };
|
|
18557
18603
|
const _hoisted_2$n = { class: "lew-month-control-left" };
|
|
18558
18604
|
const _hoisted_3$i = { class: "cur-year" };
|
|
18559
|
-
const _hoisted_4$
|
|
18560
|
-
const _hoisted_5$
|
|
18605
|
+
const _hoisted_4$a = { class: "lew-month-control-right" };
|
|
18606
|
+
const _hoisted_5$9 = { class: "lew-month-list" };
|
|
18561
18607
|
const _hoisted_6$6 = ["onClick"];
|
|
18562
18608
|
const _hoisted_7$4 = { class: "lew-month-label" };
|
|
18563
18609
|
const _hoisted_8$4 = {
|
|
@@ -18662,7 +18708,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
18662
18708
|
})
|
|
18663
18709
|
]),
|
|
18664
18710
|
createElementVNode("div", _hoisted_3$i, toDisplayString$1(unref(monthState).year), 1),
|
|
18665
|
-
createElementVNode("div", _hoisted_4$
|
|
18711
|
+
createElementVNode("div", _hoisted_4$a, [
|
|
18666
18712
|
createVNode(unref(LewButton), {
|
|
18667
18713
|
type: "light",
|
|
18668
18714
|
color: "gray",
|
|
@@ -18679,7 +18725,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
18679
18725
|
]),
|
|
18680
18726
|
_: 1
|
|
18681
18727
|
}),
|
|
18682
|
-
createElementVNode("div", _hoisted_5$
|
|
18728
|
+
createElementVNode("div", _hoisted_5$9, [
|
|
18683
18729
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(monthList), (month) => {
|
|
18684
18730
|
return openBlock(), createElementBlock("div", {
|
|
18685
18731
|
key: month.value,
|
|
@@ -18701,8 +18747,8 @@ const LewMonth = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v
|
|
|
18701
18747
|
const _hoisted_1$y = { class: "lew-quarter" };
|
|
18702
18748
|
const _hoisted_2$m = { class: "lew-quarter-control-left" };
|
|
18703
18749
|
const _hoisted_3$h = { class: "cur-year" };
|
|
18704
|
-
const _hoisted_4$
|
|
18705
|
-
const _hoisted_5$
|
|
18750
|
+
const _hoisted_4$9 = { class: "lew-quarter-control-right" };
|
|
18751
|
+
const _hoisted_5$8 = { class: "lew-quarter-list" };
|
|
18706
18752
|
const _hoisted_6$5 = ["onClick"];
|
|
18707
18753
|
const _hoisted_7$3 = { class: "lew-quarter-label" };
|
|
18708
18754
|
const _hoisted_8$3 = {
|
|
@@ -18800,7 +18846,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
18800
18846
|
})
|
|
18801
18847
|
]),
|
|
18802
18848
|
createElementVNode("div", _hoisted_3$h, toDisplayString$1(unref(currentYear)), 1),
|
|
18803
|
-
createElementVNode("div", _hoisted_4$
|
|
18849
|
+
createElementVNode("div", _hoisted_4$9, [
|
|
18804
18850
|
createVNode(unref(LewButton), {
|
|
18805
18851
|
type: "light",
|
|
18806
18852
|
color: "gray",
|
|
@@ -18817,7 +18863,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
18817
18863
|
]),
|
|
18818
18864
|
_: 1
|
|
18819
18865
|
}),
|
|
18820
|
-
createElementVNode("div", _hoisted_5$
|
|
18866
|
+
createElementVNode("div", _hoisted_5$8, [
|
|
18821
18867
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(quarterList), (item) => {
|
|
18822
18868
|
return openBlock(), createElementBlock("div", {
|
|
18823
18869
|
key: item.value,
|
|
@@ -18842,8 +18888,8 @@ const LewQuarter = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data
|
|
|
18842
18888
|
const _hoisted_1$x = { class: "lew-year" };
|
|
18843
18889
|
const _hoisted_2$l = { class: "lew-year-control-left" };
|
|
18844
18890
|
const _hoisted_3$g = { class: "cur-decade" };
|
|
18845
|
-
const _hoisted_4$
|
|
18846
|
-
const _hoisted_5$
|
|
18891
|
+
const _hoisted_4$8 = { class: "lew-year-control-right" };
|
|
18892
|
+
const _hoisted_5$7 = { class: "lew-year-list" };
|
|
18847
18893
|
const _hoisted_6$4 = ["onClick"];
|
|
18848
18894
|
const _hoisted_7$2 = { class: "lew-year-label" };
|
|
18849
18895
|
const _hoisted_8$2 = {
|
|
@@ -18943,7 +18989,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
18943
18989
|
})
|
|
18944
18990
|
]),
|
|
18945
18991
|
createElementVNode("div", _hoisted_3$g, toDisplayString$1(unref(yearState).startYear) + " - " + toDisplayString$1(unref(yearState).startYear + 11), 1),
|
|
18946
|
-
createElementVNode("div", _hoisted_4$
|
|
18992
|
+
createElementVNode("div", _hoisted_4$8, [
|
|
18947
18993
|
createVNode(unref(LewButton), {
|
|
18948
18994
|
type: "light",
|
|
18949
18995
|
color: "gray",
|
|
@@ -18960,7 +19006,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
18960
19006
|
]),
|
|
18961
19007
|
_: 1
|
|
18962
19008
|
}),
|
|
18963
|
-
createElementVNode("div", _hoisted_5$
|
|
19009
|
+
createElementVNode("div", _hoisted_5$7, [
|
|
18964
19010
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(yearList), (year) => {
|
|
18965
19011
|
return openBlock(), createElementBlock("div", {
|
|
18966
19012
|
key: year,
|
|
@@ -19508,8 +19554,8 @@ const dateRangeProps = {
|
|
|
19508
19554
|
const _hoisted_1$u = { class: "lew-date-range" };
|
|
19509
19555
|
const _hoisted_2$j = { class: "lew-date" };
|
|
19510
19556
|
const _hoisted_3$e = { class: "lew-date-control-left" };
|
|
19511
|
-
const _hoisted_4$
|
|
19512
|
-
const _hoisted_5$
|
|
19557
|
+
const _hoisted_4$7 = { class: "cur-date" };
|
|
19558
|
+
const _hoisted_5$6 = { class: "lew-date-control-right" };
|
|
19513
19559
|
const _hoisted_6$3 = { class: "lew-date-box" };
|
|
19514
19560
|
const _hoisted_7$1 = { class: "lew-date-num" };
|
|
19515
19561
|
const _hoisted_8$1 = ["onClick", "onMouseenter"];
|
|
@@ -19825,8 +19871,8 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
19825
19871
|
_: 1
|
|
19826
19872
|
})
|
|
19827
19873
|
]),
|
|
19828
|
-
createElementVNode("div", _hoisted_4$
|
|
19829
|
-
createElementVNode("div", _hoisted_5$
|
|
19874
|
+
createElementVNode("div", _hoisted_4$7, toDisplayString$1(unref(dayjs)(`${unref(dateState).year1}-${unref(dateState).month1}`).format("YYYY-MM")), 1),
|
|
19875
|
+
createElementVNode("div", _hoisted_5$6, [
|
|
19830
19876
|
createVNode(unref(LewButton), {
|
|
19831
19877
|
type: "light",
|
|
19832
19878
|
color: "gray",
|
|
@@ -19988,8 +20034,8 @@ const _hoisted_3$d = {
|
|
|
19988
20034
|
key: 1,
|
|
19989
20035
|
class: "lew-date-range-picker-dateValue lew-date-range-picker-start"
|
|
19990
20036
|
};
|
|
19991
|
-
const _hoisted_4$
|
|
19992
|
-
const _hoisted_5$
|
|
20037
|
+
const _hoisted_4$6 = { class: "lew-date-range-picker-mid" };
|
|
20038
|
+
const _hoisted_5$5 = {
|
|
19993
20039
|
key: 2,
|
|
19994
20040
|
class: "lew-date-range-picker-placeholder"
|
|
19995
20041
|
};
|
|
@@ -20129,13 +20175,13 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
20129
20175
|
}, {
|
|
20130
20176
|
default: withCtx(() => [
|
|
20131
20177
|
!modelValue.value?.start ? (openBlock(), createElementBlock("div", _hoisted_2$i, toDisplayString$1(_ctx.placeholderStart ? _ctx.placeholderStart : unref(locale).t("dateRangePicker.placeholderStart")), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$d, toDisplayString$1(modelValue.value.start), 1)),
|
|
20132
|
-
createElementVNode("div", _hoisted_4$
|
|
20178
|
+
createElementVNode("div", _hoisted_4$6, [
|
|
20133
20179
|
createVNode(CommonIcon, {
|
|
20134
20180
|
size: 14,
|
|
20135
20181
|
type: "minus"
|
|
20136
20182
|
})
|
|
20137
20183
|
]),
|
|
20138
|
-
!modelValue.value?.end ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
20184
|
+
!modelValue.value?.end ? (openBlock(), createElementBlock("div", _hoisted_5$5, toDisplayString$1(_ctx.placeholderEnd ? _ctx.placeholderEnd : unref(locale).t("dateRangePicker.placeholderEnd")), 1)) : (openBlock(), createElementBlock("div", _hoisted_6$2, toDisplayString$1(modelValue.value.end), 1)),
|
|
20139
20185
|
createVNode(CommonIcon, {
|
|
20140
20186
|
class: normalizeClass(["lew-date-range-picker-icon-calendar", {
|
|
20141
20187
|
"lew-date-range-picker-icon-calendar-hide": unref(checkClear)
|
|
@@ -22362,11 +22408,11 @@ const _hoisted_3$c = {
|
|
|
22362
22408
|
key: 1,
|
|
22363
22409
|
class: "lew-input-prefixes-icon"
|
|
22364
22410
|
};
|
|
22365
|
-
const _hoisted_4$
|
|
22411
|
+
const _hoisted_4$5 = {
|
|
22366
22412
|
key: 2,
|
|
22367
22413
|
class: "lew-input-prefixes-select"
|
|
22368
22414
|
};
|
|
22369
|
-
const _hoisted_5$
|
|
22415
|
+
const _hoisted_5$4 = ["disabled", "placeholder", "type", "readonly", "maxlength"];
|
|
22370
22416
|
const _hoisted_6$1 = {
|
|
22371
22417
|
key: 0,
|
|
22372
22418
|
class: "lew-input-auto-width"
|
|
@@ -22562,7 +22608,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
22562
22608
|
type: prefixValue.value
|
|
22563
22609
|
}, null, 8, ["size", "type"])
|
|
22564
22610
|
])) : createCommentVNode("", true),
|
|
22565
|
-
_ctx.prefixes === "select" ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
22611
|
+
_ctx.prefixes === "select" ? (openBlock(), createElementBlock("div", _hoisted_4$5, [
|
|
22566
22612
|
createVNode(unref(_sfc_main$7), {
|
|
22567
22613
|
placement: "bottom",
|
|
22568
22614
|
trigger: "click",
|
|
@@ -22635,7 +22681,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
22635
22681
|
onChange: handleChange,
|
|
22636
22682
|
onBlur: _blur,
|
|
22637
22683
|
onFocus: _focus
|
|
22638
|
-
}, null, 44, _hoisted_5$
|
|
22684
|
+
}, null, 44, _hoisted_5$4), [
|
|
22639
22685
|
[vModelDynamic, modelValue.value]
|
|
22640
22686
|
]),
|
|
22641
22687
|
_ctx.autoWidth ? (openBlock(), createElementBlock("label", _hoisted_6$1, toDisplayString$1(modelValue.value), 1)) : createCommentVNode("", true),
|
|
@@ -26858,7 +26904,7 @@ const treeSelectEmits = {
|
|
|
26858
26904
|
};
|
|
26859
26905
|
const treeSelectModel = {
|
|
26860
26906
|
modelValue: {
|
|
26861
|
-
type: String,
|
|
26907
|
+
type: [String, Array],
|
|
26862
26908
|
default: void 0
|
|
26863
26909
|
}
|
|
26864
26910
|
};
|
|
@@ -26920,6 +26966,14 @@ const treeSelectProps = {
|
|
|
26920
26966
|
propName: "clearable"
|
|
26921
26967
|
})
|
|
26922
26968
|
},
|
|
26969
|
+
multiple: {
|
|
26970
|
+
type: Boolean,
|
|
26971
|
+
default: false,
|
|
26972
|
+
validator: validators.boolean({
|
|
26973
|
+
componentName: "LewTreeSelect",
|
|
26974
|
+
propName: "multiple"
|
|
26975
|
+
})
|
|
26976
|
+
},
|
|
26923
26977
|
checkable: {
|
|
26924
26978
|
type: Boolean,
|
|
26925
26979
|
default: true,
|
|
@@ -26928,6 +26982,14 @@ const treeSelectProps = {
|
|
|
26928
26982
|
propName: "checkable"
|
|
26929
26983
|
})
|
|
26930
26984
|
},
|
|
26985
|
+
onlyLeafSelectable: {
|
|
26986
|
+
type: Boolean,
|
|
26987
|
+
default: true,
|
|
26988
|
+
validator: validators.boolean({
|
|
26989
|
+
componentName: "LewTreeSelect",
|
|
26990
|
+
propName: "onlyLeafSelectable"
|
|
26991
|
+
})
|
|
26992
|
+
},
|
|
26931
26993
|
showAllLevels: {
|
|
26932
26994
|
type: Boolean,
|
|
26933
26995
|
default: true,
|
|
@@ -26978,7 +27040,7 @@ const treeSelectProps = {
|
|
|
26978
27040
|
},
|
|
26979
27041
|
free: {
|
|
26980
27042
|
type: Boolean,
|
|
26981
|
-
default:
|
|
27043
|
+
default: false,
|
|
26982
27044
|
validator: validators.boolean({
|
|
26983
27045
|
componentName: "LewTreeSelect",
|
|
26984
27046
|
propName: "free"
|
|
@@ -27042,17 +27104,12 @@ const treeSelectProps = {
|
|
|
27042
27104
|
})
|
|
27043
27105
|
}
|
|
27044
27106
|
};
|
|
27045
|
-
const _hoisted_1$g = {
|
|
27046
|
-
|
|
27047
|
-
class: "lew-icon-loading-box"
|
|
27048
|
-
};
|
|
27049
|
-
const _hoisted_2$c = ["title", "readonly", "placeholder"];
|
|
27050
|
-
const _hoisted_3$a = { class: "lew-select-options-box" };
|
|
27051
|
-
const _hoisted_4$5 = {
|
|
27107
|
+
const _hoisted_1$g = { class: "lew-select-options-box" };
|
|
27108
|
+
const _hoisted_2$c = {
|
|
27052
27109
|
key: 0,
|
|
27053
27110
|
class: "result-count"
|
|
27054
27111
|
};
|
|
27055
|
-
const
|
|
27112
|
+
const _hoisted_3$a = { class: "tree-select-wrapper lew-scrollbar" };
|
|
27056
27113
|
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
27057
27114
|
__name: "LewTreeSelect",
|
|
27058
27115
|
props: /* @__PURE__ */ mergeModels(treeSelectProps, {
|
|
@@ -27069,7 +27126,6 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
27069
27126
|
}
|
|
27070
27127
|
const treeSelectValue = useModel(__props, "modelValue");
|
|
27071
27128
|
const lewSelectRef = ref();
|
|
27072
|
-
const inputRef = ref();
|
|
27073
27129
|
const lewPopoverRef = ref();
|
|
27074
27130
|
const lewTreeRef = ref();
|
|
27075
27131
|
const formMethods = inject("formMethods", {});
|
|
@@ -27079,7 +27135,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
27079
27135
|
} else if (props.initMethodId) {
|
|
27080
27136
|
return formMethods[props.initMethodId];
|
|
27081
27137
|
}
|
|
27082
|
-
return
|
|
27138
|
+
return void 0;
|
|
27083
27139
|
});
|
|
27084
27140
|
const state = reactive({
|
|
27085
27141
|
selectWidth: 0,
|
|
@@ -27090,16 +27146,14 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
27090
27146
|
// 树加载
|
|
27091
27147
|
initLoading: true,
|
|
27092
27148
|
// 初始化 loading
|
|
27093
|
-
valueIsChange: false,
|
|
27094
|
-
// 记录
|
|
27095
|
-
keyword: props.defaultValue || treeSelectValue.value,
|
|
27096
|
-
// 搜索关键字
|
|
27097
|
-
keywordBackup: props.defaultValue,
|
|
27098
|
-
// 搜索关键字备份
|
|
27099
27149
|
resultText: ""
|
|
27100
27150
|
});
|
|
27101
27151
|
function getSelectWidth() {
|
|
27102
|
-
|
|
27152
|
+
if (lewSelectRef.value?.$el) {
|
|
27153
|
+
state.selectWidth = lewSelectRef.value.$el.clientWidth - 12;
|
|
27154
|
+
} else if (lewSelectRef.value?.clientWidth) {
|
|
27155
|
+
state.selectWidth = lewSelectRef.value.clientWidth - 12;
|
|
27156
|
+
}
|
|
27103
27157
|
}
|
|
27104
27158
|
function show() {
|
|
27105
27159
|
lewPopoverRef.value.show();
|
|
@@ -27107,105 +27161,101 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
27107
27161
|
function hide2() {
|
|
27108
27162
|
lewPopoverRef.value.hide();
|
|
27109
27163
|
}
|
|
27110
|
-
const searchDebounce = /* @__PURE__ */ useDebounceFn(async (e) => {
|
|
27111
|
-
search(e);
|
|
27112
|
-
}, props.searchDelay);
|
|
27113
|
-
async function search(e) {
|
|
27114
|
-
const keyword = e.target.value;
|
|
27115
|
-
if (props.searchable) {
|
|
27116
|
-
await lewTreeRef.value.search(keyword);
|
|
27117
|
-
}
|
|
27118
|
-
}
|
|
27119
27164
|
function change(e) {
|
|
27120
|
-
const { value } = e;
|
|
27121
|
-
treeSelectValue.value = value;
|
|
27122
|
-
state.valueIsChange = true;
|
|
27123
|
-
setKeywordLabel(value);
|
|
27124
27165
|
emit("change", e);
|
|
27125
|
-
|
|
27126
|
-
|
|
27127
|
-
|
|
27166
|
+
if (!props.multiple) {
|
|
27167
|
+
setTimeout(() => {
|
|
27168
|
+
hide2();
|
|
27169
|
+
}, 100);
|
|
27170
|
+
} else {
|
|
27171
|
+
setTimeout(() => {
|
|
27172
|
+
if (lewPopoverRef.value) {
|
|
27173
|
+
lewPopoverRef.value.refresh();
|
|
27174
|
+
}
|
|
27175
|
+
}, 100);
|
|
27176
|
+
}
|
|
27128
27177
|
}
|
|
27129
27178
|
function clearHandle() {
|
|
27130
|
-
treeSelectValue.value = void 0;
|
|
27131
|
-
state.keyword = "";
|
|
27132
|
-
state.keywordBackup = "";
|
|
27179
|
+
treeSelectValue.value = props.multiple ? [] : void 0;
|
|
27133
27180
|
emit("clear");
|
|
27134
27181
|
emit("change", void 0);
|
|
27182
|
+
if (props.multiple) {
|
|
27183
|
+
setTimeout(() => {
|
|
27184
|
+
if (lewPopoverRef.value) {
|
|
27185
|
+
lewPopoverRef.value.refresh();
|
|
27186
|
+
}
|
|
27187
|
+
}, 100);
|
|
27188
|
+
}
|
|
27135
27189
|
}
|
|
27136
|
-
const
|
|
27137
|
-
|
|
27138
|
-
|
|
27139
|
-
|
|
27140
|
-
|
|
27141
|
-
|
|
27142
|
-
|
|
27143
|
-
|
|
27144
|
-
|
|
27145
|
-
|
|
27146
|
-
|
|
27147
|
-
|
|
27148
|
-
|
|
27149
|
-
|
|
27150
|
-
"
|
|
27190
|
+
const formatItems = computed(() => {
|
|
27191
|
+
if (!treeSelectValue.value) {
|
|
27192
|
+
return props.multiple ? [] : "";
|
|
27193
|
+
}
|
|
27194
|
+
const tree = lewTreeRef.value?.getTree();
|
|
27195
|
+
if (!tree) {
|
|
27196
|
+
return props.multiple ? [] : "";
|
|
27197
|
+
}
|
|
27198
|
+
if (!props.multiple && treeSelectValue.value) {
|
|
27199
|
+
const treeItem = findNodeByKey(treeSelectValue.value, tree);
|
|
27200
|
+
if (!treeItem) {
|
|
27201
|
+
return "";
|
|
27202
|
+
}
|
|
27203
|
+
const { labelPaths, label } = treeItem;
|
|
27204
|
+
return props.showAllLevels && labelPaths?.length > 0 ? labelPaths.join(" / ") : label;
|
|
27205
|
+
}
|
|
27206
|
+
if (!Array.isArray(treeSelectValue.value)) {
|
|
27207
|
+
return [];
|
|
27208
|
+
}
|
|
27209
|
+
return treeSelectValue.value.map((value) => {
|
|
27210
|
+
const treeItem = findNodeByKey(value, tree);
|
|
27211
|
+
if (!treeItem) {
|
|
27212
|
+
return {
|
|
27213
|
+
value,
|
|
27214
|
+
label: value
|
|
27215
|
+
};
|
|
27216
|
+
}
|
|
27217
|
+
const { label, labelPaths } = treeItem;
|
|
27218
|
+
return {
|
|
27219
|
+
value,
|
|
27220
|
+
// 多选模式只显示节点名称,不显示完整路径
|
|
27221
|
+
label: props.multiple ? label : props.showAllLevels && labelPaths?.length > 0 ? labelPaths.join(" / ") : label
|
|
27222
|
+
};
|
|
27151
27223
|
});
|
|
27152
27224
|
});
|
|
27225
|
+
function deleteTag(value) {
|
|
27226
|
+
if (Array.isArray(treeSelectValue.value)) {
|
|
27227
|
+
treeSelectValue.value = treeSelectValue.value.filter((v) => v !== value);
|
|
27228
|
+
emit("change", treeSelectValue.value);
|
|
27229
|
+
setTimeout(() => {
|
|
27230
|
+
if (lewPopoverRef.value) {
|
|
27231
|
+
lewPopoverRef.value.refresh();
|
|
27232
|
+
}
|
|
27233
|
+
}, 100);
|
|
27234
|
+
}
|
|
27235
|
+
}
|
|
27153
27236
|
const getBodyClassName = computed(() => {
|
|
27154
27237
|
const { size, disabled } = props;
|
|
27155
27238
|
return object2class("lew-select-body", { size, disabled });
|
|
27156
27239
|
});
|
|
27157
|
-
const getIconSize = computed(() => {
|
|
27158
|
-
const size = {
|
|
27159
|
-
small: 14,
|
|
27160
|
-
medium: 15,
|
|
27161
|
-
large: 16
|
|
27162
|
-
};
|
|
27163
|
-
return size[props.size];
|
|
27164
|
-
});
|
|
27165
|
-
function setKeywordLabel(value) {
|
|
27166
|
-
if (lewTreeRef.value && value) {
|
|
27167
|
-
const tree = lewTreeRef.value.getTree();
|
|
27168
|
-
const treeItem = findNodeByKey(value, tree);
|
|
27169
|
-
if (treeItem !== void 0) {
|
|
27170
|
-
const { labelPaths, label } = treeItem;
|
|
27171
|
-
if (props.showAllLevels && labelPaths && labelPaths.length > 0) {
|
|
27172
|
-
state.keyword = labelPaths.join(" / ");
|
|
27173
|
-
} else {
|
|
27174
|
-
state.keyword = label[0];
|
|
27175
|
-
}
|
|
27176
|
-
}
|
|
27177
|
-
}
|
|
27178
|
-
}
|
|
27179
|
-
setKeywordLabel(treeSelectValue.value);
|
|
27180
27240
|
function showHandle() {
|
|
27181
27241
|
state.visible = true;
|
|
27182
|
-
state.keywordBackup = cloneDeep(state.keyword);
|
|
27183
|
-
state.valueIsChange = false;
|
|
27184
|
-
if (props.searchable) {
|
|
27185
|
-
state.keyword = "";
|
|
27186
|
-
}
|
|
27187
27242
|
getSelectWidth();
|
|
27188
|
-
if (props.searchable) {
|
|
27189
|
-
search({ target: { value: "" } });
|
|
27190
|
-
}
|
|
27191
27243
|
}
|
|
27192
27244
|
function hideHandle() {
|
|
27193
27245
|
state.visible = false;
|
|
27194
|
-
if (
|
|
27195
|
-
|
|
27196
|
-
}
|
|
27197
|
-
if (!treeSelectValue.value && state.keyword) {
|
|
27198
|
-
state.keyword = "";
|
|
27199
|
-
state.keywordBackup = "";
|
|
27246
|
+
if (props.searchable) {
|
|
27247
|
+
lewTreeRef.value.search("");
|
|
27200
27248
|
}
|
|
27201
|
-
lewTreeRef.value.reset();
|
|
27202
27249
|
}
|
|
27203
|
-
watch(
|
|
27204
|
-
|
|
27205
|
-
|
|
27206
|
-
|
|
27207
|
-
|
|
27208
|
-
|
|
27250
|
+
watch(
|
|
27251
|
+
() => props.multiple,
|
|
27252
|
+
(isMultiple) => {
|
|
27253
|
+
if (isMultiple && !Array.isArray(treeSelectValue.value)) {
|
|
27254
|
+
treeSelectValue.value = treeSelectValue.value ? [treeSelectValue.value] : [];
|
|
27255
|
+
}
|
|
27256
|
+
},
|
|
27257
|
+
{ immediate: true }
|
|
27258
|
+
);
|
|
27209
27259
|
__expose({ show, hide: hide2 });
|
|
27210
27260
|
return (_ctx, _cache) => {
|
|
27211
27261
|
return openBlock(), createBlock(unref(_sfc_main$U), {
|
|
@@ -27218,59 +27268,30 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
27218
27268
|
"trigger-width": _ctx.width,
|
|
27219
27269
|
disabled: _ctx.disabled || _ctx.readonly || unref(state).initLoading,
|
|
27220
27270
|
placement: "bottom-start",
|
|
27271
|
+
"hide-on-click": _ctx.searchable || _ctx.multiple ? false : true,
|
|
27221
27272
|
loading: unref(state).searchLoading,
|
|
27222
27273
|
onShow: showHandle,
|
|
27223
27274
|
onHide: hideHandle
|
|
27224
27275
|
}, {
|
|
27225
27276
|
trigger: withCtx(() => [
|
|
27226
|
-
|
|
27277
|
+
createVNode(CommonInput, {
|
|
27227
27278
|
ref_key: "lewSelectRef",
|
|
27228
27279
|
ref: lewSelectRef,
|
|
27229
|
-
|
|
27230
|
-
|
|
27231
|
-
|
|
27232
|
-
|
|
27233
|
-
|
|
27234
|
-
|
|
27235
|
-
|
|
27236
|
-
|
|
27237
|
-
|
|
27238
|
-
|
|
27239
|
-
|
|
27240
|
-
|
|
27241
|
-
|
|
27242
|
-
|
|
27243
|
-
|
|
27244
|
-
}, null, 8, ["size", "class"])),
|
|
27245
|
-
createVNode(Transition, { name: "lew-form-icon-ani" }, {
|
|
27246
|
-
default: withCtx(() => [
|
|
27247
|
-
_ctx.clearable && unref(state).keyword && !_ctx.readonly ? (openBlock(), createBlock(CommonIcon, {
|
|
27248
|
-
key: 0,
|
|
27249
|
-
size: unref(getIconSize),
|
|
27250
|
-
type: "close",
|
|
27251
|
-
class: normalizeClass(["lew-form-icon-close", {
|
|
27252
|
-
"lew-form-icon-close-focus": unref(state).visible
|
|
27253
|
-
}]),
|
|
27254
|
-
onClick: withModifiers(clearHandle, ["stop"])
|
|
27255
|
-
}, null, 8, ["size", "class"])) : createCommentVNode("", true)
|
|
27256
|
-
]),
|
|
27257
|
-
_: 1
|
|
27258
|
-
}),
|
|
27259
|
-
withDirectives(createElementVNode("input", {
|
|
27260
|
-
ref_key: "inputRef",
|
|
27261
|
-
ref: inputRef,
|
|
27262
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(state).keyword = $event),
|
|
27263
|
-
class: "lew-value",
|
|
27264
|
-
title: unref(state).keyword,
|
|
27265
|
-
style: normalizeStyle(unref(getValueStyle)),
|
|
27266
|
-
readonly: !_ctx.searchable,
|
|
27267
|
-
placeholder: unref(getPlaceholder),
|
|
27268
|
-
onInput: _cache[1] || (_cache[1] = //@ts-ignore
|
|
27269
|
-
(...args) => unref(searchDebounce) && unref(searchDebounce)(...args))
|
|
27270
|
-
}, null, 44, _hoisted_2$c), [
|
|
27271
|
-
[vModelText, unref(state).keyword]
|
|
27272
|
-
])
|
|
27273
|
-
], 2)
|
|
27280
|
+
modelValue: treeSelectValue.value,
|
|
27281
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => treeSelectValue.value = $event),
|
|
27282
|
+
multiple: _ctx.multiple,
|
|
27283
|
+
loading: unref(state).initLoading,
|
|
27284
|
+
clearable: _ctx.clearable,
|
|
27285
|
+
readonly: _ctx.readonly,
|
|
27286
|
+
disabled: _ctx.disabled || unref(state).initLoading,
|
|
27287
|
+
size: _ctx.size,
|
|
27288
|
+
placeholder: _ctx.placeholder,
|
|
27289
|
+
width: unref(any2px)(_ctx.width),
|
|
27290
|
+
focus: unref(state).visible,
|
|
27291
|
+
"format-items": unref(formatItems),
|
|
27292
|
+
onClear: clearHandle,
|
|
27293
|
+
onDelete: deleteTag
|
|
27294
|
+
}, null, 8, ["modelValue", "multiple", "loading", "clearable", "readonly", "disabled", "size", "placeholder", "width", "focus", "format-items"])
|
|
27274
27295
|
]),
|
|
27275
27296
|
"popover-body": withCtx(() => [
|
|
27276
27297
|
createElementVNode("div", {
|
|
@@ -27278,14 +27299,14 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
27278
27299
|
style: normalizeStyle(`width:${unref(state).selectWidth}px`)
|
|
27279
27300
|
}, [
|
|
27280
27301
|
renderSlot(_ctx.$slots, "header", {}, void 0, true),
|
|
27281
|
-
createElementVNode("div",
|
|
27282
|
-
_ctx.searchable && unref(state).resultText ? (openBlock(), createElementBlock("div",
|
|
27283
|
-
createElementVNode("div",
|
|
27302
|
+
createElementVNode("div", _hoisted_1$g, [
|
|
27303
|
+
_ctx.searchable && unref(state).resultText ? (openBlock(), createElementBlock("div", _hoisted_2$c, toDisplayString$1(unref(state).resultText), 1)) : createCommentVNode("", true),
|
|
27304
|
+
createElementVNode("div", _hoisted_3$a, [
|
|
27284
27305
|
createVNode(unref(LewTree), mergeProps({
|
|
27285
27306
|
ref_key: "lewTreeRef",
|
|
27286
27307
|
ref: lewTreeRef,
|
|
27287
27308
|
modelValue: treeSelectValue.value,
|
|
27288
|
-
"onUpdate:modelValue": _cache[
|
|
27309
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => treeSelectValue.value = $event)
|
|
27289
27310
|
}, {
|
|
27290
27311
|
keyField: _ctx.keyField,
|
|
27291
27312
|
labelField: _ctx.labelField,
|
|
@@ -27296,11 +27317,14 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
27296
27317
|
dataSource: _ctx.dataSource,
|
|
27297
27318
|
loadMethod: _ctx.loadMethod,
|
|
27298
27319
|
initMethod: unref(_initMethod),
|
|
27299
|
-
expandAll: _ctx.expandAll
|
|
27320
|
+
expandAll: _ctx.expandAll,
|
|
27321
|
+
multiple: _ctx.multiple,
|
|
27322
|
+
onlyLeafSelectable: _ctx.onlyLeafSelectable,
|
|
27323
|
+
free: _ctx.free
|
|
27300
27324
|
}, {
|
|
27301
27325
|
"is-select": true,
|
|
27302
|
-
onLoadStart: _cache[
|
|
27303
|
-
onLoadEnd: _cache[
|
|
27326
|
+
onLoadStart: _cache[2] || (_cache[2] = ($event) => unref(state).searchLoading = true),
|
|
27327
|
+
onLoadEnd: _cache[3] || (_cache[3] = ($event) => (unref(state).searchLoading = false, unref(state).initLoading = false, unref(state).resultText = $event)),
|
|
27304
27328
|
onChange: change
|
|
27305
27329
|
}), createSlots({ _: 2 }, [
|
|
27306
27330
|
_ctx.$slots.empty ? {
|
|
@@ -27324,11 +27348,11 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
27324
27348
|
], 6)
|
|
27325
27349
|
]),
|
|
27326
27350
|
_: 3
|
|
27327
|
-
}, 8, ["style", "trigger", "trigger-width", "disabled", "loading"]);
|
|
27351
|
+
}, 8, ["style", "trigger", "trigger-width", "disabled", "hide-on-click", "loading"]);
|
|
27328
27352
|
};
|
|
27329
27353
|
}
|
|
27330
27354
|
});
|
|
27331
|
-
const LewTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-
|
|
27355
|
+
const LewTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-d65fa3b8"]]);
|
|
27332
27356
|
const uploadEmits = {
|
|
27333
27357
|
change: (files) => files,
|
|
27334
27358
|
delete: (file) => file
|
|
@@ -29422,11 +29446,6 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
29422
29446
|
};
|
|
29423
29447
|
}
|
|
29424
29448
|
});
|
|
29425
|
-
const textTrimEmits = {
|
|
29426
|
-
click: (event) => event,
|
|
29427
|
-
mouseenter: () => true,
|
|
29428
|
-
mouseleave: () => true
|
|
29429
|
-
};
|
|
29430
29449
|
const textTrimProps = {
|
|
29431
29450
|
text: {
|
|
29432
29451
|
type: String,
|
|
@@ -29600,10 +29619,8 @@ function clearMeasureCache() {
|
|
|
29600
29619
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
29601
29620
|
__name: "LewTextTrim",
|
|
29602
29621
|
props: textTrimProps,
|
|
29603
|
-
|
|
29604
|
-
setup(__props, { emit: __emit }) {
|
|
29622
|
+
setup(__props) {
|
|
29605
29623
|
const props = __props;
|
|
29606
|
-
const emit = __emit;
|
|
29607
29624
|
const lewTextTrimRef = ref();
|
|
29608
29625
|
const lewTextTrimPopRef = ref();
|
|
29609
29626
|
const displayText = ref("");
|
|
@@ -29697,16 +29714,9 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
29697
29714
|
requestAnimationFrame(calculateDisplayText);
|
|
29698
29715
|
}
|
|
29699
29716
|
const debouncedCalculate = /* @__PURE__ */ useDebounceFn(calculateDisplayText, 250);
|
|
29700
|
-
function handleClick(event) {
|
|
29701
|
-
emit("click", event);
|
|
29702
|
-
}
|
|
29703
29717
|
function handleMouseEnter() {
|
|
29704
|
-
emit("mouseenter");
|
|
29705
29718
|
initTippy();
|
|
29706
29719
|
}
|
|
29707
|
-
function handleMouseLeave() {
|
|
29708
|
-
emit("mouseleave");
|
|
29709
|
-
}
|
|
29710
29720
|
onMounted(() => {
|
|
29711
29721
|
initCalculateDisplayText();
|
|
29712
29722
|
useResizeObserver(lewTextTrimRef, debouncedCalculate);
|
|
@@ -29722,9 +29732,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
29722
29732
|
ref: lewTextTrimRef,
|
|
29723
29733
|
class: "lew-text-trim-wrapper",
|
|
29724
29734
|
style: normalizeStyle(textTrimStyle.value),
|
|
29725
|
-
|
|
29726
|
-
onMouseenter: handleMouseEnter,
|
|
29727
|
-
onMouseleave: handleMouseLeave
|
|
29735
|
+
onMouseenter: handleMouseEnter
|
|
29728
29736
|
}, [
|
|
29729
29737
|
_ctx.text ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
29730
29738
|
createTextVNode(toDisplayString$1(displayText.value), 1)
|
|
@@ -29740,7 +29748,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
29740
29748
|
};
|
|
29741
29749
|
}
|
|
29742
29750
|
});
|
|
29743
|
-
const LewTextTrim = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-
|
|
29751
|
+
const LewTextTrim = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-b184c886"]]);
|
|
29744
29752
|
const titleEmits = {
|
|
29745
29753
|
click: (event) => event
|
|
29746
29754
|
};
|
|
@@ -29853,10 +29861,12 @@ const actionBoxProps = {
|
|
|
29853
29861
|
},
|
|
29854
29862
|
dropdownLabel: {
|
|
29855
29863
|
type: null,
|
|
29864
|
+
typePopKeys: ["LewComponentSource"],
|
|
29856
29865
|
default: "More"
|
|
29857
29866
|
},
|
|
29858
29867
|
dropdownIcon: {
|
|
29859
|
-
type: null
|
|
29868
|
+
type: null,
|
|
29869
|
+
typePopKeys: ["LewComponentSource"]
|
|
29860
29870
|
},
|
|
29861
29871
|
iconOnly: {
|
|
29862
29872
|
type: Boolean,
|
|
@@ -31481,7 +31491,6 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
31481
31491
|
tabsProps,
|
|
31482
31492
|
tagEmits,
|
|
31483
31493
|
tagProps,
|
|
31484
|
-
textTrimEmits,
|
|
31485
31494
|
textTrimProps,
|
|
31486
31495
|
textareaEmits,
|
|
31487
31496
|
textareaModel,
|
|
@@ -38955,7 +38964,6 @@ export {
|
|
|
38955
38964
|
tabsProps,
|
|
38956
38965
|
tagEmits,
|
|
38957
38966
|
tagProps,
|
|
38958
|
-
textTrimEmits,
|
|
38959
38967
|
textTrimProps,
|
|
38960
38968
|
textareaEmits,
|
|
38961
38969
|
textareaModel,
|