@das-fed/ui 1.1.4 → 6.3.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/global/icons/index.local.js +1 -1
- package/global/style/index.css +1 -1
- package/global/style/scrollbar.css +22 -22
- package/global/theme/index.js +12 -12
- package/global/theme/module/color.js +31 -31
- package/global/theme/module/fontSize.js +5 -5
- package/global/theme/module/scrollbar.js +6 -6
- package/package.json +15 -9
- package/packages/business-components/app-container/index.js +154 -147
- package/packages/business-components/change-enterprises/index.css +1 -0
- package/packages/business-components/change-enterprises/index.js +241 -0
- package/packages/business-components/change-pwd/index.css +1 -0
- package/packages/business-components/change-pwd/index.js +330 -0
- package/packages/business-components/currency-page/index.css +1 -0
- package/packages/business-components/currency-page/index.js +99 -0
- package/packages/business-components/device-panel/index.css +1 -0
- package/packages/business-components/device-panel/index.js +115939 -0
- package/packages/business-components/echarts/index.js +93 -122
- package/packages/business-components/export-button/index.js +73 -66
- package/packages/business-components/import-button/index.js +213 -170
- package/packages/business-components/index.js +8 -1
- package/packages/business-components/layout-breadcrumb/index.js +82 -66
- package/packages/business-components/model-table-dialog/index.js +299 -289
- package/packages/business-components/process-configuration/index.css +1 -0
- package/packages/business-components/process-configuration/index.js +612 -0
- package/packages/business-components/process-form/index.css +1 -0
- package/packages/business-components/process-form/index.js +524 -0
- package/packages/business-components/process-search-form/index.js +73 -315
- package/packages/business-components/process-table/index.css +1 -1
- package/packages/business-components/process-table/index.js +186 -152
- package/packages/business-components/urgent-panel/index.css +1 -0
- package/packages/business-components/urgent-panel/index.js +3914 -0
- package/packages/business-components/user-org-dialog/index.js +466 -375
- package/packages/business-components/video-dialog/index.css +1 -0
- package/packages/business-components/video-dialog/index.js +1041 -0
- package/packages/business.js +1 -2
- package/packages/components/alert/index.js +449 -633
- package/packages/components/audio-video/index.css +1 -1
- package/packages/components/audio-video/index.js +312 -126
- package/packages/components/autocomplete/index.css +1 -1
- package/packages/components/autocomplete/index.js +312 -2923
- package/packages/components/breadcrumb/index.js +97 -82
- package/packages/components/button/index.css +1 -1
- package/packages/components/button/index.js +646 -787
- package/packages/components/calendar/index.css +1 -1
- package/packages/components/calendar/index.js +655 -3879
- package/packages/components/cascader/index.js +209 -203
- package/packages/components/checkbox/index.css +1 -1
- package/packages/components/checkbox/index.js +710 -872
- package/packages/components/collapse-panel/index.css +1 -1
- package/packages/components/collapse-panel/index.js +419 -601
- package/packages/components/collapse-transition/index.js +23 -21
- package/packages/components/collaspe/index.css +1 -1
- package/packages/components/collaspe/index.js +413 -595
- package/packages/components/color-picker/index.css +1 -1
- package/packages/components/color-picker/index.js +176 -133
- package/packages/components/custom-search-item/index.js +43 -37
- package/packages/components/date-picker/index.js +1338 -1459
- package/packages/components/dialog/index.js +429 -215
- package/packages/components/dimple-layout/index.css +1 -1
- package/packages/components/dimple-layout/index.js +1298 -1794
- package/packages/components/drawer/index.js +105 -77
- package/packages/components/dropdown/index.js +129 -109
- package/packages/components/edit-table/index.css +1 -1
- package/packages/components/edit-table/index.js +868 -752
- package/packages/components/empty/index.js +83 -78
- package/packages/components/form/index.js +22 -15
- package/packages/components/form-item/index.css +1 -1
- package/packages/components/form-item/index.js +601 -440
- package/packages/components/icon/index.css +1 -1
- package/packages/components/icon/index.js +38 -22
- package/packages/components/image-preview/index.css +1 -0
- package/packages/components/image-preview/index.js +2714 -0
- package/packages/components/image-upload/index.js +601 -765
- package/packages/components/image-viewer/index.css +1 -1
- package/packages/components/image-viewer/index.js +909 -990
- package/packages/components/index.js +2 -2
- package/packages/components/input/index.css +1 -1
- package/packages/components/input/index.js +284 -256
- package/packages/components/input-dialog-select/index.css +1 -1
- package/packages/components/input-dialog-select/index.js +179 -156
- package/packages/components/input-number/index.css +1 -1
- package/packages/components/input-number/index.js +157 -170
- package/packages/components/live-player/index.css +1 -0
- package/packages/components/live-player/index.js +170 -0
- package/packages/components/loading/index.js +17 -26
- package/packages/components/map/index.css +1 -1
- package/packages/components/map/index.js +18913 -461
- package/packages/components/menu-aside/index.css +1 -1
- package/packages/components/menu-aside/index.js +648 -713
- package/packages/components/menu-header/index.js +446 -629
- package/packages/components/message/index.js +25 -16
- package/packages/components/notification/index.js +386 -575
- package/packages/components/overlay/index.js +112 -103
- package/packages/components/pagination/index.js +260 -330
- package/packages/components/popover/index.js +104 -93
- package/packages/components/popup-mask/index.css +1 -1
- package/packages/components/popup-mask/index.js +77 -72
- package/packages/components/preview/index.js +33 -28
- package/packages/components/progress/index.js +214 -221
- package/packages/components/radio/index.css +1 -1
- package/packages/components/radio/index.js +699 -862
- package/packages/components/radio-tabs/index.js +144 -107
- package/packages/components/rich-editor/index.css +1 -1
- package/packages/components/rich-editor/index.js +105 -106
- package/packages/components/scrollbar/index.css +3 -2
- package/packages/components/scrollbar/index.js +2262 -1201
- package/packages/components/search/index.js +500 -664
- package/packages/components/search-form/index.css +1 -1
- package/packages/components/search-form/index.js +724 -626
- package/packages/components/select/index.css +1 -1
- package/packages/components/select/index.js +1052 -950
- package/packages/components/select-input/index.js +63 -53
- package/packages/components/select-list/index.css +1 -1
- package/packages/components/select-list/index.js +258 -235
- package/packages/components/special-range-picker-month/index.css +1 -1
- package/packages/components/special-range-picker-month/index.js +3068 -72555
- package/packages/components/special-range-picker-year/index.css +1 -1
- package/packages/components/special-range-picker-year/index.js +345 -339
- package/packages/components/spin/index.js +415 -594
- package/packages/components/split-panel/index.css +1 -1
- package/packages/components/split-panel/index.js +146 -127
- package/packages/components/step/index.js +414 -597
- package/packages/components/steps/index.js +407 -590
- package/packages/components/switch/index.js +23 -23
- package/packages/components/table/index.css +1 -1
- package/packages/components/table/index.js +80813 -27734
- package/packages/components/tabs/index.css +1 -1
- package/packages/components/tabs/index.js +620 -813
- package/packages/components/tag/index.js +63 -63
- package/packages/components/text-tooltip/index.css +9 -0
- package/packages/components/text-tooltip/index.js +2739 -33
- package/packages/components/time-line/index.js +464 -643
- package/packages/components/tooltip/index.css +1 -1
- package/packages/components/tooltip/index.js +108 -79
- package/packages/components/tree/index.css +1 -1
- package/packages/components/tree/index.js +840 -809
- package/packages/components/tree-select/index.js +271 -303
- package/packages/components/tree-table/index.js +461 -352
- package/packages/components/upload/index.js +682 -858
- package/packages/components/virtual-tree/index.css +1 -1
- package/packages/components/virtual-tree/index.js +144 -126
- package/packages/index.d.ts +1 -0
- package/packages/index.js +2 -2
- package/style/business.css +11 -4
- package/style/index.css +52 -42
- package/packages/business-components/low-code/index.css +0 -1
- package/packages/business-components/low-code/index.js +0 -60
- package/packages/components/audio-video-player/index.css +0 -1
- package/packages/components/audio-video-player/index.js +0 -83
- package/packages/components/table-column/index.css +0 -1
- package/packages/components/table-column/index.js +0 -82021
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { warn, getCurrentInstance, inject, ref, computed, unref as unref$1, watch as watch$1, onMounted, shallowRef, onBeforeUnmount, onBeforeMount, provide, defineComponent, renderSlot, openBlock, createElementBlock, normalizeClass, normalizeStyle, withDirectives, cloneVNode, Fragment, Text, Comment, createVNode, createBlock, mergeProps, withCtx, createCommentVNode, nextTick, toRef, Teleport, Transition, vShow, readonly, onDeactivated, toDisplayString, createTextVNode, onUpdated, useAttrs, createElementVNode, withModifiers,
|
|
1
|
+
import { warn, getCurrentInstance, inject, ref, computed, unref as unref$1, watch as watch$1, onMounted, shallowRef, onBeforeUnmount, onBeforeMount, provide, defineComponent, renderSlot, openBlock, createElementBlock, normalizeClass, normalizeStyle, withDirectives, cloneVNode, Fragment, Text, Comment, createVNode, createBlock, mergeProps, withCtx, createCommentVNode, nextTick, toRef, Teleport, Transition, vShow, readonly, onDeactivated, toDisplayString, createTextVNode, onUpdated, useAttrs, createElementVNode, withModifiers, createSlots } from 'vue';
|
|
2
2
|
import { withInstall as withInstall$1 } from '@das-fed/utils';
|
|
3
|
-
import { DasTreeRef, DasSelect,
|
|
3
|
+
import { DasTreeRef, DasSelect, DasTree, DasIcon } from '@das-fed/ui';
|
|
4
4
|
import { SizeWatcher } from '@das-fed/utils/size-watcher';
|
|
5
5
|
import { flatTree } from '@das-fed/utils/common-tools';
|
|
6
6
|
import { vClickOutside } from '@das-fed/utils/directive';
|
|
@@ -199,11 +199,13 @@ __spreadValues({
|
|
|
199
199
|
}, _TransitionPresets);
|
|
200
200
|
|
|
201
201
|
/**
|
|
202
|
-
* @vue/shared v3.4.
|
|
202
|
+
* @vue/shared v3.4.27
|
|
203
203
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
204
204
|
* @license MIT
|
|
205
205
|
**/
|
|
206
206
|
|
|
207
|
+
|
|
208
|
+
|
|
207
209
|
!!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
|
|
208
210
|
!!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
|
|
209
211
|
const NOOP = () => {
|
|
@@ -427,14 +429,14 @@ const _bem = (namespace, block, blockSuffix, element, modifier) => {
|
|
|
427
429
|
};
|
|
428
430
|
const namespaceContextKey = Symbol("namespaceContextKey");
|
|
429
431
|
const useGetDerivedNamespace = (namespaceOverrides) => {
|
|
430
|
-
const derivedNamespace =
|
|
432
|
+
const derivedNamespace = (getCurrentInstance() ? inject(namespaceContextKey, ref(defaultNamespace)) : ref(defaultNamespace));
|
|
431
433
|
const namespace = computed(() => {
|
|
432
434
|
return unref$1(derivedNamespace) || defaultNamespace;
|
|
433
435
|
});
|
|
434
436
|
return namespace;
|
|
435
437
|
};
|
|
436
438
|
const useNamespace = (block, namespaceOverrides) => {
|
|
437
|
-
const namespace = useGetDerivedNamespace(
|
|
439
|
+
const namespace = useGetDerivedNamespace();
|
|
438
440
|
const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
|
|
439
441
|
const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
|
|
440
442
|
const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
|
|
@@ -868,7 +870,7 @@ const zIndex = ref(0);
|
|
|
868
870
|
const defaultInitialZIndex = 2e3;
|
|
869
871
|
const zIndexContextKey = Symbol("zIndexContextKey");
|
|
870
872
|
const useZIndex = (zIndexOverrides) => {
|
|
871
|
-
const zIndexInjection =
|
|
873
|
+
const zIndexInjection = (getCurrentInstance() ? inject(zIndexContextKey, void 0) : void 0);
|
|
872
874
|
const initialZIndex = computed(() => {
|
|
873
875
|
const zIndexFromInjection = unref$1(zIndexInjection);
|
|
874
876
|
return isNumber(zIndexFromInjection) ? zIndexFromInjection : defaultInitialZIndex;
|
|
@@ -1564,10 +1566,10 @@ const _sfc_main$8 = defineComponent({
|
|
|
1564
1566
|
};
|
|
1565
1567
|
}
|
|
1566
1568
|
});
|
|
1567
|
-
function _sfc_render$
|
|
1569
|
+
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1568
1570
|
return renderSlot(_ctx.$slots, "default", { handleKeydown: _ctx.onKeydown });
|
|
1569
1571
|
}
|
|
1570
|
-
var ElFocusTrap = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$
|
|
1572
|
+
var ElFocusTrap = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$3], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/focus-trap/src/focus-trap.vue"]]);
|
|
1571
1573
|
|
|
1572
1574
|
const POSITIONING_STRATEGIES = ["fixed", "absolute"];
|
|
1573
1575
|
const popperCoreConfigProps = buildProps({
|
|
@@ -2463,19 +2465,19 @@ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof win
|
|
|
2463
2465
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
2464
2466
|
inheritAttrs: false
|
|
2465
2467
|
});
|
|
2466
|
-
function _sfc_render$
|
|
2468
|
+
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2467
2469
|
return renderSlot(_ctx.$slots, "default");
|
|
2468
2470
|
}
|
|
2469
|
-
var Collection = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["render", _sfc_render$
|
|
2471
|
+
var Collection = /* @__PURE__ */ _export_sfc$1(_sfc_main$3, [["render", _sfc_render$2], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection.vue"]]);
|
|
2470
2472
|
|
|
2471
2473
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
2472
2474
|
name: "ElCollectionItem",
|
|
2473
2475
|
inheritAttrs: false
|
|
2474
2476
|
});
|
|
2475
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2477
|
+
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2476
2478
|
return renderSlot(_ctx.$slots, "default");
|
|
2477
2479
|
}
|
|
2478
|
-
var CollectionItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$2, [["render", _sfc_render], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection-item.vue"]]);
|
|
2480
|
+
var CollectionItem = /* @__PURE__ */ _export_sfc$1(_sfc_main$2, [["render", _sfc_render$1], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection-item.vue"]]);
|
|
2479
2481
|
|
|
2480
2482
|
const COLLECTION_ITEM_SIGN = `data-el-collection-item`;
|
|
2481
2483
|
const createCollectionWithScope = (name) => {
|
|
@@ -20049,17 +20051,23 @@ const useTreeSelect = (props, emit, nodeKey, attrs, lazy, isCheckStrictly) => {
|
|
|
20049
20051
|
emit("update:keyword", val);
|
|
20050
20052
|
}
|
|
20051
20053
|
});
|
|
20054
|
+
const treePath = computed({
|
|
20055
|
+
get: () => {
|
|
20056
|
+
return props.path;
|
|
20057
|
+
},
|
|
20058
|
+
set: (val) => {
|
|
20059
|
+
emit("update:path", val);
|
|
20060
|
+
}
|
|
20061
|
+
});
|
|
20052
20062
|
const findPath = (tree, targetName, path = []) => {
|
|
20053
20063
|
for (let i = 0; i < tree.length; i++) {
|
|
20054
20064
|
const node = tree[i];
|
|
20055
20065
|
const nodeName = node[treeProps.value.label];
|
|
20056
20066
|
path.push(nodeName);
|
|
20057
|
-
if (nodeName === targetName)
|
|
20058
|
-
return path.join("/");
|
|
20067
|
+
if (nodeName === targetName) return path.join("/");
|
|
20059
20068
|
if (node.children && node.children.length > 0) {
|
|
20060
20069
|
const result = findPath(node[treeProps.value.children], targetName, path);
|
|
20061
|
-
if (result)
|
|
20062
|
-
return result;
|
|
20070
|
+
if (result) return result;
|
|
20063
20071
|
}
|
|
20064
20072
|
path.pop();
|
|
20065
20073
|
}
|
|
@@ -20071,8 +20079,7 @@ const useTreeSelect = (props, emit, nodeKey, attrs, lazy, isCheckStrictly) => {
|
|
|
20071
20079
|
if (lazy.value) {
|
|
20072
20080
|
originData = $tree.value?.lazyData || [];
|
|
20073
20081
|
} else {
|
|
20074
|
-
if (props.data)
|
|
20075
|
-
originData = flatTree(props.data, treeProps.value.children) || [];
|
|
20082
|
+
if (props.data) originData = flatTree(props.data, treeProps.value.children) || [];
|
|
20076
20083
|
}
|
|
20077
20084
|
if (originData.length) {
|
|
20078
20085
|
result = originData.map((item) => ({
|
|
@@ -20084,18 +20091,14 @@ const useTreeSelect = (props, emit, nodeKey, attrs, lazy, isCheckStrictly) => {
|
|
|
20084
20091
|
});
|
|
20085
20092
|
const textShow = ref(false);
|
|
20086
20093
|
const checkselectOptionsData = () => {
|
|
20087
|
-
if (props.parentLinkChildrenStrictly || !lazy.value)
|
|
20088
|
-
|
|
20089
|
-
if (selectOptions.value.length === 0)
|
|
20090
|
-
return false;
|
|
20094
|
+
if (props.parentLinkChildrenStrictly || !lazy.value) return true;
|
|
20095
|
+
if (selectOptions.value.length === 0) return false;
|
|
20091
20096
|
if (!showCheckbox.value) {
|
|
20092
|
-
if (!innerValue.value)
|
|
20093
|
-
return true;
|
|
20097
|
+
if (!innerValue.value) return true;
|
|
20094
20098
|
const currentItem = selectOptions.value.find((item) => item[nodeKey.value] === innerValue.value);
|
|
20095
20099
|
return !!currentItem;
|
|
20096
20100
|
} else {
|
|
20097
|
-
if (!innerValue.value || !innerValue.value?.length)
|
|
20098
|
-
return true;
|
|
20101
|
+
if (!innerValue.value || !innerValue.value?.length) return true;
|
|
20099
20102
|
const optionsIds = selectOptions.value.map((item) => item[nodeKey.value]);
|
|
20100
20103
|
return innerValue.value?.every((item) => optionsIds.includes(item));
|
|
20101
20104
|
}
|
|
@@ -20107,61 +20110,6 @@ const useTreeSelect = (props, emit, nodeKey, attrs, lazy, isCheckStrictly) => {
|
|
|
20107
20110
|
},
|
|
20108
20111
|
{ immediate: true }
|
|
20109
20112
|
);
|
|
20110
|
-
const checkFormInner = ref(false);
|
|
20111
|
-
const preInnerVal = ref([]);
|
|
20112
|
-
watch$1(
|
|
20113
|
-
() => innerValue.value,
|
|
20114
|
-
(val) => {
|
|
20115
|
-
if (checkFormInner.value) {
|
|
20116
|
-
checkFormInner.value = false;
|
|
20117
|
-
return;
|
|
20118
|
-
}
|
|
20119
|
-
if (props.filter)
|
|
20120
|
-
innerKeyword.value = "";
|
|
20121
|
-
if (JSON.stringify(val) === JSON.stringify(preInnerVal.value))
|
|
20122
|
-
return;
|
|
20123
|
-
preInnerVal.value = lodashExports.cloneDeep(val);
|
|
20124
|
-
const newInnerVal = val ?? (!showCheckbox.value ? "" : []);
|
|
20125
|
-
if (!showCheckbox.value) {
|
|
20126
|
-
if (!newInnerVal) {
|
|
20127
|
-
emit("change", "", []);
|
|
20128
|
-
return;
|
|
20129
|
-
}
|
|
20130
|
-
if (lazy.value) {
|
|
20131
|
-
$tree.value?.lazyDataNextTick(newInnerVal).then(() => {
|
|
20132
|
-
const nodes = selectOptions.value.filter((item) => item[nodeKey.value] === newInnerVal);
|
|
20133
|
-
emit("change", newInnerVal, nodes);
|
|
20134
|
-
});
|
|
20135
|
-
} else {
|
|
20136
|
-
const nodes = selectOptions.value.filter((item) => item[nodeKey.value] === newInnerVal);
|
|
20137
|
-
emit("change", newInnerVal, nodes);
|
|
20138
|
-
}
|
|
20139
|
-
} else {
|
|
20140
|
-
if (!newInnerVal || !newInnerVal.length) {
|
|
20141
|
-
emit("change", [], []);
|
|
20142
|
-
return;
|
|
20143
|
-
}
|
|
20144
|
-
if (lazy.value) {
|
|
20145
|
-
$tree.value?.lazyDataNextTick(newInnerVal).then(() => {
|
|
20146
|
-
const nodes = selectOptions.value.filter((item) => newInnerVal.includes(item[nodeKey.value]));
|
|
20147
|
-
emit("change", newInnerVal, nodes);
|
|
20148
|
-
});
|
|
20149
|
-
} else {
|
|
20150
|
-
const nodes = selectOptions.value.filter((item) => newInnerVal.includes(item[nodeKey.value]));
|
|
20151
|
-
emit("change", newInnerVal, nodes);
|
|
20152
|
-
}
|
|
20153
|
-
}
|
|
20154
|
-
},
|
|
20155
|
-
{ deep: true }
|
|
20156
|
-
);
|
|
20157
|
-
const treePath = computed({
|
|
20158
|
-
get: () => {
|
|
20159
|
-
return props.path;
|
|
20160
|
-
},
|
|
20161
|
-
set: (val) => {
|
|
20162
|
-
emit("update:path", val);
|
|
20163
|
-
}
|
|
20164
|
-
});
|
|
20165
20113
|
const poppverContentStyle = computed(() => {
|
|
20166
20114
|
return {
|
|
20167
20115
|
height: props.poppverHeight ? handleUnit(props.poppverHeight) : void 0,
|
|
@@ -20177,60 +20125,70 @@ const useTreeSelect = (props, emit, nodeKey, attrs, lazy, isCheckStrictly) => {
|
|
|
20177
20125
|
emit("visible-change", false);
|
|
20178
20126
|
};
|
|
20179
20127
|
const selectMouseDown = lodashExports.debounce(() => {
|
|
20180
|
-
if (props.disabled || props.isView)
|
|
20181
|
-
|
|
20182
|
-
|
|
20128
|
+
if (props.disabled || props.isView) return;
|
|
20129
|
+
if (!popoverVisible.value) {
|
|
20130
|
+
document.body.click();
|
|
20131
|
+
popoverVisible.value = true;
|
|
20132
|
+
} else {
|
|
20133
|
+
popoverVisible.value = false;
|
|
20134
|
+
}
|
|
20183
20135
|
}, 200);
|
|
20184
|
-
const
|
|
20185
|
-
|
|
20136
|
+
const treeChange = async () => {
|
|
20137
|
+
await nextTick();
|
|
20138
|
+
let options = [];
|
|
20186
20139
|
if (!showCheckbox.value) {
|
|
20187
|
-
innerValue.value
|
|
20188
|
-
|
|
20189
|
-
|
|
20140
|
+
if (innerValue.value || innerValue.value === 0) {
|
|
20141
|
+
if (lazy.value) await $tree.value?.lazyDataNextTick(innerValue.value);
|
|
20142
|
+
options = selectOptions.value.filter((item) => item[nodeKey.value] === innerValue.value);
|
|
20143
|
+
}
|
|
20190
20144
|
}
|
|
20145
|
+
if (showCheckbox.value) {
|
|
20146
|
+
if (innerValue.value || innerValue.value.length) {
|
|
20147
|
+
if (lazy.value) await $tree.value?.lazyDataNextTick(innerValue.value);
|
|
20148
|
+
options = selectOptions.value.filter((item) => innerValue.value.includes(item[nodeKey.value]));
|
|
20149
|
+
}
|
|
20150
|
+
}
|
|
20151
|
+
emit("change", innerValue.value, options);
|
|
20152
|
+
};
|
|
20153
|
+
const isSelectClear = ref(false);
|
|
20154
|
+
const selectClear = async () => {
|
|
20155
|
+
innerValue.value = showCheckbox.value ? [] : "";
|
|
20156
|
+
treeChange();
|
|
20191
20157
|
isSelectClear.value = true;
|
|
20192
20158
|
};
|
|
20193
|
-
const deselect = (val) => {
|
|
20194
|
-
if (isSelectClear.value)
|
|
20195
|
-
|
|
20196
|
-
if (!showCheckbox.value)
|
|
20197
|
-
return;
|
|
20159
|
+
const deselect = async (val) => {
|
|
20160
|
+
if (isSelectClear.value) return;
|
|
20161
|
+
if (!showCheckbox.value) return;
|
|
20198
20162
|
if (!lazy.value && !isCheckStrictly.value) {
|
|
20199
|
-
|
|
20200
|
-
|
|
20201
|
-
|
|
20202
|
-
|
|
20203
|
-
$tree.value?.childLinkParent(node);
|
|
20204
|
-
$tree.value?.parentLinkChild(node);
|
|
20205
|
-
});
|
|
20163
|
+
let node = $tree.value?.treeRef?.getNode(val);
|
|
20164
|
+
node.checked = false;
|
|
20165
|
+
$tree.value?.childLinkParent(node, node.checked);
|
|
20166
|
+
$tree.value?.parentLinkChild(node, node.checked);
|
|
20206
20167
|
}
|
|
20207
20168
|
if (lazy.value && props.parentLinkChildrenStrictly) {
|
|
20208
20169
|
let data = selectOptions.value.find((item) => item[nodeKey.value] === val);
|
|
20209
20170
|
if (data && $tree.value?.getGrandChildrenFn) {
|
|
20210
|
-
$tree.value.getGrandChildrenFn(data)
|
|
20211
|
-
|
|
20212
|
-
|
|
20213
|
-
|
|
20214
|
-
|
|
20215
|
-
}
|
|
20171
|
+
const result = await $tree.value.getGrandChildrenFn(data);
|
|
20172
|
+
if (result && result.length) {
|
|
20173
|
+
const resultIds = result.map((item) => item[nodeKey.value]);
|
|
20174
|
+
if (innerValue.value && innerValue.value?.length) {
|
|
20175
|
+
innerValue.value = innerValue.value.filter((id) => !resultIds.includes(id));
|
|
20216
20176
|
}
|
|
20217
|
-
}
|
|
20177
|
+
}
|
|
20218
20178
|
}
|
|
20219
20179
|
}
|
|
20180
|
+
treeChange();
|
|
20220
20181
|
};
|
|
20221
20182
|
const selectSearch = (val) => {
|
|
20222
|
-
if (!props.filter)
|
|
20223
|
-
return;
|
|
20183
|
+
if (!props.filter) return;
|
|
20224
20184
|
const realVal = val ? val?.trim() : val;
|
|
20225
20185
|
innerKeyword.value = realVal;
|
|
20226
|
-
if (!popoverVisible.value)
|
|
20227
|
-
popoverVisible.value = true;
|
|
20186
|
+
if (!popoverVisible.value) popoverVisible.value = true;
|
|
20228
20187
|
};
|
|
20229
20188
|
const nodeChange = () => {
|
|
20230
20189
|
if (!showCheckbox.value) {
|
|
20231
20190
|
popoverVisible.value = false;
|
|
20232
|
-
if (props.filter)
|
|
20233
|
-
$select.value?.$select?.focus();
|
|
20191
|
+
if (props.filter) $select.value?.$select?.focus();
|
|
20234
20192
|
}
|
|
20235
20193
|
};
|
|
20236
20194
|
const getDasTreeSelectWidth = () => {
|
|
@@ -20246,12 +20204,8 @@ const useTreeSelect = (props, emit, nodeKey, attrs, lazy, isCheckStrictly) => {
|
|
|
20246
20204
|
realPoppverWidth.value = props.poppverWidth ? handleUnit(props.poppverWidth) : getDasTreeSelectWidth();
|
|
20247
20205
|
});
|
|
20248
20206
|
};
|
|
20249
|
-
const resetDefaultVal = (val) => {
|
|
20250
|
-
preInnerVal.value = val;
|
|
20251
|
-
};
|
|
20252
20207
|
const focus = (value) => {
|
|
20253
|
-
if (isSelectClear.value)
|
|
20254
|
-
isSelectClear.value = false;
|
|
20208
|
+
if (isSelectClear.value) isSelectClear.value = false;
|
|
20255
20209
|
$select.value?.toChangeMaxCount(true);
|
|
20256
20210
|
emit("focus", value);
|
|
20257
20211
|
};
|
|
@@ -20274,15 +20228,16 @@ const useTreeSelect = (props, emit, nodeKey, attrs, lazy, isCheckStrictly) => {
|
|
|
20274
20228
|
return new Promise((res) => {
|
|
20275
20229
|
const check = () => {
|
|
20276
20230
|
const selectDom = dasTreeSelectRef.value?.querySelector(".ant-select-selector");
|
|
20277
|
-
if (selectDom)
|
|
20278
|
-
return res(selectDom);
|
|
20231
|
+
if (selectDom) return res(selectDom);
|
|
20279
20232
|
setTimeout(() => check(), 50);
|
|
20280
20233
|
};
|
|
20281
20234
|
check();
|
|
20282
20235
|
});
|
|
20283
20236
|
};
|
|
20237
|
+
const resetDefaultVal = (val) => {
|
|
20238
|
+
innerValue.value = val;
|
|
20239
|
+
};
|
|
20284
20240
|
onMounted(async () => {
|
|
20285
|
-
resetDefaultVal(lodashExports.cloneDeep(innerValue.value));
|
|
20286
20241
|
setRealWidth();
|
|
20287
20242
|
const selectDom = await domLoadNextTick();
|
|
20288
20243
|
if (selectDom) {
|
|
@@ -20312,6 +20267,7 @@ const useTreeSelect = (props, emit, nodeKey, attrs, lazy, isCheckStrictly) => {
|
|
|
20312
20267
|
selectOptions,
|
|
20313
20268
|
poppverShow,
|
|
20314
20269
|
poppverHide,
|
|
20270
|
+
treeChange,
|
|
20315
20271
|
nodeChange,
|
|
20316
20272
|
deselect,
|
|
20317
20273
|
selectSearch,
|
|
@@ -20349,7 +20305,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20349
20305
|
selectAttrs: { type: Object, required: false },
|
|
20350
20306
|
width: { type: [Number, String], required: false },
|
|
20351
20307
|
poppverWidth: { type: [Number, String], required: false },
|
|
20352
|
-
poppverHeight: { type: [Number, String], required: false, default:
|
|
20308
|
+
poppverHeight: { type: [Number, String], required: false, default: 320 },
|
|
20353
20309
|
poppverMaxHeight: { type: [Number, String], required: false },
|
|
20354
20310
|
filter: { type: Boolean, required: false, default: true },
|
|
20355
20311
|
keyword: { type: String, required: false, default: "" },
|
|
@@ -20359,7 +20315,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20359
20315
|
load: { type: Function, required: false },
|
|
20360
20316
|
search: { type: Function, required: false },
|
|
20361
20317
|
parentLinkChildrenStrictly: { type: Boolean, required: false },
|
|
20362
|
-
getGrandChildren: { type: Function, required: false }
|
|
20318
|
+
getGrandChildren: { type: Function, required: false },
|
|
20319
|
+
childLinkParentStrictly: { type: Boolean, required: false }
|
|
20363
20320
|
},
|
|
20364
20321
|
emits: ["update:modelValue", "update:path", "update:keyword", "change", "focus", "blur", "visible-change"],
|
|
20365
20322
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -20378,18 +20335,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20378
20335
|
return props.selectAttrs ? props.selectAttrs : {};
|
|
20379
20336
|
});
|
|
20380
20337
|
const popoverDisabled = computed(() => {
|
|
20381
|
-
if (props.disabled || props.isView)
|
|
20382
|
-
return true;
|
|
20338
|
+
if (props.disabled || props.isView) return true;
|
|
20383
20339
|
return false;
|
|
20384
20340
|
});
|
|
20385
20341
|
const isCheckStrictly = computed(() => {
|
|
20386
|
-
if (props.parentLinkChildrenStrictly)
|
|
20387
|
-
return true;
|
|
20342
|
+
if (props.parentLinkChildrenStrictly || props.childLinkParentStrictly) return true;
|
|
20388
20343
|
return props.checkStrictly ?? lazy.value ? true : false;
|
|
20389
20344
|
});
|
|
20390
20345
|
const onInputKeyDown = (e) => {
|
|
20391
|
-
if (e.key === "Enter")
|
|
20392
|
-
e.stopPropagation();
|
|
20346
|
+
if (e.key === "Enter") e.stopPropagation();
|
|
20393
20347
|
};
|
|
20394
20348
|
const {
|
|
20395
20349
|
dasTreeSelectRef,
|
|
@@ -20400,6 +20354,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20400
20354
|
realWidth,
|
|
20401
20355
|
poppverContentStyle,
|
|
20402
20356
|
realPoppverWidth,
|
|
20357
|
+
treeChange,
|
|
20403
20358
|
nodeChange,
|
|
20404
20359
|
treePath,
|
|
20405
20360
|
treeProps,
|
|
@@ -20427,178 +20382,19 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
20427
20382
|
$tree,
|
|
20428
20383
|
resetDefaultVal
|
|
20429
20384
|
});
|
|
20430
|
-
|
|
20431
|
-
return
|
|
20432
|
-
|
|
20433
|
-
|
|
20434
|
-
|
|
20435
|
-
|
|
20436
|
-
|
|
20437
|
-
|
|
20438
|
-
|
|
20439
|
-
|
|
20440
|
-
|
|
20441
|
-
|
|
20442
|
-
|
|
20443
|
-
ref: popoverRef,
|
|
20444
|
-
visible: unref$1(popoverVisible),
|
|
20445
|
-
"popper-class": "das-tree-select-popper",
|
|
20446
|
-
placement: "bottom-start",
|
|
20447
|
-
"show-arrow": false,
|
|
20448
|
-
width: unref$1(realPoppverWidth),
|
|
20449
|
-
disabled: popoverDisabled.value,
|
|
20450
|
-
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
20451
|
-
onShow: unref$1(poppverShow),
|
|
20452
|
-
onHide: unref$1(poppverHide)
|
|
20453
|
-
}, {
|
|
20454
|
-
reference: withCtx(() => [
|
|
20455
|
-
createElementVNode(
|
|
20456
|
-
"div",
|
|
20457
|
-
{
|
|
20458
|
-
class: "das-tree-select__select-content",
|
|
20459
|
-
onMousedown: _cache[1] || (_cache[1] = withModifiers(
|
|
20460
|
-
//@ts-ignore
|
|
20461
|
-
(...args) => unref$1(selectMouseDown) && unref$1(selectMouseDown)(...args),
|
|
20462
|
-
["stop"]
|
|
20463
|
-
))
|
|
20464
|
-
},
|
|
20465
|
-
[
|
|
20466
|
-
createVNode(unref$1(DasSelect), mergeProps({
|
|
20467
|
-
ref_key: "$select",
|
|
20468
|
-
ref: $select,
|
|
20469
|
-
class: { "is-active": unref$1(popoverVisible) },
|
|
20470
|
-
dropdownClassName: "das-tree-select-dropdown",
|
|
20471
|
-
modelValue: unref$1(innerValue),
|
|
20472
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(innerValue) ? innerValue.value = $event : null)
|
|
20473
|
-
}, $selectAttrs.value, {
|
|
20474
|
-
searchValue: unref$1(innerKeyword),
|
|
20475
|
-
options: unref$1(selectOptions),
|
|
20476
|
-
disabled: _ctx.disabled,
|
|
20477
|
-
isView: _ctx.isView,
|
|
20478
|
-
size: _ctx.size,
|
|
20479
|
-
mode: _ctx.mode,
|
|
20480
|
-
borderType: _ctx.borderType,
|
|
20481
|
-
placeholder: _ctx.placeholder,
|
|
20482
|
-
"show-search": _ctx.filter,
|
|
20483
|
-
filterOption: _ctx.filter,
|
|
20484
|
-
width: unref$1(realWidth),
|
|
20485
|
-
fieldNames: {
|
|
20486
|
-
value: nodeKey.value,
|
|
20487
|
-
label: !!_ctx.showFullPath ? unref$1(treeProps).pathName : unref$1(treeProps).label
|
|
20488
|
-
},
|
|
20489
|
-
isTooltip: isTooltip.value,
|
|
20490
|
-
errorMode: _ctx.errorMode,
|
|
20491
|
-
error: _ctx.error,
|
|
20492
|
-
errorLabel: _ctx.errorLabel,
|
|
20493
|
-
autoClearSearchValue: false,
|
|
20494
|
-
isExterControlCount: "",
|
|
20495
|
-
onDeselect: unref$1(deselect),
|
|
20496
|
-
onSearch: unref$1(selectSearch),
|
|
20497
|
-
onInputKeyDown,
|
|
20498
|
-
onFocus: unref$1(focus),
|
|
20499
|
-
onBlur: unref$1(blur),
|
|
20500
|
-
onClear: unref$1(selectClear)
|
|
20501
|
-
}), {
|
|
20502
|
-
suffixIcon: withCtx(() => [
|
|
20503
|
-
createVNode(unref$1(DasIcon), {
|
|
20504
|
-
icon: "xiala",
|
|
20505
|
-
size: "medium",
|
|
20506
|
-
style: { "transition": "transform 0.5s" },
|
|
20507
|
-
iconColor: unref$1(popoverVisible) ? "#5582F3" : "currentColor"
|
|
20508
|
-
}, null, 8, ["iconColor"])
|
|
20509
|
-
]),
|
|
20510
|
-
_: 1
|
|
20511
|
-
/* STABLE */
|
|
20512
|
-
}, 16, ["class", "modelValue", "searchValue", "options", "disabled", "isView", "size", "mode", "borderType", "placeholder", "show-search", "filterOption", "width", "fieldNames", "isTooltip", "errorMode", "error", "errorLabel", "onDeselect", "onSearch", "onFocus", "onBlur", "onClear"])
|
|
20513
|
-
],
|
|
20514
|
-
32
|
|
20515
|
-
/* NEED_HYDRATION */
|
|
20516
|
-
)
|
|
20517
|
-
]),
|
|
20518
|
-
default: withCtx(() => [
|
|
20519
|
-
createElementVNode(
|
|
20520
|
-
"div",
|
|
20521
|
-
{
|
|
20522
|
-
class: "das-tree-select__tree-content",
|
|
20523
|
-
style: normalizeStyle(unref$1(poppverContentStyle)),
|
|
20524
|
-
onClick: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
20525
|
-
}, ["stop"]))
|
|
20526
|
-
},
|
|
20527
|
-
[
|
|
20528
|
-
createVNode(unref$1(DasTree), mergeProps({
|
|
20529
|
-
ref_key: "$tree",
|
|
20530
|
-
ref: $tree
|
|
20531
|
-
}, unref$1(attrs), {
|
|
20532
|
-
data: _ctx.data,
|
|
20533
|
-
modelValue: unref$1(innerValue),
|
|
20534
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(innerValue) ? innerValue.value = $event : null),
|
|
20535
|
-
"filter-value": unref$1(innerKeyword),
|
|
20536
|
-
"onUpdate:filterValue": _cache[3] || (_cache[3] = ($event) => isRef(innerKeyword) ? innerKeyword.value = $event : null),
|
|
20537
|
-
"show-checkbox": unref$1(showCheckbox),
|
|
20538
|
-
"is-filter": _ctx.filter,
|
|
20539
|
-
"show-filter-input": false,
|
|
20540
|
-
"filter-mode": "input",
|
|
20541
|
-
lazy: lazy.value,
|
|
20542
|
-
load: loadFn.value,
|
|
20543
|
-
search: searchFn.value,
|
|
20544
|
-
path: unref$1(treePath),
|
|
20545
|
-
"default-expand-all": treeExpandAll.value,
|
|
20546
|
-
"check-strictly": isCheckStrictly.value,
|
|
20547
|
-
parentLinkChildrenStrictly: _ctx.parentLinkChildrenStrictly,
|
|
20548
|
-
getGrandChildren: getGrandChildrenFn.value,
|
|
20549
|
-
onNodeChange: unref$1(nodeChange)
|
|
20550
|
-
}), createSlots({
|
|
20551
|
-
_: 2
|
|
20552
|
-
/* DYNAMIC */
|
|
20553
|
-
}, [
|
|
20554
|
-
_ctx.$slots.prefix ? {
|
|
20555
|
-
name: "prefix",
|
|
20556
|
-
fn: withCtx(() => [
|
|
20557
|
-
renderSlot(_ctx.$slots, "prefix")
|
|
20558
|
-
]),
|
|
20559
|
-
key: "0"
|
|
20560
|
-
} : void 0,
|
|
20561
|
-
_ctx.$slots.suffix ? {
|
|
20562
|
-
name: "suffix",
|
|
20563
|
-
fn: withCtx(() => [
|
|
20564
|
-
renderSlot(_ctx.$slots, "suffix")
|
|
20565
|
-
]),
|
|
20566
|
-
key: "1"
|
|
20567
|
-
} : void 0,
|
|
20568
|
-
_ctx.$slots.prepend ? {
|
|
20569
|
-
name: "prepend",
|
|
20570
|
-
fn: withCtx(() => [
|
|
20571
|
-
renderSlot(_ctx.$slots, "prepend")
|
|
20572
|
-
]),
|
|
20573
|
-
key: "2"
|
|
20574
|
-
} : void 0,
|
|
20575
|
-
_ctx.$slots.append ? {
|
|
20576
|
-
name: "append",
|
|
20577
|
-
fn: withCtx(() => [
|
|
20578
|
-
renderSlot(_ctx.$slots, "append")
|
|
20579
|
-
]),
|
|
20580
|
-
key: "3"
|
|
20581
|
-
} : void 0
|
|
20582
|
-
]), 1040, ["data", "modelValue", "filter-value", "show-checkbox", "is-filter", "lazy", "load", "search", "path", "default-expand-all", "check-strictly", "parentLinkChildrenStrictly", "getGrandChildren", "onNodeChange"])
|
|
20583
|
-
],
|
|
20584
|
-
4
|
|
20585
|
-
/* STYLE */
|
|
20586
|
-
)
|
|
20587
|
-
]),
|
|
20588
|
-
_: 3
|
|
20589
|
-
/* FORWARDED */
|
|
20590
|
-
}, 8, ["visible", "width", "disabled", "onShow", "onHide"])
|
|
20591
|
-
],
|
|
20592
|
-
6
|
|
20593
|
-
/* CLASS, STYLE */
|
|
20594
|
-
)), [
|
|
20595
|
-
[unref$1(vClickOutside), {
|
|
20596
|
-
fn: () => {
|
|
20597
|
-
popoverVisible.value = false;
|
|
20598
|
-
}
|
|
20599
|
-
}]
|
|
20600
|
-
]);
|
|
20601
|
-
};
|
|
20385
|
+
const __returned__ = { props, emit, attrs, nodeKey, loadFn, searchFn, getGrandChildrenFn, lazy, treeExpandAll, $selectAttrs, popoverDisabled, isCheckStrictly, onInputKeyDown, dasTreeSelectRef, $tree, $select, innerValue, innerKeyword, realWidth, poppverContentStyle, realPoppverWidth, treeChange, nodeChange, treePath, treeProps, selectOptions, popoverRef, deselect, poppverShow, poppverHide, selectSearch, selectMouseDown, popoverVisible, resetDefaultVal, selectClear, focus, blur, textShow, checkselectOptionsData, showCheckbox, isTooltip, get ElPopover() {
|
|
20386
|
+
return ElPopover;
|
|
20387
|
+
}, get DasSelect() {
|
|
20388
|
+
return DasSelect;
|
|
20389
|
+
}, get DasTree() {
|
|
20390
|
+
return DasTree;
|
|
20391
|
+
}, get DasIcon() {
|
|
20392
|
+
return DasIcon;
|
|
20393
|
+
}, get vClickOutside() {
|
|
20394
|
+
return vClickOutside;
|
|
20395
|
+
} };
|
|
20396
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
20397
|
+
return __returned__;
|
|
20602
20398
|
}
|
|
20603
20399
|
});
|
|
20604
20400
|
|
|
@@ -20610,7 +20406,179 @@ var _export_sfc = (sfc, props) => {
|
|
|
20610
20406
|
return target;
|
|
20611
20407
|
};
|
|
20612
20408
|
|
|
20613
|
-
|
|
20409
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
20410
|
+
return withDirectives((openBlock(), createElementBlock(
|
|
20411
|
+
"div",
|
|
20412
|
+
{
|
|
20413
|
+
ref: "dasTreeSelectRef",
|
|
20414
|
+
class: normalizeClass({ "das-ui-tree-select": true, "is-lazy": $setup.lazy, "text-hide": !$setup.textShow }),
|
|
20415
|
+
style: normalizeStyle({ width: $setup.realWidth })
|
|
20416
|
+
},
|
|
20417
|
+
[
|
|
20418
|
+
createCommentVNode(` \u5728\u4F7F\u7528 2.x \u7248\u672C\u7684element-UI\u65F6\uFF0C\u91CC\u9762\u7684 Popover \u6C14\u6CE1\u5361\u7247 \u7EC4\u4EF6\uFF0C\u6709\u81EA\u5E26\u7684 \u81EA\u52A8\u9002\u5E94\u4F4D\u7F6E \u7684\u529F\u80FD\uFF1B\u5728 element plus \u4E2D\uFF0C\u76F4\u63A5\u4F7F\u7528\uFF0C\u5DF2\u7ECF\u65E0\u6CD5\u81EA\u9002\u5E94\u6C14\u6CE1\u5F39\u7A97\u7684\u4F4D\u7F6E\u4E86\uFF1B\u9700\u8981\u81EA\u884C\u914D\u7F6E:fallback-placements="['bottom', 'top', 'right', 'left']" `),
|
|
20419
|
+
createVNode($setup["ElPopover"], {
|
|
20420
|
+
ref: "popoverRef",
|
|
20421
|
+
visible: $setup.popoverVisible,
|
|
20422
|
+
"popper-class": "das-tree-select-popper",
|
|
20423
|
+
placement: "bottom-start",
|
|
20424
|
+
"show-arrow": false,
|
|
20425
|
+
width: $setup.realPoppverWidth,
|
|
20426
|
+
disabled: $setup.popoverDisabled,
|
|
20427
|
+
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
20428
|
+
onShow: $setup.poppverShow,
|
|
20429
|
+
onHide: $setup.poppverHide
|
|
20430
|
+
}, {
|
|
20431
|
+
reference: withCtx(() => [
|
|
20432
|
+
createElementVNode(
|
|
20433
|
+
"div",
|
|
20434
|
+
{
|
|
20435
|
+
class: "das-tree-select__select-content",
|
|
20436
|
+
onMousedown: _cache[1] || (_cache[1] = withModifiers((...args) => $setup.selectMouseDown && $setup.selectMouseDown(...args), ["stop"]))
|
|
20437
|
+
},
|
|
20438
|
+
[
|
|
20439
|
+
createVNode($setup["DasSelect"], mergeProps({
|
|
20440
|
+
ref: "$select",
|
|
20441
|
+
class: { "is-active": $setup.popoverVisible },
|
|
20442
|
+
dropdownClassName: "das-tree-select-dropdown",
|
|
20443
|
+
modelValue: $setup.innerValue,
|
|
20444
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.innerValue = $event)
|
|
20445
|
+
}, $setup.$selectAttrs, {
|
|
20446
|
+
searchValue: $setup.innerKeyword,
|
|
20447
|
+
options: $setup.selectOptions,
|
|
20448
|
+
disabled: $props.disabled,
|
|
20449
|
+
isView: $props.isView,
|
|
20450
|
+
size: $props.size,
|
|
20451
|
+
mode: $props.mode,
|
|
20452
|
+
borderType: $props.borderType,
|
|
20453
|
+
placeholder: $props.placeholder,
|
|
20454
|
+
"show-search": $props.filter,
|
|
20455
|
+
filterOption: $props.filter,
|
|
20456
|
+
width: $setup.realWidth,
|
|
20457
|
+
fieldNames: {
|
|
20458
|
+
value: $setup.nodeKey,
|
|
20459
|
+
label: !!$props.showFullPath ? $setup.treeProps.pathName : $setup.treeProps.label
|
|
20460
|
+
},
|
|
20461
|
+
isTooltip: $setup.isTooltip,
|
|
20462
|
+
errorMode: $props.errorMode,
|
|
20463
|
+
error: $props.error,
|
|
20464
|
+
errorLabel: $props.errorLabel,
|
|
20465
|
+
autoClearSearchValue: false,
|
|
20466
|
+
isExterControlCount: "",
|
|
20467
|
+
onDeselect: $setup.deselect,
|
|
20468
|
+
onSearch: $setup.selectSearch,
|
|
20469
|
+
onInputKeyDown: $setup.onInputKeyDown,
|
|
20470
|
+
onFocus: $setup.focus,
|
|
20471
|
+
onBlur: $setup.blur,
|
|
20472
|
+
onClear: $setup.selectClear
|
|
20473
|
+
}), {
|
|
20474
|
+
suffixIcon: withCtx(() => [
|
|
20475
|
+
createVNode($setup["DasIcon"], {
|
|
20476
|
+
icon: "xiala",
|
|
20477
|
+
size: "medium",
|
|
20478
|
+
style: { "transition": "transform 0.5s" },
|
|
20479
|
+
iconColor: $setup.popoverVisible ? "#5582F3" : "currentColor"
|
|
20480
|
+
}, null, 8, ["iconColor"])
|
|
20481
|
+
]),
|
|
20482
|
+
_: 1
|
|
20483
|
+
/* STABLE */
|
|
20484
|
+
}, 16, ["class", "modelValue", "searchValue", "options", "disabled", "isView", "size", "mode", "borderType", "placeholder", "show-search", "filterOption", "width", "fieldNames", "isTooltip", "errorMode", "error", "errorLabel", "onDeselect", "onSearch", "onFocus", "onBlur", "onClear"])
|
|
20485
|
+
],
|
|
20486
|
+
32
|
|
20487
|
+
/* NEED_HYDRATION */
|
|
20488
|
+
)
|
|
20489
|
+
]),
|
|
20490
|
+
default: withCtx(() => [
|
|
20491
|
+
createElementVNode(
|
|
20492
|
+
"div",
|
|
20493
|
+
{
|
|
20494
|
+
class: "das-tree-select__tree-content",
|
|
20495
|
+
style: normalizeStyle($setup.poppverContentStyle),
|
|
20496
|
+
onClick: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
20497
|
+
}, ["stop"])),
|
|
20498
|
+
onMousedown: _cache[5] || (_cache[5] = withModifiers(() => {
|
|
20499
|
+
}, ["stop"]))
|
|
20500
|
+
},
|
|
20501
|
+
[
|
|
20502
|
+
createVNode($setup["DasTree"], mergeProps({ ref: "$tree" }, $setup.attrs, {
|
|
20503
|
+
data: $props.data,
|
|
20504
|
+
modelValue: $setup.innerValue,
|
|
20505
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $setup.innerValue = $event),
|
|
20506
|
+
"filter-value": $setup.innerKeyword,
|
|
20507
|
+
"onUpdate:filterValue": _cache[3] || (_cache[3] = ($event) => $setup.innerKeyword = $event),
|
|
20508
|
+
"show-checkbox": $setup.showCheckbox,
|
|
20509
|
+
"is-filter": $props.filter,
|
|
20510
|
+
"show-filter-input": false,
|
|
20511
|
+
"filter-mode": "input",
|
|
20512
|
+
lazy: $setup.lazy,
|
|
20513
|
+
load: $setup.loadFn,
|
|
20514
|
+
search: $setup.searchFn,
|
|
20515
|
+
path: $setup.treePath,
|
|
20516
|
+
"default-expand-all": $setup.treeExpandAll,
|
|
20517
|
+
"check-strictly": $setup.lazy ? true : $setup.isCheckStrictly,
|
|
20518
|
+
parentLinkChildrenStrictly: $props.parentLinkChildrenStrictly,
|
|
20519
|
+
getGrandChildren: $setup.getGrandChildrenFn,
|
|
20520
|
+
childLinkParentStrictly: $props.childLinkParentStrictly,
|
|
20521
|
+
onChange: $setup.treeChange,
|
|
20522
|
+
onNodeChange: $setup.nodeChange
|
|
20523
|
+
}), createSlots({
|
|
20524
|
+
default: withCtx(({ node, data }) => [
|
|
20525
|
+
renderSlot(_ctx.$slots, "default", {
|
|
20526
|
+
node,
|
|
20527
|
+
data
|
|
20528
|
+
})
|
|
20529
|
+
]),
|
|
20530
|
+
_: 2
|
|
20531
|
+
/* DYNAMIC */
|
|
20532
|
+
}, [
|
|
20533
|
+
_ctx.$slots.prefix ? {
|
|
20534
|
+
name: "prefix",
|
|
20535
|
+
fn: withCtx(() => [
|
|
20536
|
+
renderSlot(_ctx.$slots, "prefix")
|
|
20537
|
+
]),
|
|
20538
|
+
key: "0"
|
|
20539
|
+
} : void 0,
|
|
20540
|
+
_ctx.$slots.suffix ? {
|
|
20541
|
+
name: "suffix",
|
|
20542
|
+
fn: withCtx(() => [
|
|
20543
|
+
renderSlot(_ctx.$slots, "suffix")
|
|
20544
|
+
]),
|
|
20545
|
+
key: "1"
|
|
20546
|
+
} : void 0,
|
|
20547
|
+
_ctx.$slots.prepend ? {
|
|
20548
|
+
name: "prepend",
|
|
20549
|
+
fn: withCtx(() => [
|
|
20550
|
+
renderSlot(_ctx.$slots, "prepend")
|
|
20551
|
+
]),
|
|
20552
|
+
key: "2"
|
|
20553
|
+
} : void 0,
|
|
20554
|
+
_ctx.$slots.append ? {
|
|
20555
|
+
name: "append",
|
|
20556
|
+
fn: withCtx(() => [
|
|
20557
|
+
renderSlot(_ctx.$slots, "append")
|
|
20558
|
+
]),
|
|
20559
|
+
key: "3"
|
|
20560
|
+
} : void 0
|
|
20561
|
+
]), 1040, ["data", "modelValue", "filter-value", "show-checkbox", "is-filter", "lazy", "load", "search", "path", "default-expand-all", "check-strictly", "parentLinkChildrenStrictly", "getGrandChildren", "childLinkParentStrictly", "onChange", "onNodeChange"])
|
|
20562
|
+
],
|
|
20563
|
+
36
|
|
20564
|
+
/* STYLE, NEED_HYDRATION */
|
|
20565
|
+
)
|
|
20566
|
+
]),
|
|
20567
|
+
_: 3
|
|
20568
|
+
/* FORWARDED */
|
|
20569
|
+
}, 8, ["visible", "width", "disabled", "onShow", "onHide"])
|
|
20570
|
+
],
|
|
20571
|
+
6
|
|
20572
|
+
/* CLASS, STYLE */
|
|
20573
|
+
)), [
|
|
20574
|
+
[$setup["vClickOutside"], {
|
|
20575
|
+
fn: () => {
|
|
20576
|
+
$setup.popoverVisible = false;
|
|
20577
|
+
}
|
|
20578
|
+
}]
|
|
20579
|
+
]);
|
|
20580
|
+
}
|
|
20581
|
+
var TreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/xiecp/das/das-fe/framework/packages/das-ui/packages/components/tree-select/src/App.vue"]]);
|
|
20614
20582
|
|
|
20615
20583
|
var theme = {
|
|
20616
20584
|
"--das-ui-tree-select-keyword-input-active": "#5582F3",
|