@sdata/web-vue 3.12.0 → 3.14.0
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/sd.css +288 -126
- package/dist/sd.min.css +43 -1
- package/es/_components/input-label/input-label.d.ts +2 -0
- package/es/_components/input-label/input-label.js +4 -2
- package/es/_components/input-label/style/index.css +2 -2
- package/es/_components/picker/input-range.vue.d.ts +6 -7
- package/es/_components/picker/input-range.vue_vue_type_script_setup_true_lang.js +63 -46
- package/es/_components/picker/input.vue.d.ts +5 -6
- package/es/_components/picker/input.vue_vue_type_script_setup_true_lang.js +52 -35
- package/es/_components/picker/style/index.scss +8 -2
- package/es/_components/resize-observer.js +1 -1
- package/es/_components/resize-trigger.vue_vue_type_script_setup_true_lang.js +9 -2
- package/es/_components/select-view/select-view.d.ts +2 -0
- package/es/_components/select-view/select-view.js +5 -1
- package/es/_components/select-view/style/index.css +5 -5
- package/es/_hooks/use-focus-trap.d.ts +10 -0
- package/es/_hooks/use-focus-trap.js +115 -0
- package/es/_hooks/use-readonly-tip.d.ts +11 -0
- package/es/_hooks/use-readonly-tip.js +66 -0
- package/es/_utils/dom.js +1 -10
- package/es/_utils/keyboard.d.ts +4 -0
- package/es/_utils/keyboard.js +21 -2
- package/es/alert/alert.vue.d.ts +2 -2
- package/es/alert/alert.vue_vue_type_script_setup_true_lang.js +12 -3
- package/es/alert/index.d.ts +5 -5
- package/es/alert/style/index.css +1 -1
- package/es/alert/style/index.scss +1 -1
- package/es/anchor/anchor-link.vue_vue_type_script_setup_true_lang.js +3 -1
- package/es/anchor/anchor.vue_vue_type_script_setup_true_lang.js +2 -0
- package/es/anchor/style/index.css +1 -1
- package/es/anchor/style/index.scss +3 -1
- package/es/auto-complete/auto-complete.d.ts +9 -0
- package/es/auto-complete/auto-complete.js +19 -1
- package/es/auto-complete/index.d.ts +15 -0
- package/es/avatar/avatar.vue_vue_type_script_setup_true_lang.js +8 -2
- package/es/avatar/style/index.css +2 -2
- package/es/avatar/style/index.scss +2 -2
- package/es/back-top/back-top.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/back-top/style/index.css +1 -1
- package/es/back-top/style/index.scss +2 -1
- package/es/badge/badge.js +4 -1
- package/es/badge/style/index.css +3 -3
- package/es/badge/style/index.scss +3 -3
- package/es/breadcrumb/breadcrumb.js +1 -0
- package/es/button/button.vue.d.ts +16 -7
- package/es/button/button.vue_vue_type_script_setup_true_lang.js +62 -31
- package/es/button/index.d.ts +11 -0
- package/es/button/interface.d.ts +2 -0
- package/es/button/style/index.css +15 -6
- package/es/button/style/index.scss +25 -7
- package/es/calendar/style/event.scss +2 -2
- package/es/calendar/style/index.css +2 -2
- package/es/card/card.d.ts +312 -0
- package/es/card/card.js +39 -7
- package/es/card/index.d.ts +616 -0
- package/es/card/style/index.css +26 -3
- package/es/card/style/index.scss +34 -3
- package/es/carousel/carousel-arrow.vue.d.ts +4 -4
- package/es/carousel/carousel-arrow.vue_vue_type_script_setup_true_lang.js +20 -4
- package/es/carousel/carousel-indicator.vue_vue_type_script_setup_true_lang.js +23 -4
- package/es/carousel/carousel-item.vue_vue_type_script_setup_true_lang.js +8 -1
- package/es/carousel/carousel.js +18 -1
- package/es/carousel/style/index.css +1 -1
- package/es/carousel/style/index.scss +1 -1
- package/es/cascader/cascader.vue.d.ts +9 -8
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +158 -128
- package/es/cascader/style/index.css +2 -2
- package/es/cascader/style/index.scss +3 -1
- package/es/cascader/types.d.ts +1 -0
- package/es/checkbox/checkbox-group.js +4 -1
- package/es/checkbox/checkbox.d.ts +9 -0
- package/es/checkbox/checkbox.js +14 -0
- package/es/checkbox/index.d.ts +15 -0
- package/es/checkbox/style/index.css +1 -1
- package/es/checkbox/style/index.scss +1 -1
- package/es/collapse/collapse-item.js +21 -3
- package/es/collapse/context.d.ts +1 -1
- package/es/color-picker/color-picker.d.ts +9 -0
- package/es/color-picker/color-picker.js +39 -11
- package/es/color-picker/index.d.ts +15 -0
- package/es/config-provider/context.d.ts +9 -9
- package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +11 -3
- package/es/date-picker/index.d.ts +3 -6
- package/es/date-picker/panels/body.vue_vue_type_script_setup_true_lang.js +14 -1
- package/es/date-picker/picker.vue.d.ts +2 -3
- package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +6 -5
- package/es/date-picker/range-picker.vue.d.ts +2 -3
- package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +4 -4
- package/es/date-picker/style/index.css +5 -5
- package/es/date-picker/style/index.scss +4 -3
- package/es/drawer/drawer.vue.d.ts +1 -1
- package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +30 -9
- package/es/drawer/index.d.ts +3 -3
- package/es/dropdown/dropdown-option.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/dropdown/dropdown-panel.vue.d.ts +9 -0
- package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +75 -2
- package/es/dropdown/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +5 -2
- package/es/dropdown/dropdown.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/dropdown/style/index.css +1 -1
- package/es/dropdown/style/index.scss +3 -1
- package/es/empty/empty.js +1 -1
- package/es/file-previewer/file-previewer.vue.d.ts +1 -1
- package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +7 -3
- package/es/file-previewer/index.d.ts +3 -3
- package/es/form/context.d.ts +1 -0
- package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +6 -2
- package/es/form/style/index.css +2 -2
- package/es/form/style/index.scss +2 -2
- package/es/image/image.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview-action.d.ts +7 -127
- package/es/image/preview.vue.d.ts +1 -1
- package/es/image/preview.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/index.css +288 -126
- package/es/index.js +3 -3
- package/es/input/index.d.ts +6 -6
- package/es/input/input.d.ts +3 -3
- package/es/input/input.js +34 -8
- package/es/input/style/index.css +2 -2
- package/es/input/style/input.scss +4 -4
- package/es/input-number/index.d.ts +9 -9
- package/es/input-number/input-number.d.ts +5 -5
- package/es/input-number/input-number.js +13 -9
- package/es/input-number/style/index.css +3 -3
- package/es/input-number/style/index.scss +5 -1
- package/es/input-tag/index.d.ts +9 -6
- package/es/input-tag/input-tag.d.ts +5 -3
- package/es/input-tag/input-tag.js +49 -36
- package/es/input-tag/style/index.css +8 -8
- package/es/input-tag/style/index.scss +11 -5
- package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +31 -6
- package/es/layout/style/index.css +2 -2
- package/es/layout/style/index.scss +4 -2
- package/es/link/style/index.css +1 -1
- package/es/link/style/index.scss +3 -1
- package/es/locale/interface.d.ts +1 -0
- package/es/locale/lang/en-us.js +1 -0
- package/es/locale/lang/zh-cn.js +1 -0
- package/es/locale/lang/zh-tw.js +1 -0
- package/es/mention/index.d.ts +15 -0
- package/es/mention/mention.d.ts +9 -0
- package/es/mention/mention.js +20 -1
- package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +30 -4
- package/es/menu/item.js +14 -1
- package/es/menu/style/index.css +6 -6
- package/es/menu/style/index.scss +5 -3
- package/es/message/style/index.css +3 -3
- package/es/message/style/index.scss +5 -3
- package/es/modal/index.d.ts +3 -3
- package/es/modal/modal.vue.d.ts +1 -1
- package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +30 -15
- package/es/modal/style/index.css +2 -2
- package/es/modal/style/index.scss +3 -2
- package/es/notification/style/index.css +3 -3
- package/es/notification/style/index.scss +11 -3
- package/es/page-header/page-header.vue.d.ts +6 -6
- package/es/page-header/page-header.vue_vue_type_script_setup_true_lang.js +12 -1
- package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +12 -2
- package/es/pagination/page-item-step.vue.d.ts +2 -2
- package/es/pagination/page-item-step.vue_vue_type_script_setup_true_lang.js +19 -2
- package/es/pagination/page-item.vue.d.ts +2 -2
- package/es/pagination/page-item.vue_vue_type_script_setup_true_lang.js +21 -3
- package/es/pagination/pagination.js +6 -2
- package/es/pagination/style/index.css +6 -1
- package/es/pagination/style/index.scss +9 -3
- package/es/popconfirm/popconfirm.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/popover/popover.vue_vue_type_script_setup_true_lang.js +3 -1
- package/es/progress/style/index.css +2 -2
- package/es/progress/style/index.scss +5 -3
- package/es/qr-code/qr-code-status.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +11 -6
- package/es/radio/context.d.ts +1 -0
- package/es/radio/radio-group.js +6 -2
- package/es/radio/radio.js +1 -0
- package/es/radio/style/index.css +2 -2
- package/es/radio/style/index.scss +4 -2
- package/es/rate/index.d.ts +6 -6
- package/es/rate/rate.d.ts +3 -3
- package/es/rate/rate.js +42 -8
- package/es/resize-box/resize-box.vue.d.ts +4 -4
- package/es/resize-box/resize-box.vue_vue_type_script_setup_true_lang.js +30 -1
- package/es/result/result.vue_vue_type_script_setup_true_lang.js +7 -4
- package/es/scrollbar/style/index.css +57 -15
- package/es/scrollbar/style/index.scss +63 -15
- package/es/sd-vue.js +3 -3
- package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/select/index.d.ts +139 -0
- package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +4 -1
- package/es/select/select.d.ts +71 -0
- package/es/select/select.js +45 -6
- package/es/select/style/index.css +1 -1
- package/es/select/style/index.scss +3 -1
- package/es/selectable-card/style/index.css +2 -2
- package/es/selectable-card/style/index.scss +5 -5
- package/es/skeleton/skeleton.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/slider/slider-button.vue.d.ts +2 -0
- package/es/slider/slider-button.vue_vue_type_script_setup_true_lang.js +7 -2
- package/es/slider/slider.vue_vue_type_script_setup_true_lang.js +23 -2
- package/es/slider/style/index.css +1 -1
- package/es/slider/style/index.scss +3 -1
- package/es/spin/spin.js +7 -2
- package/es/spin/style/index.css +1 -1
- package/es/spin/style/index.scss +1 -1
- package/es/split/split.vue.d.ts +4 -4
- package/es/split/split.vue_vue_type_script_setup_true_lang.js +27 -3
- package/es/steps/context.d.ts +1 -0
- package/es/steps/step.vue_vue_type_script_setup_true_lang.js +15 -2
- package/es/steps/steps.vue_vue_type_script_setup_true_lang.js +6 -1
- package/es/steps/style/index.css +1 -1
- package/es/steps/style/index.scss +1 -1
- package/es/style/animation/index.scss +1 -0
- package/es/style/animation/reduced-motion.scss +22 -0
- package/es/style/animation/zoom.scss +7 -6
- package/es/style/icon.scss +9 -1
- package/es/style/normalize.scss +68 -0
- package/es/switch/style/index.css +1 -1
- package/es/switch/style/index.scss +4 -1
- package/es/switch/switch.vue_vue_type_script_setup_true_lang.js +6 -1
- package/es/table/style/index.css +8 -8
- package/es/table/style/index.scss +11 -8
- package/es/table/table-operation-td.d.ts +15 -0
- package/es/table/table-tbody.js +4 -1
- package/es/table/table-td.js +2 -1
- package/es/table/table-th.js +6 -4
- package/es/table/table-thead.js +4 -1
- package/es/table/table-tr.js +4 -1
- package/es/table/table.js +6 -2
- package/es/tabs/context.d.ts +3 -0
- package/es/tabs/index.d.ts +32 -0
- package/es/tabs/style/index.css +34 -5
- package/es/tabs/style/index.scss +45 -7
- package/es/tabs/tab-pane.vue.d.ts +4 -2
- package/es/tabs/tab-pane.vue_vue_type_script_setup_true_lang.js +39 -4
- package/es/tabs/tabs-nav.js +34 -1
- package/es/tabs/tabs-tab.vue_vue_type_script_setup_true_lang.js +27 -4
- package/es/tabs/tabs.d.ts +19 -0
- package/es/tabs/tabs.js +25 -2
- package/es/tag/index.d.ts +5 -5
- package/es/tag/style/index.css +1 -1
- package/es/tag/style/index.scss +3 -1
- package/es/tag/tag.vue.d.ts +2 -2
- package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +19 -2
- package/es/textarea/index.d.ts +15 -0
- package/es/textarea/style/index.css +2 -2
- package/es/textarea/textarea.vue.d.ts +11 -2
- package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +84 -47
- package/es/time-picker/index.d.ts +3 -6
- package/es/time-picker/panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/time-column.vue_vue_type_script_setup_true_lang.js +11 -3
- package/es/time-picker/time-picker.vue.d.ts +2 -3
- package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +12 -6
- package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tooltip/index.d.ts +8 -127
- package/es/tooltip/interface.d.ts +17 -0
- package/es/tooltip/tooltip.vue.d.ts +5 -88
- package/es/tooltip/tooltip.vue_vue_type_script_setup_true_lang.js +9 -69
- package/es/tour/tour.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/transfer/style/index.css +1 -1
- package/es/transfer/style/index.scss +1 -1
- package/es/transfer/transfer-list-item.js +16 -2
- package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +27 -7
- package/es/tree/context.d.ts +2 -0
- package/es/tree/style/index.css +1 -1
- package/es/tree/style/index.scss +1 -1
- package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +82 -3
- package/es/tree-select/tree-select.vue.d.ts +16 -10
- package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +165 -133
- package/es/trigger/index.d.ts +45 -0
- package/es/trigger/trigger.d.ts +27 -0
- package/es/trigger/trigger.js +47 -5
- package/es/typography/base.js +1 -1
- package/es/typography/edit-content.vue_vue_type_script_setup_true_lang.js +11 -8
- package/es/typography/operations.vue_vue_type_script_setup_true_lang.js +38 -6
- package/es/typography/style/index.css +2 -2
- package/es/typography/style/index.scss +2 -2
- package/es/upload/style/index.css +9 -9
- package/es/upload/style/index.scss +15 -9
- package/es/upload/upload-button.js +1 -1
- package/es/upload/upload-list-item.js +18 -5
- package/es/upload/upload-picture-item.js +25 -3
- package/es/verification-code/index.d.ts +15 -6
- package/es/verification-code/verification-code.d.ts +9 -3
- package/es/verification-code/verification-code.js +10 -2
- package/json/vetur-attributes.json +63 -7
- package/json/vetur-tags.json +23 -7
- package/json/web-types.json +131 -10
- package/package.json +1 -1
- package/es/style/base.scss +0 -18
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isArray, isFunction, isUndefined } from "../_utils/is.js";
|
|
4
|
+
import { KEYBOARD_KEY } from "../_utils/keyboard.js";
|
|
4
5
|
import { _asyncToGenerator } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/asyncToGenerator.js";
|
|
5
6
|
import virtual_list_default from "../_components/virtual-list/index.js";
|
|
6
|
-
import useMergeState from "../_hooks/use-merge-state.js";
|
|
7
7
|
import usePickSlots from "../_hooks/use-pick-slots.js";
|
|
8
|
+
import useMergeState from "../_hooks/use-merge-state.js";
|
|
8
9
|
import { isLeafNode, isNodeExpandable, isNodeSelectable } from "./utils/index.js";
|
|
9
10
|
import useTreeData from "./hooks/use-tree-data.js";
|
|
10
11
|
import { getCheckedStateByCheck, isNodeCheckable } from "./utils/check-utils.js";
|
|
11
12
|
import { TreeInjectionKey } from "./context.js";
|
|
12
13
|
import useCheckedState from "./hooks/use-checked-state.js";
|
|
13
14
|
import node_default from "./node.js";
|
|
14
|
-
import { Fragment, computed, createBlock, createElementBlock, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, provide, reactive, ref, renderList, toRefs, unref, useSlots, watch, withCtx } from "vue";
|
|
15
|
+
import { Fragment, computed, createBlock, createElementBlock, defineComponent, mergeProps, nextTick, normalizeClass, normalizeStyle, openBlock, provide, reactive, ref, renderList, toRefs, unref, useSlots, watch, withCtx } from "vue";
|
|
15
16
|
//#region components/tree/tree.vue?vue&type=script&setup=true&lang.ts
|
|
16
17
|
var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Tree" }), {}, {
|
|
17
18
|
__name: "tree",
|
|
@@ -340,6 +341,7 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
340
341
|
};
|
|
341
342
|
});
|
|
342
343
|
const virtualListRef = ref(null);
|
|
344
|
+
const rootEl = ref(null);
|
|
343
345
|
const virtualListVersion = ref(0);
|
|
344
346
|
const virtualListKey = computed(() => `tree-virtual-list-${virtualListVersion.value}`);
|
|
345
347
|
const switcherIcon = usePickSlots(slots, "switcher-icon");
|
|
@@ -421,6 +423,78 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
421
423
|
});
|
|
422
424
|
return uniqueNodeList;
|
|
423
425
|
});
|
|
426
|
+
const activeKey = ref(void 0);
|
|
427
|
+
const effectiveActiveKey = computed(() => {
|
|
428
|
+
var _visibleTreeNodeList$;
|
|
429
|
+
if (activeKey.value !== void 0) return activeKey.value;
|
|
430
|
+
const selected = mergedSelectedKeys.value.find((k) => key2TreeNode.value.has(k));
|
|
431
|
+
if (selected !== void 0) return selected;
|
|
432
|
+
return (_visibleTreeNodeList$ = visibleTreeNodeList.value[0]) === null || _visibleTreeNodeList$ === void 0 ? void 0 : _visibleTreeNodeList$.key;
|
|
433
|
+
});
|
|
434
|
+
function focusNodeKey(targetKey) {
|
|
435
|
+
activeKey.value = targetKey;
|
|
436
|
+
nextTick(() => {
|
|
437
|
+
var _rootEl$value;
|
|
438
|
+
const el = (_rootEl$value = rootEl.value) === null || _rootEl$value === void 0 ? void 0 : _rootEl$value.querySelector(`[data-key="${CSS.escape(String(targetKey))}"]`);
|
|
439
|
+
el === null || el === void 0 || el.focus();
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
function onNodeKeydown(key, e) {
|
|
443
|
+
var _node$children;
|
|
444
|
+
const list = visibleTreeNodeList.value;
|
|
445
|
+
const idx = list.findIndex((n) => n.key === key);
|
|
446
|
+
if (idx === -1) return;
|
|
447
|
+
const node = list[idx];
|
|
448
|
+
const hasChildren = !node.isLeaf && Boolean((_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children.length);
|
|
449
|
+
const isExpanded = mergedExpandedKeys.value.includes(key);
|
|
450
|
+
switch (e.key) {
|
|
451
|
+
case KEYBOARD_KEY.ARROW_DOWN:
|
|
452
|
+
e.preventDefault();
|
|
453
|
+
if (list[idx + 1]) focusNodeKey(list[idx + 1].key);
|
|
454
|
+
break;
|
|
455
|
+
case KEYBOARD_KEY.ARROW_UP:
|
|
456
|
+
e.preventDefault();
|
|
457
|
+
if (list[idx - 1]) focusNodeKey(list[idx - 1].key);
|
|
458
|
+
break;
|
|
459
|
+
case KEYBOARD_KEY.HOME:
|
|
460
|
+
e.preventDefault();
|
|
461
|
+
if (list[0]) focusNodeKey(list[0].key);
|
|
462
|
+
break;
|
|
463
|
+
case KEYBOARD_KEY.END:
|
|
464
|
+
e.preventDefault();
|
|
465
|
+
if (list.length) focusNodeKey(list[list.length - 1].key);
|
|
466
|
+
break;
|
|
467
|
+
case KEYBOARD_KEY.ARROW_RIGHT:
|
|
468
|
+
e.preventDefault();
|
|
469
|
+
if (hasChildren && !isExpanded) onExpand(true, key, e);
|
|
470
|
+
else if (hasChildren && isExpanded) {
|
|
471
|
+
var _node$children2;
|
|
472
|
+
const firstChild = (_node$children2 = node.children) === null || _node$children2 === void 0 ? void 0 : _node$children2[0];
|
|
473
|
+
if (firstChild) focusNodeKey(firstChild.key);
|
|
474
|
+
}
|
|
475
|
+
break;
|
|
476
|
+
case KEYBOARD_KEY.ARROW_LEFT:
|
|
477
|
+
e.preventDefault();
|
|
478
|
+
if (hasChildren && isExpanded) onExpand(false, key, e);
|
|
479
|
+
else {
|
|
480
|
+
const parents = node.pathParentKeys;
|
|
481
|
+
if (parents.length) focusNodeKey(parents[parents.length - 1]);
|
|
482
|
+
}
|
|
483
|
+
break;
|
|
484
|
+
case KEYBOARD_KEY.ENTER:
|
|
485
|
+
case KEYBOARD_KEY.SPACE:
|
|
486
|
+
if (node.checkable && !node.disableCheckbox && !node.disabled) {
|
|
487
|
+
e.preventDefault();
|
|
488
|
+
onCheck(!mergedCheckedKeys.value.includes(key), key, e);
|
|
489
|
+
break;
|
|
490
|
+
}
|
|
491
|
+
if (node.selectable && !node.disabled) {
|
|
492
|
+
e.preventDefault();
|
|
493
|
+
onSelect(key, e);
|
|
494
|
+
}
|
|
495
|
+
break;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
424
498
|
function getPublicCheckedKeys(rawCheckedKeys, rawCheckedStrategy = checkedStrategy.value) {
|
|
425
499
|
let publicCheckedKeys = [...rawCheckedKeys];
|
|
426
500
|
if (rawCheckedStrategy === "parent") publicCheckedKeys = rawCheckedKeys.filter((_key) => {
|
|
@@ -717,6 +791,7 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
717
791
|
expandedKeys: mergedExpandedKeys,
|
|
718
792
|
loadingKeys,
|
|
719
793
|
currentExpandKeys,
|
|
794
|
+
activeKey: effectiveActiveKey,
|
|
720
795
|
onLoadMore: computed(() => (loadMore === null || loadMore === void 0 ? void 0 : loadMore.value) ? function() {
|
|
721
796
|
var _ref = _asyncToGenerator(function* (key) {
|
|
722
797
|
if (!isFunction(loadMore.value)) return;
|
|
@@ -744,6 +819,7 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
744
819
|
onExpand,
|
|
745
820
|
onExpandEnd,
|
|
746
821
|
onNodeEvent,
|
|
822
|
+
onNodeKeydown,
|
|
747
823
|
onNodeLongPress,
|
|
748
824
|
onNodeSwipe,
|
|
749
825
|
allowDrop(key, dropPosition) {
|
|
@@ -947,8 +1023,11 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
|
|
|
947
1023
|
});
|
|
948
1024
|
return (_ctx, _cache) => {
|
|
949
1025
|
return openBlock(), createElementBlock("div", {
|
|
1026
|
+
ref_key: "rootEl",
|
|
1027
|
+
ref: rootEl,
|
|
950
1028
|
class: normalizeClass(classNames.value),
|
|
951
|
-
style: normalizeStyle(treeStyle.value)
|
|
1029
|
+
style: normalizeStyle(treeStyle.value),
|
|
1030
|
+
role: "tree"
|
|
952
1031
|
}, [unref(virtualListProps) ? (openBlock(), createBlock(unref(virtual_list_default), mergeProps({
|
|
953
1032
|
key: virtualListKey.value,
|
|
954
1033
|
ref_key: "virtualListRef",
|
|
@@ -5,30 +5,33 @@ import { ScrollbarProps } from '../scrollbar';
|
|
|
5
5
|
import { TreeFieldNames, TreeNodeData, TreeProps } from '../tree/interface';
|
|
6
6
|
import { TriggerProps } from '../trigger';
|
|
7
7
|
import { LabelValue, TreeSelectValue } from './interface';
|
|
8
|
-
declare var
|
|
8
|
+
declare var __VLS_16: {}, __VLS_32: {}, __VLS_35: any, __VLS_38: {
|
|
9
9
|
data: any;
|
|
10
|
-
},
|
|
10
|
+
}, __VLS_41: {}, __VLS_43: {}, __VLS_50: {}, __VLS_64: {};
|
|
11
11
|
type __VLS_Slots = {} & {
|
|
12
|
-
trigger?: (props: typeof
|
|
12
|
+
trigger?: (props: typeof __VLS_16) => any;
|
|
13
13
|
} & {
|
|
14
|
-
prefix?: (props: typeof
|
|
14
|
+
prefix?: (props: typeof __VLS_32) => any;
|
|
15
15
|
} & {
|
|
16
|
-
label?: (props: typeof
|
|
16
|
+
label?: (props: typeof __VLS_35) => any;
|
|
17
17
|
} & {
|
|
18
|
-
tag?: (props: typeof
|
|
18
|
+
tag?: (props: typeof __VLS_38) => any;
|
|
19
19
|
} & {
|
|
20
|
-
header?: (props: typeof
|
|
20
|
+
header?: (props: typeof __VLS_41) => any;
|
|
21
21
|
} & {
|
|
22
|
-
loader?: (props: typeof
|
|
22
|
+
loader?: (props: typeof __VLS_43) => any;
|
|
23
23
|
} & {
|
|
24
|
-
empty?: (props: typeof
|
|
24
|
+
empty?: (props: typeof __VLS_50) => any;
|
|
25
25
|
} & {
|
|
26
|
-
footer?: (props: typeof
|
|
26
|
+
footer?: (props: typeof __VLS_64) => any;
|
|
27
27
|
};
|
|
28
28
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
29
29
|
disabled: {
|
|
30
30
|
type: BooleanConstructor;
|
|
31
31
|
};
|
|
32
|
+
readonly: {
|
|
33
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
34
|
+
};
|
|
32
35
|
loading: {
|
|
33
36
|
type: BooleanConstructor;
|
|
34
37
|
};
|
|
@@ -203,6 +206,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
203
206
|
disabled: {
|
|
204
207
|
type: BooleanConstructor;
|
|
205
208
|
};
|
|
209
|
+
readonly: {
|
|
210
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
211
|
+
};
|
|
206
212
|
loading: {
|
|
207
213
|
type: BooleanConstructor;
|
|
208
214
|
};
|
|
@@ -6,9 +6,11 @@ import { isFunction, isObject, isUndefined } from "../_utils/is.js";
|
|
|
6
6
|
import { useAllowClear } from "../_hooks/use-allow-clear.js";
|
|
7
7
|
import { useDropdownVirtualListProps } from "../_hooks/use-dropdown-virtual-list-props.js";
|
|
8
8
|
import { resolveDropdownVirtualListProps } from "../_utils/virtual-dropdown.js";
|
|
9
|
+
import { useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
|
|
10
|
+
import Trigger from "../trigger/index.js";
|
|
11
|
+
import Tooltip from "../tooltip/index.js";
|
|
9
12
|
import useMergeState from "../_hooks/use-merge-state.js";
|
|
10
13
|
import Spin from "../spin/index.js";
|
|
11
|
-
import Trigger from "../trigger/index.js";
|
|
12
14
|
import select_view_default from "../_components/select-view/select-view.js";
|
|
13
15
|
import { useAllowSearch } from "../_hooks/use-allow-search.js";
|
|
14
16
|
import pickSubCompSlots from "../_utils/pick-sub-comp-slots.js";
|
|
@@ -18,7 +20,7 @@ import { getCheckedStateByCheck, isNodeCheckable } from "../tree/utils/check-uti
|
|
|
18
20
|
import useFilterTreeNode from "./hooks/use-filter-tree-node.js";
|
|
19
21
|
import useSelectedState from "./hooks/use-selected-state.js";
|
|
20
22
|
import panel_default from "./panel.js";
|
|
21
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, guardReactiveProps, inject, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, openBlock, reactive, ref, renderSlot, resolveDynamicComponent, toRefs, unref, withCtx } from "vue";
|
|
23
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, guardReactiveProps, inject, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, openBlock, reactive, ref, renderSlot, resolveDynamicComponent, toRef, toRefs, unref, withCtx } from "vue";
|
|
22
24
|
//#region components/tree-select/tree-select.vue?vue&type=script&setup=true&lang.ts
|
|
23
25
|
var tree_select_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, {
|
|
24
26
|
name: "TreeSelect",
|
|
@@ -32,6 +34,11 @@ var tree_select_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
32
34
|
* */
|
|
33
35
|
disabled: { type: Boolean },
|
|
34
36
|
/**
|
|
37
|
+
* @zh 是否为只读状态
|
|
38
|
+
* @en Whether it is read-only
|
|
39
|
+
* */
|
|
40
|
+
readonly: { type: [Boolean, String] },
|
|
41
|
+
/**
|
|
35
42
|
* @zh 是否为加载中状态
|
|
36
43
|
* @en Whether it is loading state
|
|
37
44
|
* */
|
|
@@ -506,7 +513,7 @@ var tree_select_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
506
513
|
var _popupVisible$value;
|
|
507
514
|
return (_popupVisible$value = popupVisible.value) !== null && _popupVisible$value !== void 0 ? _popupVisible$value : show.value;
|
|
508
515
|
}) }));
|
|
509
|
-
const
|
|
516
|
+
const _setPanelVisible = (visible) => {
|
|
510
517
|
if (visible !== panelVisible.value) {
|
|
511
518
|
setLocalPanelVisible(visible);
|
|
512
519
|
emit("popup-visible-change", visible);
|
|
@@ -516,6 +523,21 @@ var tree_select_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
516
523
|
}
|
|
517
524
|
if (!visible) refSelectView.value && refSelectView.value.blur && refSelectView.value.blur();
|
|
518
525
|
};
|
|
526
|
+
const { tipVisible, show: showReadonlyTip } = useReadonlyTip(toRef(props, "readonly"), mergedDisabled);
|
|
527
|
+
const readonlyTipText = useReadonlyTipText(toRef(props, "readonly"));
|
|
528
|
+
const triggerInputAttrs = computed(() => ({
|
|
529
|
+
"role": "combobox",
|
|
530
|
+
"aria-expanded": panelVisible.value,
|
|
531
|
+
"aria-haspopup": "listbox",
|
|
532
|
+
"aria-autocomplete": mergedAllowSearch.value ? "list" : "none"
|
|
533
|
+
}));
|
|
534
|
+
const setPanelVisible = (visible) => {
|
|
535
|
+
if (visible && props.readonly && !mergedDisabled.value) {
|
|
536
|
+
showReadonlyTip();
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
_setPanelVisible(visible);
|
|
540
|
+
};
|
|
519
541
|
const { isEmptyFilterResult, filterTreeNode: computedFilterTreeNode } = useFilterTreeNode(reactive({
|
|
520
542
|
searchValue: computedInputValue,
|
|
521
543
|
flattenTreeData,
|
|
@@ -568,139 +590,149 @@ var tree_select_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
568
590
|
} else setSelectedKeys(selectedKeys.value.filter((i) => i !== id));
|
|
569
591
|
};
|
|
570
592
|
return (_ctx, _cache) => {
|
|
571
|
-
return openBlock(), createBlock(unref(
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
onPopupVisibleChange: unref(onVisibleChange)
|
|
586
|
-
}), {
|
|
587
|
-
content: withCtx(() => [createElementVNode("div", {
|
|
588
|
-
class: normalizeClass([
|
|
589
|
-
`${unref(prefixCls)}-popup`,
|
|
590
|
-
{
|
|
591
|
-
[`${unref(prefixCls)}-has-header`]: Boolean(_ctx.$slots.header),
|
|
592
|
-
[`${unref(prefixCls)}-has-footer`]: Boolean(_ctx.$slots.footer)
|
|
593
|
-
},
|
|
594
|
-
__props.dropdownClassName
|
|
595
|
-
]),
|
|
596
|
-
style: normalizeStyle(computedDropdownStyle.value)
|
|
597
|
-
}, [
|
|
598
|
-
_ctx.$slots.header && (!isEmpty.value || __props.showHeaderOnEmpty) ? (openBlock(), createElementBlock("div", {
|
|
599
|
-
key: 0,
|
|
600
|
-
class: normalizeClass(`${unref(prefixCls)}-header`)
|
|
601
|
-
}, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("", true),
|
|
602
|
-
__props.loading ? renderSlot(_ctx.$slots, "loader", { key: 1 }, () => [createVNode(unref(Spin))]) : isEmpty.value ? renderSlot(_ctx.$slots, "empty", { key: 2 }, () => [(openBlock(), createBlock(resolveDynamicComponent(unref(TreeSelectEmpty) ? unref(TreeSelectEmpty) : "Empty")))]) : (openBlock(), createBlock(unref(panel_default), {
|
|
603
|
-
key: 3,
|
|
604
|
-
"selected-keys": unref(selectedKeys),
|
|
605
|
-
"show-checkable": mergedTreeCheckable.value,
|
|
606
|
-
scrollbar: __props.scrollbar,
|
|
607
|
-
"tree-props": _objectSpread2(_objectSpread2({
|
|
608
|
-
actionOnNodeClick: unref(selectable) === "leaf" ? "expand" : void 0,
|
|
609
|
-
blockNode: true
|
|
610
|
-
}, mergedTreeProps.value), {}, {
|
|
611
|
-
data: mergedData.value,
|
|
612
|
-
checkStrictly: unref(treeCheckStrictly),
|
|
613
|
-
checkedStrategy: mergedTreeCheckedStrategy.value,
|
|
614
|
-
fieldNames: unref(fieldNames),
|
|
615
|
-
multiple: unref(multiple),
|
|
616
|
-
loadMore: __props.loadMore,
|
|
617
|
-
filterTreeNode: unref(computedFilterTreeNode),
|
|
618
|
-
size: __props.size,
|
|
619
|
-
checkable: isCheckable.value,
|
|
620
|
-
selectable: isSelectable,
|
|
621
|
-
searchValue: unref(searchValue)
|
|
622
|
-
}),
|
|
623
|
-
"tree-slots": unref(pickSubCompSlots)(_ctx.$slots, "tree"),
|
|
624
|
-
onChange: onSelectChange
|
|
625
|
-
}, null, 8, [
|
|
626
|
-
"selected-keys",
|
|
627
|
-
"show-checkable",
|
|
628
|
-
"scrollbar",
|
|
629
|
-
"tree-props",
|
|
630
|
-
"tree-slots"
|
|
631
|
-
])),
|
|
632
|
-
_ctx.$slots.footer && (!isEmpty.value || __props.showFooterOnEmpty) ? (openBlock(), createElementBlock("div", {
|
|
633
|
-
key: 4,
|
|
634
|
-
class: normalizeClass(`${unref(prefixCls)}-footer`)
|
|
635
|
-
}, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("", true)
|
|
636
|
-
], 6)]),
|
|
637
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "trigger", {}, () => [createVNode(unref(select_view_default), mergeProps({
|
|
638
|
-
ref_key: "refSelectView",
|
|
639
|
-
ref: refSelectView,
|
|
640
|
-
"model-value": selectViewValue.value,
|
|
641
|
-
"input-value": unref(searchValue),
|
|
642
|
-
"allow-search": Boolean(unref(mergedAllowSearch)),
|
|
643
|
-
"allow-clear": unref(mergedAllowClear),
|
|
644
|
-
"show-arrow": __props.showArrow,
|
|
645
|
-
loading: __props.loading,
|
|
646
|
-
size: __props.size,
|
|
647
|
-
"max-tag-count": __props.maxTagCount,
|
|
593
|
+
return openBlock(), createBlock(unref(Tooltip), {
|
|
594
|
+
"popup-visible": unref(tipVisible),
|
|
595
|
+
content: unref(readonlyTipText),
|
|
596
|
+
position: "top"
|
|
597
|
+
}, {
|
|
598
|
+
default: withCtx(() => [createVNode(unref(Trigger), mergeProps({
|
|
599
|
+
class: `${unref(prefixCls)}-trigger`,
|
|
600
|
+
"auto-fit-popup-min-width": "",
|
|
601
|
+
trigger: "click",
|
|
602
|
+
position: "bl",
|
|
603
|
+
"popup-offset": 4,
|
|
604
|
+
"animation-name": "slide-dynamic-origin",
|
|
605
|
+
"prevent-focus": true
|
|
606
|
+
}, resolvedTriggerProps.value, {
|
|
648
607
|
disabled: unref(mergedDisabled),
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
608
|
+
"popup-visible": unref(panelVisible),
|
|
609
|
+
"popup-container": __props.popupContainer,
|
|
610
|
+
"click-to-close": !Boolean(unref(mergedAllowSearch)),
|
|
611
|
+
"auto-fit-transform-origin": "",
|
|
612
|
+
"aria-has-popup": "listbox",
|
|
613
|
+
onPopupVisibleChange: unref(onVisibleChange)
|
|
614
|
+
}), {
|
|
615
|
+
content: withCtx(() => [createElementVNode("div", {
|
|
616
|
+
class: normalizeClass([
|
|
617
|
+
`${unref(prefixCls)}-popup`,
|
|
618
|
+
{
|
|
619
|
+
[`${unref(prefixCls)}-has-header`]: Boolean(_ctx.$slots.header),
|
|
620
|
+
[`${unref(prefixCls)}-has-footer`]: Boolean(_ctx.$slots.footer)
|
|
621
|
+
},
|
|
622
|
+
__props.dropdownClassName
|
|
623
|
+
]),
|
|
624
|
+
style: normalizeStyle(computedDropdownStyle.value)
|
|
625
|
+
}, [
|
|
626
|
+
_ctx.$slots.header && (!isEmpty.value || __props.showHeaderOnEmpty) ? (openBlock(), createElementBlock("div", {
|
|
627
|
+
key: 0,
|
|
628
|
+
class: normalizeClass(`${unref(prefixCls)}-header`)
|
|
629
|
+
}, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("", true),
|
|
630
|
+
__props.loading ? renderSlot(_ctx.$slots, "loader", { key: 1 }, () => [createVNode(unref(Spin))]) : isEmpty.value ? renderSlot(_ctx.$slots, "empty", { key: 2 }, () => [(openBlock(), createBlock(resolveDynamicComponent(unref(TreeSelectEmpty) ? unref(TreeSelectEmpty) : "Empty")))]) : (openBlock(), createBlock(unref(panel_default), {
|
|
631
|
+
key: 3,
|
|
632
|
+
"selected-keys": unref(selectedKeys),
|
|
633
|
+
"show-checkable": mergedTreeCheckable.value,
|
|
634
|
+
scrollbar: __props.scrollbar,
|
|
635
|
+
"tree-props": _objectSpread2(_objectSpread2({
|
|
636
|
+
actionOnNodeClick: unref(selectable) === "leaf" ? "expand" : void 0,
|
|
637
|
+
blockNode: true
|
|
638
|
+
}, mergedTreeProps.value), {}, {
|
|
639
|
+
data: mergedData.value,
|
|
640
|
+
checkStrictly: unref(treeCheckStrictly),
|
|
641
|
+
checkedStrategy: mergedTreeCheckedStrategy.value,
|
|
642
|
+
fieldNames: unref(fieldNames),
|
|
643
|
+
multiple: unref(multiple),
|
|
644
|
+
loadMore: __props.loadMore,
|
|
645
|
+
filterTreeNode: unref(computedFilterTreeNode),
|
|
646
|
+
size: __props.size,
|
|
647
|
+
checkable: isCheckable.value,
|
|
648
|
+
selectable: isSelectable,
|
|
649
|
+
searchValue: unref(searchValue)
|
|
650
|
+
}),
|
|
651
|
+
"tree-slots": unref(pickSubCompSlots)(_ctx.$slots, "tree"),
|
|
652
|
+
onChange: onSelectChange
|
|
653
|
+
}, null, 8, [
|
|
654
|
+
"selected-keys",
|
|
655
|
+
"show-checkable",
|
|
656
|
+
"scrollbar",
|
|
657
|
+
"tree-props",
|
|
658
|
+
"tree-slots"
|
|
659
|
+
])),
|
|
660
|
+
_ctx.$slots.footer && (!isEmpty.value || __props.showFooterOnEmpty) ? (openBlock(), createElementBlock("div", {
|
|
661
|
+
key: 4,
|
|
662
|
+
class: normalizeClass(`${unref(prefixCls)}-footer`)
|
|
663
|
+
}, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("", true)
|
|
664
|
+
], 6)]),
|
|
665
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "trigger", {}, () => [createVNode(unref(select_view_default), mergeProps({
|
|
666
|
+
ref_key: "refSelectView",
|
|
667
|
+
ref: refSelectView,
|
|
668
|
+
"model-value": selectViewValue.value,
|
|
669
|
+
"input-value": unref(searchValue),
|
|
670
|
+
"allow-search": Boolean(unref(mergedAllowSearch)),
|
|
671
|
+
"allow-clear": unref(mergedAllowClear),
|
|
672
|
+
"show-arrow": __props.showArrow,
|
|
673
|
+
loading: __props.loading,
|
|
674
|
+
size: __props.size,
|
|
675
|
+
"max-tag-count": __props.maxTagCount,
|
|
676
|
+
disabled: unref(mergedDisabled),
|
|
677
|
+
opened: unref(panelVisible),
|
|
678
|
+
error: __props.error,
|
|
679
|
+
bordered: __props.border,
|
|
680
|
+
placeholder: __props.placeholder,
|
|
681
|
+
multiple: isMultiple.value,
|
|
682
|
+
"input-attrs": triggerInputAttrs.value
|
|
683
|
+
}, _ctx.$attrs, {
|
|
684
|
+
onInputValueChange: unref(onSearchValueChange),
|
|
685
|
+
onClear: onInnerClear,
|
|
686
|
+
onRemove: onItemRemove,
|
|
687
|
+
onBlur
|
|
688
|
+
}), createSlots({ _: 2 }, [
|
|
689
|
+
_ctx.$slots.prefix ? {
|
|
690
|
+
name: "prefix",
|
|
691
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "prefix")]),
|
|
692
|
+
key: "0"
|
|
693
|
+
} : void 0,
|
|
694
|
+
_ctx.$slots.label ? {
|
|
695
|
+
name: "label",
|
|
696
|
+
fn: withCtx((selectedData) => [renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps(selectedData)))]),
|
|
697
|
+
key: "1"
|
|
698
|
+
} : void 0,
|
|
699
|
+
_ctx.$slots.tag ? {
|
|
700
|
+
name: "tag",
|
|
701
|
+
fn: withCtx((selectedData) => {
|
|
702
|
+
var _selectedData$data$op, _selectedData$data;
|
|
703
|
+
return [renderSlot(_ctx.$slots, "tag", { data: (_selectedData$data$op = selectedData === null || selectedData === void 0 || (_selectedData$data = selectedData.data) === null || _selectedData$data === void 0 ? void 0 : _selectedData$data.option) !== null && _selectedData$data$op !== void 0 ? _selectedData$data$op : selectedData === null || selectedData === void 0 ? void 0 : selectedData.data })];
|
|
704
|
+
}),
|
|
705
|
+
key: "2"
|
|
706
|
+
} : void 0
|
|
707
|
+
]), 1040, [
|
|
708
|
+
"model-value",
|
|
709
|
+
"input-value",
|
|
710
|
+
"allow-search",
|
|
711
|
+
"allow-clear",
|
|
712
|
+
"show-arrow",
|
|
713
|
+
"loading",
|
|
714
|
+
"size",
|
|
715
|
+
"max-tag-count",
|
|
716
|
+
"disabled",
|
|
717
|
+
"opened",
|
|
718
|
+
"error",
|
|
719
|
+
"bordered",
|
|
720
|
+
"placeholder",
|
|
721
|
+
"multiple",
|
|
722
|
+
"input-attrs",
|
|
723
|
+
"onInputValueChange"
|
|
724
|
+
])])]),
|
|
725
|
+
_: 3
|
|
726
|
+
}, 16, [
|
|
727
|
+
"class",
|
|
687
728
|
"disabled",
|
|
688
|
-
"
|
|
689
|
-
"
|
|
690
|
-
"
|
|
691
|
-
"
|
|
692
|
-
|
|
693
|
-
"onInputValueChange"
|
|
694
|
-
])])]),
|
|
729
|
+
"popup-visible",
|
|
730
|
+
"popup-container",
|
|
731
|
+
"click-to-close",
|
|
732
|
+
"onPopupVisibleChange"
|
|
733
|
+
])]),
|
|
695
734
|
_: 3
|
|
696
|
-
},
|
|
697
|
-
"class",
|
|
698
|
-
"disabled",
|
|
699
|
-
"popup-visible",
|
|
700
|
-
"popup-container",
|
|
701
|
-
"click-to-close",
|
|
702
|
-
"onPopupVisibleChange"
|
|
703
|
-
]);
|
|
735
|
+
}, 8, ["popup-visible", "content"]);
|
|
704
736
|
};
|
|
705
737
|
}
|
|
706
738
|
}));
|
package/es/trigger/index.d.ts
CHANGED
|
@@ -145,6 +145,18 @@ declare const Trigger: {
|
|
|
145
145
|
type: NumberConstructor;
|
|
146
146
|
default: number;
|
|
147
147
|
};
|
|
148
|
+
escToClose: {
|
|
149
|
+
type: BooleanConstructor;
|
|
150
|
+
default: boolean;
|
|
151
|
+
};
|
|
152
|
+
ariaHasPopup: {
|
|
153
|
+
type: import("vue").PropType<boolean | "menu" | "listbox" | "tree" | "grid" | "dialog">;
|
|
154
|
+
default: undefined;
|
|
155
|
+
};
|
|
156
|
+
ariaDescribedbyPopup: {
|
|
157
|
+
type: BooleanConstructor;
|
|
158
|
+
default: boolean;
|
|
159
|
+
};
|
|
148
160
|
}>> & Readonly<{
|
|
149
161
|
onHide?: (() => any) | undefined;
|
|
150
162
|
onResize?: (() => any) | undefined;
|
|
@@ -186,6 +198,9 @@ declare const Trigger: {
|
|
|
186
198
|
preventFocus: boolean;
|
|
187
199
|
scrollToClose: boolean;
|
|
188
200
|
scrollToCloseDistance: number;
|
|
201
|
+
escToClose: boolean;
|
|
202
|
+
ariaHasPopup: boolean | "dialog" | "menu" | "listbox" | "tree" | "grid";
|
|
203
|
+
ariaDescribedbyPopup: boolean;
|
|
189
204
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
190
205
|
P: {};
|
|
191
206
|
B: {};
|
|
@@ -336,6 +351,18 @@ declare const Trigger: {
|
|
|
336
351
|
type: NumberConstructor;
|
|
337
352
|
default: number;
|
|
338
353
|
};
|
|
354
|
+
escToClose: {
|
|
355
|
+
type: BooleanConstructor;
|
|
356
|
+
default: boolean;
|
|
357
|
+
};
|
|
358
|
+
ariaHasPopup: {
|
|
359
|
+
type: import("vue").PropType<boolean | "menu" | "listbox" | "tree" | "grid" | "dialog">;
|
|
360
|
+
default: undefined;
|
|
361
|
+
};
|
|
362
|
+
ariaDescribedbyPopup: {
|
|
363
|
+
type: BooleanConstructor;
|
|
364
|
+
default: boolean;
|
|
365
|
+
};
|
|
339
366
|
}>> & Readonly<{
|
|
340
367
|
onHide?: (() => any) | undefined;
|
|
341
368
|
onResize?: (() => any) | undefined;
|
|
@@ -371,6 +398,9 @@ declare const Trigger: {
|
|
|
371
398
|
preventFocus: boolean;
|
|
372
399
|
scrollToClose: boolean;
|
|
373
400
|
scrollToCloseDistance: number;
|
|
401
|
+
escToClose: boolean;
|
|
402
|
+
ariaHasPopup: boolean | "dialog" | "menu" | "listbox" | "tree" | "grid";
|
|
403
|
+
ariaDescribedbyPopup: boolean;
|
|
374
404
|
}>;
|
|
375
405
|
__isFragment?: never;
|
|
376
406
|
__isTeleport?: never;
|
|
@@ -518,6 +548,18 @@ declare const Trigger: {
|
|
|
518
548
|
type: NumberConstructor;
|
|
519
549
|
default: number;
|
|
520
550
|
};
|
|
551
|
+
escToClose: {
|
|
552
|
+
type: BooleanConstructor;
|
|
553
|
+
default: boolean;
|
|
554
|
+
};
|
|
555
|
+
ariaHasPopup: {
|
|
556
|
+
type: import("vue").PropType<boolean | "menu" | "listbox" | "tree" | "grid" | "dialog">;
|
|
557
|
+
default: undefined;
|
|
558
|
+
};
|
|
559
|
+
ariaDescribedbyPopup: {
|
|
560
|
+
type: BooleanConstructor;
|
|
561
|
+
default: boolean;
|
|
562
|
+
};
|
|
521
563
|
}>> & Readonly<{
|
|
522
564
|
onHide?: (() => any) | undefined;
|
|
523
565
|
onResize?: (() => any) | undefined;
|
|
@@ -559,6 +601,9 @@ declare const Trigger: {
|
|
|
559
601
|
preventFocus: boolean;
|
|
560
602
|
scrollToClose: boolean;
|
|
561
603
|
scrollToCloseDistance: number;
|
|
604
|
+
escToClose: boolean;
|
|
605
|
+
ariaHasPopup: boolean | "dialog" | "menu" | "listbox" | "tree" | "grid";
|
|
606
|
+
ariaDescribedbyPopup: boolean;
|
|
562
607
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
563
608
|
install: (app: App, options?: SDOptions) => void;
|
|
564
609
|
};
|
package/es/trigger/trigger.d.ts
CHANGED
|
@@ -144,6 +144,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
144
144
|
type: NumberConstructor;
|
|
145
145
|
default: number;
|
|
146
146
|
};
|
|
147
|
+
escToClose: {
|
|
148
|
+
type: BooleanConstructor;
|
|
149
|
+
default: boolean;
|
|
150
|
+
};
|
|
151
|
+
ariaHasPopup: {
|
|
152
|
+
type: PropType<boolean | "menu" | "listbox" | "tree" | "grid" | "dialog">;
|
|
153
|
+
default: undefined;
|
|
154
|
+
};
|
|
155
|
+
ariaDescribedbyPopup: {
|
|
156
|
+
type: BooleanConstructor;
|
|
157
|
+
default: boolean;
|
|
158
|
+
};
|
|
147
159
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
148
160
|
'update:popupVisible': (_visible: boolean) => true;
|
|
149
161
|
popupVisibleChange: (_visible: boolean) => true;
|
|
@@ -293,6 +305,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
293
305
|
type: NumberConstructor;
|
|
294
306
|
default: number;
|
|
295
307
|
};
|
|
308
|
+
escToClose: {
|
|
309
|
+
type: BooleanConstructor;
|
|
310
|
+
default: boolean;
|
|
311
|
+
};
|
|
312
|
+
ariaHasPopup: {
|
|
313
|
+
type: PropType<boolean | "menu" | "listbox" | "tree" | "grid" | "dialog">;
|
|
314
|
+
default: undefined;
|
|
315
|
+
};
|
|
316
|
+
ariaDescribedbyPopup: {
|
|
317
|
+
type: BooleanConstructor;
|
|
318
|
+
default: boolean;
|
|
319
|
+
};
|
|
296
320
|
}>> & Readonly<{
|
|
297
321
|
onHide?: (() => any) | undefined;
|
|
298
322
|
onResize?: (() => any) | undefined;
|
|
@@ -328,5 +352,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
328
352
|
preventFocus: boolean;
|
|
329
353
|
scrollToClose: boolean;
|
|
330
354
|
scrollToCloseDistance: number;
|
|
355
|
+
escToClose: boolean;
|
|
356
|
+
ariaHasPopup: boolean | "dialog" | "menu" | "listbox" | "tree" | "grid";
|
|
357
|
+
ariaDescribedbyPopup: boolean;
|
|
331
358
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
332
359
|
export default _default;
|