@veltra/desktop 1.7.19 → 1.8.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/dist/components/batch-edit/batch-edit-form.js +40 -26
- package/dist/components/batch-edit/batch-edit-form.js.map +1 -1
- package/dist/components/batch-edit/use-handlers.js +3 -3
- package/dist/components/batch-edit/use-handlers.js.map +1 -1
- package/dist/components/batch-edit/use-shortcut-key.js +4 -2
- package/dist/components/batch-edit/use-shortcut-key.js.map +1 -1
- package/dist/components/card/style2.css +0 -2
- package/dist/components/condition-editor/condition-editor.js +8 -2
- package/dist/components/condition-editor/condition-editor.js.map +1 -1
- package/dist/components/dropdown/dropdown.js +5 -3
- package/dist/components/dropdown/dropdown.js.map +1 -1
- package/dist/components/expression-editor/components/path-preview.js +3 -6
- package/dist/components/expression-editor/components/path-preview.js.map +1 -1
- package/dist/components/expression-editor/components/variable-picker.js +49 -12
- package/dist/components/expression-editor/components/variable-picker.js.map +1 -1
- package/dist/components/expression-editor/core/editor.js +42 -0
- package/dist/components/expression-editor/core/editor.js.map +1 -1
- package/dist/components/expression-editor/expression-editor.js +68 -22
- package/dist/components/expression-editor/expression-editor.js.map +1 -1
- package/dist/components/expression-editor/style2.css +135 -73
- package/dist/components/form/form.js.map +1 -1
- package/dist/components/form/form.vue_vue_type_script_setup_true_lang.js +0 -1
- package/dist/components/form/form.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/form/style2.css +8 -3
- package/dist/components/form-item/style2.css +14 -0
- package/dist/components/index.d.ts +27 -26
- package/dist/components/index.js +54 -52
- package/dist/components/index.js.map +1 -1
- package/dist/components/kanban/di.js +7 -0
- package/dist/components/kanban/di.js.map +1 -0
- package/dist/components/kanban/kanban-column.js +67 -0
- package/dist/components/kanban/kanban-column.js.map +1 -0
- package/dist/components/kanban/kanban.js +89 -0
- package/dist/components/kanban/kanban.js.map +1 -0
- package/dist/components/kanban/style.d.ts +1 -0
- package/dist/components/kanban/style.js +1 -0
- package/dist/components/kanban/style2.css +128 -0
- package/dist/components/multi-select/multi-select.js +16 -12
- package/dist/components/multi-select/multi-select.js.map +1 -1
- package/dist/components/multi-select/style2.css +7 -0
- package/dist/components/multi-tree-select/multi-tree-select.js +82 -56
- package/dist/components/multi-tree-select/multi-tree-select.js.map +1 -1
- package/dist/components/multi-tree-select/style2.css +7 -0
- package/dist/components/rich-text-editor/image-node.js +154 -0
- package/dist/components/rich-text-editor/image-node.js.map +1 -0
- package/dist/components/rich-text-editor/rich-text-editor.js +80 -22
- package/dist/components/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/components/rich-text-editor/style2.css +6 -0
- package/dist/components/rich-text-editor/toolbar.js +22 -2
- package/dist/components/rich-text-editor/toolbar.js.map +1 -1
- package/dist/components/select/select.js +7 -3
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/select/style2.css +7 -0
- package/dist/components/select/use-options.js +14 -3
- package/dist/components/select/use-options.js.map +1 -1
- package/dist/components/tree-select/style2.css +7 -0
- package/dist/components/tree-select/tree-select.js +49 -17
- package/dist/components/tree-select/tree-select.js.map +1 -1
- package/dist/index.d.ts +48 -46
- package/dist/index.js +47 -46
- package/dist/types/dropdown.d.ts +10 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/kanban.d.ts +69 -0
- package/dist/types/multi-tree-select.d.ts +7 -1
- package/dist/types/rich-text-editor.d.ts +13 -2
- package/dist/types/tree-select.d.ts +7 -1
- package/package.json +1 -1
- package/src/components/batch-edit/__test__/batch-edit.test.ts +112 -1
- package/src/components/batch-edit/batch-edit-form.vue +21 -2
- package/src/components/batch-edit/use-handlers.ts +6 -5
- package/src/components/batch-edit/use-shortcut-key.ts +5 -2
- package/src/components/card/style.scss +0 -2
- package/src/components/condition-editor/__test__/condition-editor.test.ts +61 -0
- package/src/components/condition-editor/condition-editor.vue +6 -1
- package/src/components/dropdown/dropdown.vue +9 -4
- package/src/components/expression-editor/__test__/editor.test.ts +66 -0
- package/src/components/expression-editor/__test__/expression-editor.test.ts +124 -0
- package/src/components/expression-editor/components/path-preview.vue +1 -2
- package/src/components/expression-editor/components/variable-picker.vue +54 -13
- package/src/components/expression-editor/core/editor.ts +61 -0
- package/src/components/expression-editor/expression-editor.vue +58 -20
- package/src/components/expression-editor/style.scss +160 -76
- package/src/components/form/form.vue +0 -1
- package/src/components/form/style.scss +11 -4
- package/src/components/form-item/style.scss +16 -1
- package/src/components/index.ts +2 -0
- package/src/components/kanban/__test__/kanban.test.ts +212 -0
- package/src/components/kanban/di.ts +19 -0
- package/src/components/kanban/index.ts +1 -0
- package/src/components/kanban/kanban-column.vue +77 -0
- package/src/components/kanban/kanban.vue +81 -0
- package/src/components/kanban/style.scss +124 -0
- package/src/components/kanban/style.ts +1 -0
- package/src/components/multi-select/multi-select.vue +11 -2
- package/src/components/multi-select/style.scss +6 -0
- package/src/components/multi-tree-select/multi-tree-select.vue +58 -9
- package/src/components/multi-tree-select/style.scss +6 -0
- package/src/components/rich-text-editor/image-node.ts +193 -0
- package/src/components/rich-text-editor/rich-text-editor.vue +131 -29
- package/src/components/rich-text-editor/style.scss +7 -0
- package/src/components/rich-text-editor/toolbar.vue +21 -1
- package/src/components/select/__test__/select.test.ts +78 -0
- package/src/components/select/select.vue +13 -3
- package/src/components/select/style.scss +6 -0
- package/src/components/select/use-options.ts +25 -4
- package/src/components/tree-select/__test__/tree-select.test.ts +116 -0
- package/src/components/tree-select/style.scss +6 -0
- package/src/components/tree-select/tree-select.vue +63 -13
- package/src/types/dropdown.ts +10 -0
- package/src/types/index.ts +1 -0
- package/src/types/kanban.ts +63 -0
- package/src/types/multi-tree-select.ts +12 -1
- package/src/types/rich-text-editor.ts +14 -1
- package/src/types/tree-select.ts +12 -1
|
@@ -6,6 +6,9 @@ function useOptions(o$1) {
|
|
|
6
6
|
const { props } = o$1;
|
|
7
7
|
/** 筛选 */
|
|
8
8
|
const queryString = shallowRef("");
|
|
9
|
+
const loading = shallowRef(false);
|
|
10
|
+
/** 远程请求序号;响应返回时序号不一致说明已有更新的请求,结果作废 */
|
|
11
|
+
let remoteSeq = 0;
|
|
9
12
|
const remoteOptions = shallowRef([]);
|
|
10
13
|
const filteredOptions = shallowRef([]);
|
|
11
14
|
const tempOptions = shallowRef([]);
|
|
@@ -90,9 +93,16 @@ function useOptions(o$1) {
|
|
|
90
93
|
applyLocalFilter(qs, propsOptions);
|
|
91
94
|
}, 200);
|
|
92
95
|
const debouncedRemoteFilter = debounce(async (qs, propsOptions) => {
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
const seq = ++remoteSeq;
|
|
97
|
+
loading.value = true;
|
|
98
|
+
try {
|
|
99
|
+
const options = await propsOptions(qs);
|
|
100
|
+
if (seq !== remoteSeq || qs !== queryString.value) return;
|
|
101
|
+
remoteOptions.value = options ?? [];
|
|
102
|
+
setTempOption(qs, remoteOptions.value);
|
|
103
|
+
} finally {
|
|
104
|
+
if (seq === remoteSeq) loading.value = false;
|
|
105
|
+
}
|
|
96
106
|
}, 200);
|
|
97
107
|
watch([
|
|
98
108
|
queryString,
|
|
@@ -111,6 +121,7 @@ function useOptions(o$1) {
|
|
|
111
121
|
}, { immediate: true });
|
|
112
122
|
return {
|
|
113
123
|
queryString,
|
|
124
|
+
loading,
|
|
114
125
|
options,
|
|
115
126
|
allOptions,
|
|
116
127
|
temOptionsToCreatedOptions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-options.js","names":["o","chainObj"],"sources":["../../../src/components/select/use-options.ts"],"sourcesContent":["import { debounce, o as chainObj } from '@cat-kit/core'\nimport { fieldKey } from '@veltra/utils'\nimport { computed, shallowRef, watch, type ShallowRef, type ComputedRef } from 'vue'\n\nimport type { SelectProps } from '../../types'\n\ninterface Options {\n props: SelectProps\n}\n\ninterface UseOptionsReturned {\n /** 查询字符串 */\n queryString: ShallowRef<string>\n /** 选项 */\n options: ComputedRef<Record<string, any>[]>\n /** 所有选项 */\n allOptions: ComputedRef<Record<string, any>[]>\n /** 将临时选项转换为创建的选项 */\n temOptionsToCreatedOptions: () => void\n /** 清空用户创建的选项 */\n clearCreatedOptions: () => void\n}\n\n// 允许创建的实现\n// 1. 在过滤时将选项加入待选列表中\n// 2. 如果选择了该临时选项,则取消该选项的临时标记并并入已创建列表\n// 3. 多次创建累计保留,已创建项参与后续过滤匹配\n\nexport function useOptions(o: Options): UseOptionsReturned {\n const { props } = o\n\n /** 筛选 */\n const queryString = shallowRef('')\n\n const remoteOptions = shallowRef<Record<string, any>[]>([])\n const filteredOptions = shallowRef<Record<string, any>[]>([])\n // 临时选项\n const tempOptions = shallowRef<({ __isTemp: true } & Record<string, any>)[]>([])\n // 创建的选项\n const createdOptions = shallowRef<({ __isTemp: false } & Record<string, any>)[]>([])\n\n function getSourceOptions(propsOptions: SelectProps['options']) {\n if (typeof propsOptions === 'function') return remoteOptions.value\n return [...createdOptions.value, ...(propsOptions ?? [])]\n }\n\n /** 无查询时同步展示完整列表(含已创建项),避免选择后等高亮索引错位 */\n function resetToSourceOptions() {\n const sourceOptions = getSourceOptions(props.options)\n if (typeof props.options === 'function') {\n setTempOption('', remoteOptions.value)\n return\n }\n filteredOptions.value = sourceOptions\n tempOptions.value = []\n }\n\n function temOptionsToCreatedOptions() {\n if (!tempOptions.value.length) return\n\n createdOptions.value = [\n ...createdOptions.value,\n ...tempOptions.value.map((item) => {\n return { ...item, __isTemp: false as const }\n })\n ]\n // 立即清掉临时项并回到完整列表,不等待过滤防抖\n resetToSourceOptions()\n }\n\n function clearCreatedOptions() {\n createdOptions.value = []\n resetToSourceOptions()\n }\n\n const setTempOption = (qs: string, options?: Record<string, any>[]) => {\n if (!qs?.trim() || !props.creatable) {\n tempOptions.value = []\n return\n }\n const labelKey = fieldKey(props.labelKey, 'label')\n const valueKey = fieldKey(props.valueKey, 'value')\n const exactMatch = options\n ? options.some((option) => {\n return chainObj(option).get(labelKey) === qs\n })\n : false\n\n tempOptions.value = exactMatch ? [] : [{ [labelKey]: qs, [valueKey]: qs, __isTemp: true }]\n }\n\n const allOptions = computed(() => {\n const { options } = props\n if (typeof options === 'function') return remoteOptions.value\n return [...createdOptions.value, ...(options ?? [])]\n })\n\n /**\n * 展示的选项\n * @description 已创建选项并入过滤数据源参与匹配;临时选项(待创建)固定置顶\n */\n const options = computed(() => {\n const { options } = props\n\n if (typeof options === 'function') return remoteOptions.value\n\n return [...tempOptions.value, ...filteredOptions.value]\n })\n\n const applyLocalFilter = (qs: string, propsOptions: Record<string, any>[] | undefined) => {\n const labelKey = fieldKey(props.labelKey, 'label')\n const sourceOptions = [...createdOptions.value, ...(propsOptions ?? [])]\n\n if (!qs) {\n filteredOptions.value = sourceOptions\n setTempOption(qs, filteredOptions.value)\n return\n }\n\n const _filteredOptions = sourceOptions.filter((item) => {\n return chainObj(item).get(labelKey)?.includes(qs) ?? false\n })\n\n setTempOption(qs, _filteredOptions)\n filteredOptions.value = _filteredOptions\n }\n\n // 仅对「有查询词」的本地过滤做防抖;清空查询同步生效,避免选中后列表延迟重建\n const debouncedLocalFilter = debounce(\n (qs: string, propsOptions: Record<string, any>[] | undefined) => {\n // 防抖回调可能晚于清空查询到达,以当前 queryString 为准\n if (!queryString.value) {\n applyLocalFilter('', propsOptions)\n return\n }\n applyLocalFilter(qs, propsOptions)\n },\n 200\n )\n\n const debouncedRemoteFilter = debounce(async (qs: string, propsOptions: Function) => {\n const options = await propsOptions(queryString.value)\n
|
|
1
|
+
{"version":3,"file":"use-options.js","names":["o","chainObj"],"sources":["../../../src/components/select/use-options.ts"],"sourcesContent":["import { debounce, o as chainObj } from '@cat-kit/core'\nimport { fieldKey } from '@veltra/utils'\nimport { computed, shallowRef, watch, type ShallowRef, type ComputedRef } from 'vue'\n\nimport type { SelectProps } from '../../types'\n\ninterface Options {\n props: SelectProps\n}\n\ninterface UseOptionsReturned {\n /** 查询字符串 */\n queryString: ShallowRef<string>\n /** 远程搜索加载中 */\n loading: ShallowRef<boolean>\n /** 选项 */\n options: ComputedRef<Record<string, any>[]>\n /** 所有选项 */\n allOptions: ComputedRef<Record<string, any>[]>\n /** 将临时选项转换为创建的选项 */\n temOptionsToCreatedOptions: () => void\n /** 清空用户创建的选项 */\n clearCreatedOptions: () => void\n}\n\n// 允许创建的实现\n// 1. 在过滤时将选项加入待选列表中\n// 2. 如果选择了该临时选项,则取消该选项的临时标记并并入已创建列表\n// 3. 多次创建累计保留,已创建项参与后续过滤匹配\n\nexport function useOptions(o: Options): UseOptionsReturned {\n const { props } = o\n\n /** 筛选 */\n const queryString = shallowRef('')\n\n const loading = shallowRef(false)\n /** 远程请求序号;响应返回时序号不一致说明已有更新的请求,结果作废 */\n let remoteSeq = 0\n\n const remoteOptions = shallowRef<Record<string, any>[]>([])\n const filteredOptions = shallowRef<Record<string, any>[]>([])\n // 临时选项\n const tempOptions = shallowRef<({ __isTemp: true } & Record<string, any>)[]>([])\n // 创建的选项\n const createdOptions = shallowRef<({ __isTemp: false } & Record<string, any>)[]>([])\n\n function getSourceOptions(propsOptions: SelectProps['options']) {\n if (typeof propsOptions === 'function') return remoteOptions.value\n return [...createdOptions.value, ...(propsOptions ?? [])]\n }\n\n /** 无查询时同步展示完整列表(含已创建项),避免选择后等高亮索引错位 */\n function resetToSourceOptions() {\n const sourceOptions = getSourceOptions(props.options)\n if (typeof props.options === 'function') {\n setTempOption('', remoteOptions.value)\n return\n }\n filteredOptions.value = sourceOptions\n tempOptions.value = []\n }\n\n function temOptionsToCreatedOptions() {\n if (!tempOptions.value.length) return\n\n createdOptions.value = [\n ...createdOptions.value,\n ...tempOptions.value.map((item) => {\n return { ...item, __isTemp: false as const }\n })\n ]\n // 立即清掉临时项并回到完整列表,不等待过滤防抖\n resetToSourceOptions()\n }\n\n function clearCreatedOptions() {\n createdOptions.value = []\n resetToSourceOptions()\n }\n\n const setTempOption = (qs: string, options?: Record<string, any>[]) => {\n if (!qs?.trim() || !props.creatable) {\n tempOptions.value = []\n return\n }\n const labelKey = fieldKey(props.labelKey, 'label')\n const valueKey = fieldKey(props.valueKey, 'value')\n const exactMatch = options\n ? options.some((option) => {\n return chainObj(option).get(labelKey) === qs\n })\n : false\n\n tempOptions.value = exactMatch ? [] : [{ [labelKey]: qs, [valueKey]: qs, __isTemp: true }]\n }\n\n const allOptions = computed(() => {\n const { options } = props\n if (typeof options === 'function') return remoteOptions.value\n return [...createdOptions.value, ...(options ?? [])]\n })\n\n /**\n * 展示的选项\n * @description 已创建选项并入过滤数据源参与匹配;临时选项(待创建)固定置顶\n */\n const options = computed(() => {\n const { options } = props\n\n if (typeof options === 'function') return remoteOptions.value\n\n return [...tempOptions.value, ...filteredOptions.value]\n })\n\n const applyLocalFilter = (qs: string, propsOptions: Record<string, any>[] | undefined) => {\n const labelKey = fieldKey(props.labelKey, 'label')\n const sourceOptions = [...createdOptions.value, ...(propsOptions ?? [])]\n\n if (!qs) {\n filteredOptions.value = sourceOptions\n setTempOption(qs, filteredOptions.value)\n return\n }\n\n const _filteredOptions = sourceOptions.filter((item) => {\n return chainObj(item).get(labelKey)?.includes(qs) ?? false\n })\n\n setTempOption(qs, _filteredOptions)\n filteredOptions.value = _filteredOptions\n }\n\n // 仅对「有查询词」的本地过滤做防抖;清空查询同步生效,避免选中后列表延迟重建\n const debouncedLocalFilter = debounce(\n (qs: string, propsOptions: Record<string, any>[] | undefined) => {\n // 防抖回调可能晚于清空查询到达,以当前 queryString 为准\n if (!queryString.value) {\n applyLocalFilter('', propsOptions)\n return\n }\n applyLocalFilter(qs, propsOptions)\n },\n 200\n )\n\n const debouncedRemoteFilter = debounce(async (qs: string, propsOptions: Function) => {\n const seq = ++remoteSeq\n loading.value = true\n try {\n const options = await propsOptions(qs)\n // 响应到达时查询词可能已变化或已有更新的请求,过期结果直接丢弃\n if (seq !== remoteSeq || qs !== queryString.value) return\n remoteOptions.value = options ?? []\n setTempOption(qs, remoteOptions.value)\n } finally {\n if (seq === remoteSeq) loading.value = false\n }\n }, 200)\n\n watch(\n [queryString, () => props.options, createdOptions],\n ([qs, propsOptions]) => {\n if (typeof propsOptions === 'function') {\n debouncedRemoteFilter(qs, propsOptions)\n return\n }\n\n if (!qs) {\n applyLocalFilter('', propsOptions)\n return\n }\n\n debouncedLocalFilter(qs, propsOptions)\n },\n { immediate: true }\n )\n\n return {\n queryString,\n loading,\n options,\n allOptions,\n temOptionsToCreatedOptions,\n clearCreatedOptions\n }\n}\n"],"mappings":";;;;AA8BA,SAAgB,WAAW,KAAgC;CACzD,MAAM,EAAE,UAAUA;;CAGlB,MAAM,cAAc,WAAW,EAAE;CAEjC,MAAM,UAAU,WAAW,KAAK;;CAEhC,IAAI,YAAY;CAEhB,MAAM,gBAAgB,WAAkC,CAAC,CAAC;CAC1D,MAAM,kBAAkB,WAAkC,CAAC,CAAC;CAE5D,MAAM,cAAc,WAAyD,CAAC,CAAC;CAE/E,MAAM,iBAAiB,WAA0D,CAAC,CAAC;CAEnF,SAAS,iBAAiB,cAAsC;EAC9D,IAAI,OAAO,iBAAiB,YAAY,OAAO,cAAc;EAC7D,OAAO,CAAC,GAAG,eAAe,OAAO,GAAI,gBAAgB,CAAC,CAAE;CAC1D;;CAGA,SAAS,uBAAuB;EAC9B,MAAM,gBAAgB,iBAAiB,MAAM,OAAO;EACpD,IAAI,OAAO,MAAM,YAAY,YAAY;GACvC,cAAc,IAAI,cAAc,KAAK;GACrC;EACF;EACA,gBAAgB,QAAQ;EACxB,YAAY,QAAQ,CAAC;CACvB;CAEA,SAAS,6BAA6B;EACpC,IAAI,CAAC,YAAY,MAAM,QAAQ;EAE/B,eAAe,QAAQ,CACrB,GAAG,eAAe,OAClB,GAAG,YAAY,MAAM,KAAK,SAAS;GACjC,OAAO;IAAE,GAAG;IAAM,UAAU;GAAe;EAC7C,CAAC,CACH;EAEA,qBAAqB;CACvB;CAEA,SAAS,sBAAsB;EAC7B,eAAe,QAAQ,CAAC;EACxB,qBAAqB;CACvB;CAEA,MAAM,iBAAiB,IAAY,YAAoC;EACrE,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,MA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CACnC,GACA,GACF;CAEA,MAAM,wBAAwB,SAAS,OAAO,IAAY,iBAA2B;EACnF,MAAM,MAAM,EAAE;EACd,QAAQ,QAAQ;EAChB,IAAI;GACF,MAAM,UAAU,MAAM,aAAa,EAAE;GAErC,IAAI,QAAQ,aAAa,OAAO,YAAY,OAAO;GACnD,cAAc,QAAQ,WAAW,CAAC;GAClC,cAAc,IAAI,cAAc,KAAK;EACvC,UAAU;GACR,IAAI,QAAQ,WAAW,QAAQ,QAAQ;EACzC;CACF,GAAG,GAAG;CAEN,MACE;EAAC;QAAmB,MAAM;EAAS;CAAc,IAChD,CAAC,IAAI,kBAAkB;EACtB,IAAI,OAAO,iBAAiB,YAAY;GACtC,sBAAsB,IAAI,YAAY;GACtC;EACF;EAEA,IAAI,CAAC,IAAI;GACP,iBAAiB,IAAI,YAAY;GACjC;EACF;EAEA,qBAAqB,IAAI,YAAY;CACvC,GACA,EAAE,WAAW,KAAK,CACpB;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -50,6 +50,13 @@
|
|
|
50
50
|
.u-tree-select__content-tree {
|
|
51
51
|
max-height: 240px;
|
|
52
52
|
}
|
|
53
|
+
.u-tree-select__loading {
|
|
54
|
+
display: flex;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
align-items: center;
|
|
57
|
+
flex-wrap: nowrap;
|
|
58
|
+
min-height: 240px;
|
|
59
|
+
}
|
|
53
60
|
.u-tree-select__panel--small .u-tree-select__content-tree {
|
|
54
61
|
padding: var(--u-gap-small);
|
|
55
62
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import _sfc_main$1 from "../icon/icon.js";
|
|
2
2
|
import _sfc_main$2 from "../dropdown/dropdown.js";
|
|
3
3
|
import input_default from "../input/input.js";
|
|
4
|
-
import _sfc_main$3 from "../
|
|
4
|
+
import _sfc_main$3 from "../loading/loading.js";
|
|
5
|
+
import _sfc_main$4 from "../tree/tree.js";
|
|
5
6
|
import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, createSlots, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, nextTick, normalizeClass, openBlock, renderSlot, shallowRef, toDisplayString, unref, useModel, useSlots, useTemplateRef, watch, withCtx, withModifiers } from "vue";
|
|
6
7
|
import { useFormFallbackProps, useUserAction } from "@veltra/compositions";
|
|
7
8
|
import { FORM_EMPTY_CONTENT, bem, fieldKey, injectFormContext } from "@veltra/utils";
|
|
8
9
|
import { ArrowDown, Close } from "@veltra/icons/normal";
|
|
9
|
-
import { dfs, o } from "@cat-kit/core";
|
|
10
|
+
import { debounce, dfs, o } from "@cat-kit/core";
|
|
10
11
|
//#region src/components/tree-select/tree-select.vue
|
|
11
12
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
12
13
|
name: "UTreeSelect",
|
|
@@ -14,6 +15,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
14
15
|
__name: "tree-select",
|
|
15
16
|
props: /*@__PURE__*/ mergeModels({
|
|
16
17
|
modelValue: {},
|
|
18
|
+
data: {},
|
|
17
19
|
placeholder: { default: "请选择" },
|
|
18
20
|
clearable: {
|
|
19
21
|
type: Boolean,
|
|
@@ -49,7 +51,6 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
49
51
|
labelKey: { default: "label" },
|
|
50
52
|
valueKey: { default: "value" },
|
|
51
53
|
childrenKey: {},
|
|
52
|
-
data: {},
|
|
53
54
|
disabledNode: {},
|
|
54
55
|
checkOnClickNode: { type: Boolean },
|
|
55
56
|
checkStrictly: { type: Boolean },
|
|
@@ -77,6 +78,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
77
78
|
"disabled",
|
|
78
79
|
"label",
|
|
79
80
|
"readonly",
|
|
81
|
+
"data",
|
|
80
82
|
"contentClass",
|
|
81
83
|
"contentStyle",
|
|
82
84
|
"minWidth",
|
|
@@ -86,11 +88,37 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
86
88
|
const cls = bem("tree-select");
|
|
87
89
|
const labelKey = computed(() => fieldKey(props.labelKey, "label"));
|
|
88
90
|
const valueKey = computed(() => fieldKey(props.valueKey, "value"));
|
|
89
|
-
|
|
91
|
+
/** 是否可搜索:显式声明或数据源为远程函数 */
|
|
92
|
+
const filterable = computed(() => props.filterable || typeof props.data === "function");
|
|
93
|
+
/** 过滤 */
|
|
90
94
|
const qs = shallowRef("");
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
const treeRef = shallowRef();
|
|
96
|
+
/** 远程搜索返回的树数据 */
|
|
97
|
+
const remoteData = shallowRef();
|
|
98
|
+
/** 面板渲染的树数据:data 为函数时来自远程搜索,否则为静态数据 */
|
|
99
|
+
const treeData = computed(() => typeof props.data === "function" ? remoteData.value : props.data);
|
|
100
|
+
const remoteLoading = shallowRef(false);
|
|
101
|
+
/** 远程请求序号;响应返回时序号不一致说明已有更新的请求,结果作废 */
|
|
102
|
+
let remoteSeq = 0;
|
|
103
|
+
const debouncedRemoteSearch = debounce(async (query, dataFn) => {
|
|
104
|
+
const seq = ++remoteSeq;
|
|
105
|
+
remoteLoading.value = true;
|
|
106
|
+
try {
|
|
107
|
+
const data = await dataFn(query);
|
|
108
|
+
if (seq !== remoteSeq || query !== qs.value) return;
|
|
109
|
+
remoteData.value = data ?? [];
|
|
110
|
+
if (query) nextTick(() => treeRef.value?.expandAll());
|
|
111
|
+
} finally {
|
|
112
|
+
if (seq === remoteSeq) remoteLoading.value = false;
|
|
113
|
+
}
|
|
114
|
+
}, 200);
|
|
115
|
+
watch([qs, () => props.data], ([query, data]) => {
|
|
116
|
+
if (typeof data === "function") {
|
|
117
|
+
debouncedRemoteSearch(query, data);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
treeRef.value?.filter(query);
|
|
121
|
+
}, { immediate: true });
|
|
94
122
|
const model = useModel(__props, "modelValue");
|
|
95
123
|
/** 内部展示文案,仅由 data 推导;通过 update:text 单向通知父级 */
|
|
96
124
|
const label = shallowRef();
|
|
@@ -110,17 +138,17 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
110
138
|
}
|
|
111
139
|
/** 触发输入框的值:查询态下承载查询串,否则展示选中标签 */
|
|
112
140
|
const inputValue = computed(() => {
|
|
113
|
-
if (
|
|
141
|
+
if (filterable.value && querying.value) return qs.value;
|
|
114
142
|
return model.value || model.value === 0 ? label.value : void 0;
|
|
115
143
|
});
|
|
116
144
|
/** 查询态下已选标签降级为占位提示 */
|
|
117
145
|
const inputPlaceholder = computed(() => {
|
|
118
146
|
const display = model.value || model.value === 0 ? label.value : void 0;
|
|
119
|
-
if (
|
|
147
|
+
if (filterable.value && querying.value && display) return display;
|
|
120
148
|
return props.placeholder;
|
|
121
149
|
});
|
|
122
150
|
function handleQueryInput(value) {
|
|
123
|
-
if (!
|
|
151
|
+
if (!filterable.value) return;
|
|
124
152
|
qs.value = value;
|
|
125
153
|
}
|
|
126
154
|
const hovered = shallowRef(false);
|
|
@@ -135,20 +163,19 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
135
163
|
* 非输入区域(箭头、留白)放行,维持原开合行为。
|
|
136
164
|
*/
|
|
137
165
|
function handleTriggerClickCapture(e) {
|
|
138
|
-
if (!
|
|
166
|
+
if (!filterable.value || disabled.value) return;
|
|
139
167
|
if (!(e.target instanceof HTMLInputElement)) return;
|
|
140
168
|
e.stopPropagation();
|
|
141
169
|
if (!dropdownVisible.value) dropdownRef.value?.open();
|
|
142
170
|
}
|
|
143
171
|
watch(dropdownVisible, (visible) => {
|
|
144
|
-
if (visible &&
|
|
172
|
+
if (visible && filterable.value) {
|
|
145
173
|
querying.value = true;
|
|
146
174
|
nextTick(() => inputRef.value?.el?.focus());
|
|
147
175
|
} else if (!visible) querying.value = false;
|
|
148
176
|
});
|
|
149
177
|
const { formProps } = injectFormContext();
|
|
150
178
|
const { size, disabled, readonly } = useFormFallbackProps([formProps ?? {}, props]);
|
|
151
|
-
const treeRef = shallowRef();
|
|
152
179
|
const dropdownRef = shallowRef();
|
|
153
180
|
const { userAction, isUserActive } = useUserAction();
|
|
154
181
|
/** 清空 */
|
|
@@ -159,7 +186,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
159
186
|
emit("change", void 0);
|
|
160
187
|
});
|
|
161
188
|
/** 外部回显:按 data 查找 label(O(n));用户动作期内跳过 */
|
|
162
|
-
watch([
|
|
189
|
+
watch([treeData, model], ([data, modelVal]) => {
|
|
163
190
|
if (isUserActive()) return;
|
|
164
191
|
if (!data?.length || modelVal === void 0 || modelVal === null || modelVal === "") {
|
|
165
192
|
setLabel(void 0);
|
|
@@ -222,7 +249,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
222
249
|
clearable: false,
|
|
223
250
|
"model-value": inputValue.value,
|
|
224
251
|
"onUpdate:modelValue": handleQueryInput,
|
|
225
|
-
"native-readonly": !
|
|
252
|
+
"native-readonly": !filterable.value || !querying.value,
|
|
226
253
|
onClickCapture: handleTriggerClickCapture
|
|
227
254
|
}, createSlots({
|
|
228
255
|
suffix: withCtx(() => [createVNode(Transition, {
|
|
@@ -258,7 +285,11 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
258
285
|
"model-value",
|
|
259
286
|
"native-readonly"
|
|
260
287
|
])]),
|
|
261
|
-
content: withCtx(() => [createCommentVNode(" 菜单列表 "),
|
|
288
|
+
content: withCtx(() => [createCommentVNode(" 菜单列表 "), remoteLoading.value ? (openBlock(), createElementBlock("div", {
|
|
289
|
+
key: 0,
|
|
290
|
+
class: normalizeClass(unref(cls).e("loading"))
|
|
291
|
+
}, [createVNode(unref(_sfc_main$3), { type: "dual-ring" })], 2)) : (openBlock(), createBlock(unref(_sfc_main$4), mergeProps({ key: 1 }, treeProps.value, {
|
|
292
|
+
data: treeData.value,
|
|
262
293
|
selected: model.value,
|
|
263
294
|
"onUpdate:selected": unref(handleSelect),
|
|
264
295
|
ref_key: "treeRef",
|
|
@@ -268,10 +299,11 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
268
299
|
slots,
|
|
269
300
|
"scroll-to-view": ""
|
|
270
301
|
}), null, 16, [
|
|
302
|
+
"data",
|
|
271
303
|
"selected",
|
|
272
304
|
"onUpdate:selected",
|
|
273
305
|
"class"
|
|
274
|
-
])]),
|
|
306
|
+
]))]),
|
|
275
307
|
_: 3
|
|
276
308
|
}, 16, [
|
|
277
309
|
"class",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-select.js","names":["$attrs","$slots"],"sources":["../../../src/components/tree-select/tree-select.vue"],"sourcesContent":["<template>\n <u-dropdown\n v-if=\"!readonly\"\n v-bind=\"$attrs\"\n :class=\"[cls.b, bem.is('disabled', disabled)]\"\n trigger=\"click\"\n :content-class=\"[cls.e('panel'), cls.em('panel', size), contentClass]\"\n :content-style=\"contentStyle\"\n ref=\"dropdownRef\"\n v-model:visible=\"dropdownVisible\"\n :min-width=\"minWidth\"\n :width=\"width\"\n :disabled=\"disabled\"\n @update:visible=\"handleDropdownVisible\"\n @mouseenter=\"hovered = true\"\n @mouseleave=\"hovered = false\"\n >\n <template #trigger>\n <u-input\n ref=\"inputRef\"\n :size=\"size\"\n :disabled=\"disabled\"\n :placeholder=\"inputPlaceholder\"\n :clearable=\"false\"\n :model-value=\"inputValue\"\n @update:model-value=\"handleQueryInput\"\n :native-readonly=\"!filterable || !querying\"\n @click.capture=\"handleTriggerClickCapture\"\n >\n <template #prefix v-if=\"$slots.prefix\">\n <slot name=\"prefix\" />\n </template>\n <template #suffix>\n <transition name=\"zoom-in\" mode=\"out-in\">\n <u-icon\n v-if=\"showClear\"\n :class=\"cls.e('clear')\"\n title=\"清除\"\n key=\"clear\"\n @click.stop=\"handleClear\"\n >\n <Close />\n </u-icon>\n <u-icon v-else :class=\"cls.e('arrow')\" key=\"arrow\"><ArrowDown /></u-icon>\n </transition>\n </template>\n </u-input>\n </template>\n <template #content>\n <!-- 菜单列表 -->\n\n <u-tree\n v-bind=\"treeProps\"\n :selected=\"model\"\n @update:selected=\"handleSelect\"\n ref=\"treeRef\"\n selectable\n :class=\"cls.e('content-tree')\"\n :slots=\"slots\"\n scroll-to-view\n />\n </template>\n </u-dropdown>\n\n <template v-else>\n {{ label || FORM_EMPTY_CONTENT }}\n </template>\n</template>\n\n<script lang=\"ts\" setup>\nimport { dfs, o } from '@cat-kit/core'\nimport { useFormFallbackProps, useUserAction } from '@veltra/compositions'\nimport { ArrowDown, Close } from '@veltra/icons/normal'\nimport { bem, fieldKey, FORM_EMPTY_CONTENT } from '@veltra/utils'\nimport { injectFormContext } from '@veltra/utils'\nimport { computed, nextTick, shallowRef, useTemplateRef, watch } from 'vue'\n\nimport type { TreeSelectProps, TreeSelectEmits, TreeExposed, InputExposed } from '../../types'\nimport { UDropdown } from '../dropdown'\nimport { UIcon } from '../icon'\nimport { UInput } from '../input'\nimport { UTree } from '../tree'\nimport type { TreeSlotsScope } from '../tree/di'\n\ndefineOptions({ name: 'UTreeSelect', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<TreeSelectProps>(), {\n labelKey: 'label',\n valueKey: 'value',\n placeholder: '请选择',\n expandAll: false,\n clearable: true,\n disabled: undefined,\n readonly: undefined,\n filterable: false,\n minWidth: '280px'\n})\n\nconst emit = defineEmits<TreeSelectEmits>()\n\nconst slots = defineSlots<{\n /** 默认插槽 */\n default?: (props: TreeSlotsScope) => any\n /** 前缀插槽 */\n prefix?: () => any\n}>()\n\nconst treeProps = computed(() => {\n return o(props as Record<string, any>).omit([\n 'tips',\n 'field',\n 'placeholder',\n 'disabled',\n 'label',\n 'readonly',\n 'contentClass',\n 'contentStyle',\n 'minWidth',\n 'width'\n ])\n})\n\nconst cls = bem('tree-select')\n\nconst labelKey = computed(() => fieldKey(props.labelKey, 'label'))\nconst valueKey = computed(() => fieldKey(props.valueKey, 'value'))\n\n/**过滤 */\nconst qs = shallowRef('')\nwatch(qs, (qs) => {\n treeRef.value?.filter(qs)\n})\n\nconst model = defineModel<string | number>()\n\n/** 内部展示文案,仅由 data 推导;通过 update:text 单向通知父级 */\nconst label = shallowRef<string>()\n\nconst dropdownVisible = shallowRef(false)\n\n/**\n * 是否处于查询态:决定触发输入框显示查询串还是选中标签。\n * 与面板可见状态解耦 —— 选择后立即退出查询态,\n * 不等面板关闭动画结束(否则显示值会延迟一个动画时长才恢复)。\n */\nconst querying = shallowRef(false)\n\nconst inputRef = useTemplateRef<InputExposed>('inputRef')\n\n/** 更新内部文案;值变化时单向 emit update:text */\nfunction setLabel(next?: string) {\n if (label.value === next) return\n label.value = next\n emit('update:text', next)\n}\n\n/** 触发输入框的值:查询态下承载查询串,否则展示选中标签 */\nconst inputValue = computed(() => {\n if (props.filterable && querying.value) return qs.value\n return model.value || model.value === 0 ? label.value : undefined\n})\n\n/** 查询态下已选标签降级为占位提示 */\nconst inputPlaceholder = computed(() => {\n const display = model.value || model.value === 0 ? label.value : undefined\n if (props.filterable && querying.value && display) {\n return display\n }\n return props.placeholder\n})\n\nfunction handleQueryInput(value: string) {\n if (!props.filterable) return\n qs.value = value\n}\n\nconst hovered = shallowRef(false)\n\n/** 悬停且存在选中值时展示清除按钮(替代下拉箭头) */\nconst showClear = computed(() => {\n if (!props.clearable || disabled.value || !hovered.value) return false\n return !!(model.value || model.value === 0 ? label.value : undefined)\n})\n\n/**\n * 过滤模式下拦截输入区域的点击:\n * 阻止 dropdown 的 trigger 开合切换,保持面板展开以不中断输入。\n * 非输入区域(箭头、留白)放行,维持原开合行为。\n */\nfunction handleTriggerClickCapture(e: MouseEvent) {\n if (!props.filterable || disabled.value) return\n if (!(e.target instanceof HTMLInputElement)) return\n\n e.stopPropagation()\n if (!dropdownVisible.value) dropdownRef.value?.open()\n}\n\nwatch(dropdownVisible, (visible) => {\n if (visible && props.filterable) {\n // 面板展开后进入查询态并聚焦输入框,可以立即输入查询\n querying.value = true\n nextTick(() => inputRef.value?.el?.focus())\n } else if (!visible) {\n querying.value = false\n }\n})\n\nconst { formProps } = injectFormContext()\n\nconst { size, disabled, readonly } = useFormFallbackProps([formProps ?? {}, props])\n\nconst treeRef = shallowRef<TreeExposed>()\n\nconst dropdownRef = shallowRef<InstanceType<typeof UDropdown>>()\n\nconst { userAction, isUserActive } = useUserAction()\n\n/** 清空 */\nconst handleClear = userAction(() => {\n model.value = ''\n setLabel(undefined)\n emit('clear')\n emit('change', undefined)\n})\n\n/** 外部回显:按 data 查找 label(O(n));用户动作期内跳过 */\nwatch(\n [() => props.data, model],\n ([data, modelVal]) => {\n if (isUserActive()) return\n if (!data?.length || modelVal === undefined || modelVal === null || modelVal === '') {\n setLabel(undefined)\n return\n }\n\n let nextLabel: string | undefined\n const childrenKey = props.childrenKey ?? 'children'\n data.some((item) => {\n let founded = false\n dfs(\n item,\n (v) => {\n if (v[valueKey.value] === modelVal) {\n nextLabel = v[labelKey.value]\n founded = true\n return true\n }\n },\n childrenKey\n )\n\n return founded\n })\n setLabel(nextLabel)\n },\n { immediate: true }\n)\n\n/** 用户选择:O(1) 写入值与文案,跳过 data 回显查找 */\nconst handleSelect = userAction(\n (selected?: string | number, selectedData?: Record<string, any>) => {\n model.value = selected ?? ''\n\n if (selectedData) {\n setLabel(o(selectedData).get(labelKey.value))\n } else {\n setLabel(undefined)\n }\n\n emit('change', selectedData)\n // 立即退出查询态,输入框同步恢复显示选中标签\n querying.value = false\n qs.value = ''\n dropdownRef.value?.close()\n }\n)\nconst handleDropdownVisible = (visible: boolean) => {\n if (!visible) {\n qs.value = ''\n }\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsFA,MAAM,QAAQ;EAYd,MAAM,OAAO;EAEb,MAAM,QAAQ,SAAA;EAOd,MAAM,YAAY,eAAe;GAC/B,OAAO,EAAE,KAA4B,CAAC,CAAC,KAAK;IAC1C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF,CAAC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AA,GAAA;OANN,OAAK,eAAE,MAAA,GAAA,CAAG,CAAC,EAAC,OAAA,CAAA;OACb,OAAM;OACN,KAAI;OACH,SAAK,cAAO,MAAA,WAAA,GAAW,CAAA,MAAA,CAAA;;OAExB,SAAA,cAAS,CAAT,YAAS,MAAA,KAAA,CAAA,CAAA,CAAA;;MAEX,GAAA,GAAA,CAAA,SAAA,SAAA,CAAA,MAAA,UAAA,GAAA,YAAyE,MAAA,WAAA,GAAA;OAAzD,OAAK,eAAE,MAAA,GAAA,CAAG,CAAC,EAAC,OAAA,CAAA;OAAW,KAAI;;OAAQ,SAAA,cAAa,CAAb,YAAa,MAAA,SAAA,CAAA,CAAA,CAAA;;;;;;IAd5CC,GAAAA,CAAAA,KAAAA,OAAO,SAAA;KAApB,MAAA;KACT,IAAA,cAAsB,CAAtB,WAAsB,KAAA,QAAA,QAAA,CAAA,CAAA;;;;;;;;;IAkBjB,SAAO,cACH,CAAb,mBAAA,QAAA,GAEA,YASE,MAAA,WAAA,GATF,WACU,UAQR,OARiB;KAChB,UAAU,MAAA;KACV,qBAAiB,MAAA,YAAA;KACd,SAAA;KAAJ,KAAI;KACJ,YAAA;KACC,OAAO,MAAA,GAAA,CAAG,CAAC,EAAC,cAAA;KACL;KACR,kBAAA;;;;;;;;;;;;;;;GAKN,CAAA,MAAA,UAAA,GAAA,mBAEW,UAAA,EAAA,KAAA,EAAA,GAAA,CADN,gBAAA,gBAAA,MAAA,SAAS,MAAA,kBAAA,CAAkB,GAAA,CAAA,CAAA,GAAA,EAAA"}
|
|
1
|
+
{"version":3,"file":"tree-select.js","names":["$attrs","$slots"],"sources":["../../../src/components/tree-select/tree-select.vue"],"sourcesContent":["<template>\n <u-dropdown\n v-if=\"!readonly\"\n v-bind=\"$attrs\"\n :class=\"[cls.b, bem.is('disabled', disabled)]\"\n trigger=\"click\"\n :content-class=\"[cls.e('panel'), cls.em('panel', size), contentClass]\"\n :content-style=\"contentStyle\"\n ref=\"dropdownRef\"\n v-model:visible=\"dropdownVisible\"\n :min-width=\"minWidth\"\n :width=\"width\"\n :disabled=\"disabled\"\n @update:visible=\"handleDropdownVisible\"\n @mouseenter=\"hovered = true\"\n @mouseleave=\"hovered = false\"\n >\n <template #trigger>\n <u-input\n ref=\"inputRef\"\n :size=\"size\"\n :disabled=\"disabled\"\n :placeholder=\"inputPlaceholder\"\n :clearable=\"false\"\n :model-value=\"inputValue\"\n @update:model-value=\"handleQueryInput\"\n :native-readonly=\"!filterable || !querying\"\n @click.capture=\"handleTriggerClickCapture\"\n >\n <template #prefix v-if=\"$slots.prefix\">\n <slot name=\"prefix\" />\n </template>\n <template #suffix>\n <transition name=\"zoom-in\" mode=\"out-in\">\n <u-icon\n v-if=\"showClear\"\n :class=\"cls.e('clear')\"\n title=\"清除\"\n key=\"clear\"\n @click.stop=\"handleClear\"\n >\n <Close />\n </u-icon>\n <u-icon v-else :class=\"cls.e('arrow')\" key=\"arrow\"><ArrowDown /></u-icon>\n </transition>\n </template>\n </u-input>\n </template>\n <template #content>\n <!-- 菜单列表 -->\n\n <div v-if=\"remoteLoading\" :class=\"cls.e('loading')\">\n <ULoading type=\"dual-ring\" />\n </div>\n <u-tree\n v-else\n v-bind=\"treeProps\"\n :data=\"treeData\"\n :selected=\"model\"\n @update:selected=\"handleSelect\"\n ref=\"treeRef\"\n selectable\n :class=\"cls.e('content-tree')\"\n :slots=\"slots\"\n scroll-to-view\n />\n </template>\n </u-dropdown>\n\n <template v-else>\n {{ label || FORM_EMPTY_CONTENT }}\n </template>\n</template>\n\n<script lang=\"ts\" setup>\nimport { debounce, dfs, o } from '@cat-kit/core'\nimport { useFormFallbackProps, useUserAction } from '@veltra/compositions'\nimport { ArrowDown, Close } from '@veltra/icons/normal'\nimport { bem, fieldKey, FORM_EMPTY_CONTENT } from '@veltra/utils'\nimport { injectFormContext } from '@veltra/utils'\nimport { computed, nextTick, shallowRef, useTemplateRef, watch } from 'vue'\n\nimport type { TreeSelectProps, TreeSelectEmits, TreeExposed, InputExposed } from '../../types'\nimport { UDropdown } from '../dropdown'\nimport { UIcon } from '../icon'\nimport { UInput } from '../input'\nimport { ULoading } from '../loading'\nimport { UTree } from '../tree'\nimport type { TreeSlotsScope } from '../tree/di'\n\ndefineOptions({ name: 'UTreeSelect', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<TreeSelectProps>(), {\n labelKey: 'label',\n valueKey: 'value',\n placeholder: '请选择',\n expandAll: false,\n clearable: true,\n disabled: undefined,\n readonly: undefined,\n filterable: false,\n minWidth: '280px'\n})\n\nconst emit = defineEmits<TreeSelectEmits>()\n\nconst slots = defineSlots<{\n /** 默认插槽 */\n default?: (props: TreeSlotsScope) => any\n /** 前缀插槽 */\n prefix?: () => any\n}>()\n\nconst treeProps = computed(() => {\n return o(props as Record<string, any>).omit([\n 'tips',\n 'field',\n 'placeholder',\n 'disabled',\n 'label',\n 'readonly',\n 'data',\n 'contentClass',\n 'contentStyle',\n 'minWidth',\n 'width'\n ])\n})\n\nconst cls = bem('tree-select')\n\nconst labelKey = computed(() => fieldKey(props.labelKey, 'label'))\nconst valueKey = computed(() => fieldKey(props.valueKey, 'value'))\n\n/** 是否可搜索:显式声明或数据源为远程函数 */\nconst filterable = computed(() => props.filterable || typeof props.data === 'function')\n\n/** 过滤 */\nconst qs = shallowRef('')\n\nconst treeRef = shallowRef<TreeExposed>()\n\n/** 远程搜索返回的树数据 */\nconst remoteData = shallowRef<Record<string, any>[]>()\n\n/** 面板渲染的树数据:data 为函数时来自远程搜索,否则为静态数据 */\nconst treeData = computed(() => (typeof props.data === 'function' ? remoteData.value : props.data))\n\nconst remoteLoading = shallowRef(false)\n/** 远程请求序号;响应返回时序号不一致说明已有更新的请求,结果作废 */\nlet remoteSeq = 0\n\nconst debouncedRemoteSearch = debounce(\n async (\n query: string,\n dataFn: (qs: string) => Promise<Record<string, any>[]> | Record<string, any>[]\n ) => {\n const seq = ++remoteSeq\n remoteLoading.value = true\n try {\n const data = await dataFn(query)\n // 响应到达时查询词可能已变化或已有更新的请求,过期结果直接丢弃\n if (seq !== remoteSeq || query !== qs.value) return\n remoteData.value = data ?? []\n // 搜索结果展示完整命中路径,与本地过滤自动展开祖先的行为对齐\n if (query) nextTick(() => treeRef.value?.expandAll())\n } finally {\n if (seq === remoteSeq) remoteLoading.value = false\n }\n },\n 200\n)\n\nwatch(\n [qs, () => props.data],\n ([query, data]) => {\n if (typeof data === 'function') {\n debouncedRemoteSearch(query, data)\n return\n }\n treeRef.value?.filter(query)\n },\n { immediate: true }\n)\n\nconst model = defineModel<string | number>()\n\n/** 内部展示文案,仅由 data 推导;通过 update:text 单向通知父级 */\nconst label = shallowRef<string>()\n\nconst dropdownVisible = shallowRef(false)\n\n/**\n * 是否处于查询态:决定触发输入框显示查询串还是选中标签。\n * 与面板可见状态解耦 —— 选择后立即退出查询态,\n * 不等面板关闭动画结束(否则显示值会延迟一个动画时长才恢复)。\n */\nconst querying = shallowRef(false)\n\nconst inputRef = useTemplateRef<InputExposed>('inputRef')\n\n/** 更新内部文案;值变化时单向 emit update:text */\nfunction setLabel(next?: string) {\n if (label.value === next) return\n label.value = next\n emit('update:text', next)\n}\n\n/** 触发输入框的值:查询态下承载查询串,否则展示选中标签 */\nconst inputValue = computed(() => {\n if (filterable.value && querying.value) return qs.value\n return model.value || model.value === 0 ? label.value : undefined\n})\n\n/** 查询态下已选标签降级为占位提示 */\nconst inputPlaceholder = computed(() => {\n const display = model.value || model.value === 0 ? label.value : undefined\n if (filterable.value && querying.value && display) {\n return display\n }\n return props.placeholder\n})\n\nfunction handleQueryInput(value: string) {\n if (!filterable.value) return\n qs.value = value\n}\n\nconst hovered = shallowRef(false)\n\n/** 悬停且存在选中值时展示清除按钮(替代下拉箭头) */\nconst showClear = computed(() => {\n if (!props.clearable || disabled.value || !hovered.value) return false\n return !!(model.value || model.value === 0 ? label.value : undefined)\n})\n\n/**\n * 过滤模式下拦截输入区域的点击:\n * 阻止 dropdown 的 trigger 开合切换,保持面板展开以不中断输入。\n * 非输入区域(箭头、留白)放行,维持原开合行为。\n */\nfunction handleTriggerClickCapture(e: MouseEvent) {\n if (!filterable.value || disabled.value) return\n if (!(e.target instanceof HTMLInputElement)) return\n\n e.stopPropagation()\n if (!dropdownVisible.value) dropdownRef.value?.open()\n}\n\nwatch(dropdownVisible, (visible) => {\n if (visible && filterable.value) {\n // 面板展开后进入查询态并聚焦输入框,可以立即输入查询\n querying.value = true\n nextTick(() => inputRef.value?.el?.focus())\n } else if (!visible) {\n querying.value = false\n }\n})\n\nconst { formProps } = injectFormContext()\n\nconst { size, disabled, readonly } = useFormFallbackProps([formProps ?? {}, props])\n\nconst dropdownRef = shallowRef<InstanceType<typeof UDropdown>>()\n\nconst { userAction, isUserActive } = useUserAction()\n\n/** 清空 */\nconst handleClear = userAction(() => {\n model.value = ''\n setLabel(undefined)\n emit('clear')\n emit('change', undefined)\n})\n\n/** 外部回显:按 data 查找 label(O(n));用户动作期内跳过 */\nwatch(\n [treeData, model],\n ([data, modelVal]) => {\n if (isUserActive()) return\n if (!data?.length || modelVal === undefined || modelVal === null || modelVal === '') {\n setLabel(undefined)\n return\n }\n\n let nextLabel: string | undefined\n const childrenKey = props.childrenKey ?? 'children'\n data.some((item) => {\n let founded = false\n dfs(\n item,\n (v) => {\n if (v[valueKey.value] === modelVal) {\n nextLabel = v[labelKey.value]\n founded = true\n return true\n }\n },\n childrenKey\n )\n\n return founded\n })\n setLabel(nextLabel)\n },\n { immediate: true }\n)\n\n/** 用户选择:O(1) 写入值与文案,跳过 data 回显查找 */\nconst handleSelect = userAction(\n (selected?: string | number, selectedData?: Record<string, any>) => {\n model.value = selected ?? ''\n\n if (selectedData) {\n setLabel(o(selectedData).get(labelKey.value))\n } else {\n setLabel(undefined)\n }\n\n emit('change', selectedData)\n // 立即退出查询态,输入框同步恢复显示选中标签\n querying.value = false\n qs.value = ''\n dropdownRef.value?.close()\n }\n)\nconst handleDropdownVisible = (visible: boolean) => {\n if (!visible) {\n qs.value = ''\n }\n}\n</script>\n"],"mapp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WAAA,GAAA;OAAzD,OAAK,eAAE,MAAA,GAAA,CAAG,CAAC,EAAC,OAAA,CAAA;OAAW,KAAI;;OAAQ,SAAA,cAAa,CAAb,YAAa,MAAA,SAAA,CAAA,CAAA,CAAA;;;;;;IAd5CC,GAAAA,CAAAA,KAAAA,OAAO,SAAA;KAApB,MAAA;KACT,IAAA,cAAsB,CAAtB,WAAsB,KAAA,QAAA,QAAA,CAAA,CAAA;;;;;;;;;IAkBjB,SAAO,cACH,CAAb,mBAAA,QAAA,GAEW,cAAA,SAAX,UAAA,GAAA,mBAEM,OAAA;;KAFqB,OAAK,eAAE,MAAA,GAAA,CAAG,CAAC,EAAC,SAAA,CAAA;IACrC,GAAA,CAAA,YAA6B,MAAA,WAAA,GAAA,EAAnB,MAAK,YAAW,CAAA,CAAA,GAAA,CAE5B,MAAA,UAAA,GAAA,YAWE,MAAA,WAAA,GAXF,WAWE,EAAA,KAAA,EAAA,GATQ,UAAA,OAAS;KAChB,MAAM,SAAA;KACN,UAAU,MAAA;KACV,qBAAiB,MAAA,YAAA;KACd,SAAA;KAAJ,KAAI;KACJ,YAAA;KACC,OAAO,MAAA,GAAA,CAAG,CAAC,EAAC,cAAA;KACL;KACR,kBAAA;;;;;;;;;;;;;;;;GAKN,CAAA,MAAA,UAAA,GAAA,mBAEW,UAAA,EAAA,KAAA,EAAA,GAAA,CADN,gBAAA,gBAAA,MAAA,SAAS,MAAA,kBAAA,CAAkB,GAAA,CAAA,CAAA,GAAA,EAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import _sfc_main$41 from "./components/icon/icon.js";
|
|
2
2
|
import _sfc_main$30 from "./components/empty/empty.js";
|
|
3
|
-
import _sfc_main$
|
|
4
|
-
import _sfc_main$
|
|
3
|
+
import _sfc_main$69 from "./components/scroll/scroll.js";
|
|
4
|
+
import _sfc_main$84 from "./components/tip/tip.js";
|
|
5
5
|
import _sfc_main$28 from "./components/dropdown/dropdown.js";
|
|
6
6
|
import input_default from "./components/input/input.js";
|
|
7
|
-
import _sfc_main$
|
|
7
|
+
import _sfc_main$48 from "./components/loading/loading.js";
|
|
8
|
+
import _sfc_main$71 from "./components/select/select.js";
|
|
8
9
|
import _sfc_main$21 from "./components/condition-editor/condition-editor.js";
|
|
9
|
-
import _sfc_main$
|
|
10
|
-
import _sfc_main$
|
|
11
|
-
import _sfc_main$
|
|
10
|
+
import _sfc_main$78 from "./components/tabs/tabs-horizontal.js";
|
|
11
|
+
import _sfc_main$79 from "./components/tabs/tabs-vertical.js";
|
|
12
|
+
import _sfc_main$77 from "./components/tabs/tabs.js";
|
|
12
13
|
import _sfc_main$15 from "./components/checkbox/checkbox.js";
|
|
13
|
-
import _sfc_main$
|
|
14
|
-
import _sfc_main$
|
|
14
|
+
import _sfc_main$85 from "./components/tree/tree.js";
|
|
15
|
+
import _sfc_main$86 from "./components/tree-select/tree-select.js";
|
|
15
16
|
import _sfc_main$18 from "./components/code-editor/code-editor.js";
|
|
16
17
|
import _sfc_main$27 from "./components/drawer/drawer.js";
|
|
17
18
|
import _sfc_main$36 from "./components/grid/grid.js";
|
|
@@ -20,9 +21,9 @@ import form_item_default from "./components/form-item/form-item.js";
|
|
|
20
21
|
import form_default from "./components/form/form.js";
|
|
21
22
|
import _sfc_main$5 from "./components/button/button.js";
|
|
22
23
|
import _sfc_main$6 from "./components/button/button-group.js";
|
|
23
|
-
import _sfc_main$
|
|
24
|
+
import _sfc_main$50 from "./components/message-confirm/message-confirm.js";
|
|
24
25
|
import _sfc_main$7 from "./components/calendar/calendar.js";
|
|
25
|
-
import _sfc_main$
|
|
26
|
+
import _sfc_main$66 from "./components/radio/radio.js";
|
|
26
27
|
import _sfc_main$8 from "./components/card/card.js";
|
|
27
28
|
import _sfc_main$12 from "./components/card/card-header.js";
|
|
28
29
|
import _sfc_main$11 from "./components/card/card-cover.js";
|
|
@@ -30,65 +31,65 @@ import _sfc_main$10 from "./components/card/card-content.js";
|
|
|
30
31
|
import _sfc_main$9 from "./components/card/card-action.js";
|
|
31
32
|
import _sfc_main$23 from "./components/date-panel/date-panel.js";
|
|
32
33
|
import _sfc_main$25 from "./components/date-range-picker/date-range-picker.js";
|
|
33
|
-
import _sfc_main$
|
|
34
|
-
import _sfc_main$64 from "./components/progress-nodes/progress-nodes.js";
|
|
34
|
+
import _sfc_main$65 from "./components/progress-nodes/progress-nodes.js";
|
|
35
35
|
import _sfc_main$1 from "./components/auto-complete/auto-complete.js";
|
|
36
|
-
import _sfc_main$
|
|
37
|
-
import _sfc_main$
|
|
38
|
-
import _sfc_main$
|
|
39
|
-
import _sfc_main$
|
|
36
|
+
import _sfc_main$64 from "./components/progress/progress.js";
|
|
37
|
+
import _sfc_main$56 from "./components/notification/notification.js";
|
|
38
|
+
import _sfc_main$45 from "./components/layout/layout.js";
|
|
39
|
+
import _sfc_main$80 from "./components/tag/tag.js";
|
|
40
40
|
import _sfc_main$16 from "./components/checkbox/checkbox-button.js";
|
|
41
|
-
import _sfc_main$
|
|
42
|
-
import _sfc_main$
|
|
41
|
+
import _sfc_main$51 from "./components/multi-select/multi-select.js";
|
|
42
|
+
import _sfc_main$72 from "./components/slider/slider.js";
|
|
43
43
|
import _sfc_main$35 from "./components/gantt-chart/gantt-chart.js";
|
|
44
|
-
import _sfc_main$
|
|
44
|
+
import _sfc_main$49 from "./components/message/message.js";
|
|
45
45
|
import _sfc_main$32 from "./components/file-picker/file-picker.js";
|
|
46
|
-
import _sfc_main$
|
|
47
|
-
import _sfc_main$
|
|
46
|
+
import _sfc_main$58 from "./components/number-input/number-input.js";
|
|
47
|
+
import _sfc_main$59 from "./components/number-range-input/number-range-input.js";
|
|
48
48
|
import _sfc_main$19 from "./components/collapse/collapse.js";
|
|
49
49
|
import _sfc_main$20 from "./components/collapse/collapse-item.js";
|
|
50
|
-
import _sfc_main$
|
|
51
|
-
import _sfc_main$
|
|
50
|
+
import _sfc_main$75 from "./components/table/table.js";
|
|
51
|
+
import _sfc_main$76 from "./components/table-editor/table-editor.js";
|
|
52
52
|
import _sfc_main$14 from "./components/check-tag/check-tag.js";
|
|
53
53
|
import _sfc_main$22 from "./components/contextmenu/contextmenu.js";
|
|
54
|
-
import _sfc_main$
|
|
55
|
-
import _sfc_main$
|
|
54
|
+
import _sfc_main$62 from "./components/password-input/password-input.js";
|
|
55
|
+
import _sfc_main$57 from "./components/number/number.js";
|
|
56
56
|
import _sfc_main$26 from "./components/dialog/dialog.js";
|
|
57
57
|
import _sfc_main$31 from "./components/expression-editor/expression-editor.js";
|
|
58
|
-
import _sfc_main$
|
|
59
|
-
import _sfc_main$
|
|
60
|
-
import _sfc_main$
|
|
58
|
+
import _sfc_main$87 from "./components/watermark/watermark.js";
|
|
59
|
+
import _sfc_main$44 from "./components/kbd/kbd.js";
|
|
60
|
+
import _sfc_main$63 from "./components/pop-confirm/pop-confirm.js";
|
|
61
61
|
import _sfc_main from "./components/action/action.js";
|
|
62
62
|
import action_group_default from "./components/action/action-group.js";
|
|
63
63
|
import _sfc_main$3 from "./components/batch-edit/batch-edit.js";
|
|
64
|
-
import _sfc_main$
|
|
64
|
+
import _sfc_main$82 from "./components/textarea/textarea.js";
|
|
65
65
|
import _sfc_main$13 from "./components/cascade/cascade.js";
|
|
66
|
-
import _sfc_main$
|
|
66
|
+
import _sfc_main$73 from "./components/steps/steps.js";
|
|
67
67
|
import _sfc_main$24 from "./components/date-picker/date-picker.js";
|
|
68
|
-
import _sfc_main$
|
|
69
|
-
import _sfc_main$
|
|
70
|
-
import _sfc_main$
|
|
68
|
+
import _sfc_main$61 from "./components/palette/palette.js";
|
|
69
|
+
import _sfc_main$83 from "./components/theme/theme.js";
|
|
70
|
+
import _sfc_main$52 from "./components/multi-tree-select/multi-tree-select.js";
|
|
71
71
|
import _sfc_main$39 from "./components/group-input/group-input.js";
|
|
72
|
-
import _sfc_main$
|
|
73
|
-
import _sfc_main$
|
|
74
|
-
import _sfc_main$
|
|
75
|
-
import _sfc_main$
|
|
76
|
-
import _sfc_main$
|
|
77
|
-
import _sfc_main$
|
|
72
|
+
import _sfc_main$46 from "./components/list/list.js";
|
|
73
|
+
import _sfc_main$47 from "./components/list/list-item.js";
|
|
74
|
+
import _sfc_main$68 from "./components/rich-text-editor/rich-text-editor.js";
|
|
75
|
+
import _sfc_main$54 from "./components/nav/nav-item.js";
|
|
76
|
+
import _sfc_main$55 from "./components/nav/nav-sub.js";
|
|
77
|
+
import _sfc_main$53 from "./components/nav/nav.js";
|
|
78
78
|
import _sfc_main$29 from "./components/dual-nav/dual-nav.js";
|
|
79
79
|
import _sfc_main$40 from "./components/group-nav/group-nav.js";
|
|
80
80
|
import _sfc_main$37 from "./components/grid-input/grid-input.js";
|
|
81
|
-
import _sfc_main$
|
|
82
|
-
import _sfc_main$
|
|
81
|
+
import _sfc_main$74 from "./components/switch/switch.js";
|
|
82
|
+
import _sfc_main$67 from "./components/radio-group/radio-group.js";
|
|
83
83
|
import _sfc_main$17 from "./components/checkbox-group/checkbox-group.js";
|
|
84
84
|
import _sfc_main$33 from "./components/file-viewer/file-viewer.js";
|
|
85
|
-
import _sfc_main$
|
|
85
|
+
import _sfc_main$81 from "./components/text/text.js";
|
|
86
86
|
import _sfc_main$4 from "./components/breadcrumb/breadcrumb.js";
|
|
87
|
-
import _sfc_main$
|
|
87
|
+
import _sfc_main$60 from "./components/paginator/paginator.js";
|
|
88
88
|
import _sfc_main$34 from "./components/float-button/float-button.js";
|
|
89
89
|
import _sfc_main$2 from "./components/badge/badge.js";
|
|
90
|
-
import _sfc_main$
|
|
90
|
+
import _sfc_main$70 from "./components/segment/segment.js";
|
|
91
91
|
import _sfc_main$42 from "./components/image-cropper/image-cropper.js";
|
|
92
|
+
import _sfc_main$43 from "./components/kanban/kanban.js";
|
|
92
93
|
import { CascadeEmits, CascadeExposed, CascadeNode, CascadeProps, PanelItem, _CascadeExposed } from "./types/cascade.js";
|
|
93
94
|
import { Message, MessageEmits, MessageExposed, MessageInstance, MessageOptions, MessageProps, MessageType, _MessageExposed } from "./types/message.js";
|
|
94
95
|
import { MultiSelectEmits, MultiSelectExposed, MultiSelectProps, _MultiSelectExposed } from "./types/multi-select.js";
|
|
@@ -167,11 +168,12 @@ import { AnimationEmits, AnimationExposed, AnimationProps, _AnimationExposed } f
|
|
|
167
168
|
import { AutoCompleteEmits, AutoCompleteExposed, AutoCompleteProps, _AutoCompleteExposed } from "./types/auto-complete.js";
|
|
168
169
|
import { SwitchEmits, SwitchExposed, SwitchProps, _SwitchExposed } from "./types/switch.js";
|
|
169
170
|
import { StepsEmits, StepsExposed, StepsProps, StepsSlotScope, _StepsExposed } from "./types/steps.js";
|
|
170
|
-
import { RichTextEditorEmits, RichTextEditorExposed, RichTextEditorProps, RichTextFormat, ToolbarItem, _RichTextEditorExposed } from "./types/rich-text-editor.js";
|
|
171
|
+
import { RichTextEditorEmits, RichTextEditorExposed, RichTextEditorProps, RichTextFormat, RichTextImageUploader, ToolbarItem, _RichTextEditorExposed } from "./types/rich-text-editor.js";
|
|
171
172
|
import { FileViewerEmits, FileViewerExposed, FileViewerItem, FileViewerKind, FileViewerProps, _FileViewerExposed } from "./types/file-viewer.js";
|
|
172
173
|
import { CollapseEmits, CollapseItemEmits, CollapseItemProps, CollapseModelValue, CollapseProps, CollapseValue } from "./types/collapse.js";
|
|
173
174
|
import { SegmentEmits, SegmentExposed, SegmentItem, SegmentProps, _SegmentExposed } from "./types/segment.js";
|
|
174
175
|
import { ImageCropperChangePayload, ImageCropperCropTransform, ImageCropperEmits, ImageCropperExposed, ImageCropperProps, ImageCropperResult, ImageCropperResultOptions, ImageCropperSelection, _ImageCropperExposed } from "./types/image-cropper.js";
|
|
176
|
+
import { KanbanColumnItem, KanbanEmits, KanbanExposed, KanbanProps, KanbanSlots, _KanbanExposed } from "./types/kanban.js";
|
|
175
177
|
import "./types/index.js";
|
|
176
178
|
import { EvaluateOptions, createEmptyGroup, createEmptyLeaf, evaluate } from "./components/condition-editor/core/evaluator.js";
|
|
177
179
|
import { messageConfirm } from "./components/message-confirm/message-confirm.js";
|
|
@@ -185,4 +187,4 @@ import { defineBatchEditColumns } from "./components/batch-edit/helper.js";
|
|
|
185
187
|
import { defineTableColumns } from "./components/table/use-columns.js";
|
|
186
188
|
import "./components/index.js";
|
|
187
189
|
export * from "@veltra/utils";
|
|
188
|
-
export { type ActionEmits, type ActionExposed, type ActionGroupExposed, type ActionGroupProps, type ActionProps, type AnimationEmits, type AnimationExposed, type AnimationProps, type AutoCompleteEmits, type AutoCompleteExposed, type AutoCompleteProps, type BadgeEmits, type BadgeExposed, type BadgeProps, type BarType, type BatchEditColumn, type BatchEditEmits, type BatchEditExposed, type BatchEditFeature, type BatchEditProps, type BatchEditSlots, type BatchEditStates, type BreadcrumbEmits, type BreadcrumbExposed, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSlotScope, type BreakCols, type Breakpoint, type ButtonEmits, type ButtonExposed, type ButtonProps, type ButtonType, type CalendarDay, type CalendarEmits, type CalendarExposed, type CalendarMonth, type CalendarProps, type CalendarYear, type CardActionProps, type CardContentProps, type CardCoverProps, type CardEmits, type CardExposed, type CardProps, type CascadeEmits, type CascadeExposed, type CascadeNode, type CascadeProps, type CheckTagEmits, type CheckTagExposed, type CheckTagProps, type CheckboxButtonEmits, type CheckboxButtonProps, type CheckboxEmits, type CheckboxExposed, type CheckboxGroupEmits, type CheckboxGroupExposed, type CheckboxGroupProps, type CheckboxProps, type CodeEditorEmits, type CodeEditorExposed, type CodeEditorLang, type CodeEditorProps, type CollapseEmits, type CollapseItemEmits, type CollapseItemProps, type CollapseModelValue, type CollapseProps, type CollapseValue, type ConditionConnector, type ConditionEditorEmits, type ConditionEditorExposed, type ConditionEditorProps, type EvaluateOptions as ConditionEvaluateOptions, type ConditionExpression, type ConditionField, type ConditionGroup, type ConditionLeaf, type ConditionNode, type ConditionValue, type ContextmenuEmits, type ContextmenuExposed, type ContextmenuItem, ContextmenuPanelDIKey, type ContextmenuProps, ContextmenuRootDIKey, type CssTransitionEmits, type CssTransitionExposed, type CssTransitionProps, type DatePanelEmits, type DatePanelProps, type DatePickerDataType, type DatePickerEmits, type DatePickerExposed, type DatePickerProps, type DateRangePickerDataType, type DateRangePickerEmits, type DateRangePickerExposed, type DateRangePickerProps, type DateRangeValue, type DialogEmits, type DialogExposed, type DialogProps, type DialogTransition, type DrawerDirection, type DrawerEmits, type DrawerExposed, type DrawerMode, type DrawerProps, type DropdownEmits, type DropdownExposed, type DropdownProps, type DualNavEmits, type DualNavExposed, type DualNavProps, type DualNavRailVariant, type DualNavRootItem, type EmptyEmits, type EmptyExposed, type EmptyProps, type ExpressionEditorEmits, type ExpressionEditorExposed, type ExpressionEditorProps, type ExpressionSelectableLevels, type FileViewerEmits, type FileViewerExposed, type FileViewerItem, type FileViewerKind, type FileViewerProps, type FloatButtonEmits, type FloatButtonExposed, type FloatButtonItem, type FloatButtonProps, type FormEmits, type FormExposed, type FormItemEmits, type FormItemExposed, type FormItemProps, type FormProps, type GanttChartEmits, type GanttChartExposed, type GanttChartProps, type GridEmits, type GridExposed, type GridInputEmits, type GridInputExposed, type GridInputProps, type GridItemProps, type GridProps, type GroupInputEmits, type GroupInputExposed, type GroupInputProps, type GroupNavEmits, type GroupNavGroup, type GroupNavProps, type IconEmits, type IconExposed, type IconProps, type ImageCropperChangePayload, type ImageCropperCropTransform, type ImageCropperEmits, type ImageCropperExposed, type ImageCropperProps, type ImageCropperResult, type ImageCropperResultOptions, type ImageCropperSelection, type InputEmits, type InputExposed, type InputProps, type LayoutEmits, type LayoutExposed, type LayoutProps, type ListEmits, type ListExposed, type ListProps, type LoadingEmits, type LoadingExposed, type LoadingProps, type LoadingType, type Message, type MessageConfirm, type MessageConfirmAction, type MessageConfirmEmits, type MessageConfirmExposed, type MessageConfirmInstance, type MessageConfirmOptions, type MessageConfirmProps, type MessageEmits, type MessageExposed, type MessageInstance, type MessageOptions, type MessageProps, type MessageType, type MultiAutoCompleteEmits, type MultiAutoCompleteExposed, type MultiAutoCompleteProps, type MultiSelectEmits, type MultiSelectExposed, type MultiSelectProps, type MultiTreeSelectEmits, type MultiTreeSelectExposed, type MultiTreeSelectProps, type NavEmits, type NavExposed, type NavItem, type NavProps, type NodeRenderExposed, type NodeRenderProps, type Notification, type NotificationEmits, type NotificationExposed, type NotificationInstance, type NotificationOptions, type NotificationPosition, type NotificationProps, type NumberEmits, type NumberExposed, type NumberInputEmits, type NumberInputExposed, type NumberInputProps, type NumberProps, type NumberRangeInputEmits, type NumberRangeInputExposed, type NumberRangeInputProps, type NumberRangeTuple, type PaginatorEmits, type PaginatorExposed, type PaginatorProps, type PaletteColorType, type PaletteEmits, type PaletteExposed, type PaletteHSV, type PaletteProps, type PaletteRGB, type PanelItem, type PanelType, type PasswordInputEmits, type PasswordInputExposed, type PasswordInputProps, type PopConfirmEmits, type PopConfirmExposed, type PopConfirmProps, type PopEmits, type PopExposed, type PopProps, type ProgressEmits, type ProgressExposed, type ProgressNodesEmits, type ProgressNodesExposed, type ProgressNodesProps, type ProgressProps, type QuickBatchEditEmits, type QuickBatchEditExposed, type QuickBatchEditProps, type RadioEmits, type RadioExposed, type RadioGroupEmits, type RadioGroupExposed, type RadioGroupProps, type RadioProps, type RichTextEditorEmits, type RichTextEditorExposed, type RichTextEditorProps, type RichTextFormat, type ScrollEmits, type ScrollExposed, type ScrollPosition, type ScrollProps, type SegmentEmits, type SegmentExposed, type SegmentItem, type SegmentProps, type SelectEmits, type SelectExposed, type SelectProps, type SliderEmits, type SliderExposed, type SliderProps, type StepsEmits, type StepsExposed, type StepsProps, type StepsSlotScope, type SwitchEmits, type SwitchExposed, type SwitchProps, type TabItem, type TableColumn, type TableColumnAlign, type TableColumnNode, type TableColumnRenderContext, type TableColumnSlotsScope, type TableColumnStyle, type TableEditorColumn, type TableEditorEmits, type TableEditorExposed, type TableEditorProps, type TableEmits, type TableExposed, type TableProps, type TableRow, type TableRowSlotsScope, type TableSummaryContext, type TabsEmits, type TabsExposed, type TabsHorizontalEmits, type TabsHorizontalExposed, type TabsHorizontalProps, type TabsProps, type TabsVerticalEmits, type TabsVerticalExposed, type TabsVerticalProps, type TagEmits, type TagExposed, type TagProps, type TextEditorEmits, type TextEditorExposed, type TextEditorProps, type TextEmits, type TextExposed, type TextProps, type TextareaEmits, type TextareaExposed, type TextareaProps, type ThemeExposed, type ThemeProps, type TipAlign, type TipDirection, type TipEmits, type TipExposed, type TipProps, type TipType, type ToolbarItem, type TreeEmit, type TreeExposed, type TreeNode, type TreeNodeProps, type TreeProps, type TreeSelectEmits, type TreeSelectExposed, type TreeSelectProps, _sfc_main as UAction, action_group_default as UActionGroup, _sfc_main$1 as UAutoComplete, _sfc_main$2 as UBadge, _sfc_main$3 as UBatchEdit, _sfc_main$4 as UBreadcrumb, _sfc_main$5 as UButton, _sfc_main$6 as UButtonGroup, _sfc_main$7 as UCalendar, _sfc_main$8 as UCard, _sfc_main$9 as UCardAction, _sfc_main$10 as UCardContent, _sfc_main$11 as UCardCover, _sfc_main$12 as UCardHeader, _sfc_main$13 as UCascade, _sfc_main$14 as UCheckTag, _sfc_main$15 as UCheckbox, _sfc_main$16 as UCheckboxButton, _sfc_main$17 as UCheckboxGroup, _sfc_main$18 as UCodeEditor, _sfc_main$19 as UCollapse, _sfc_main$20 as UCollapseItem, _sfc_main$21 as UConditionEditor, _sfc_main$22 as UContextmenu, _sfc_main$23 as UDatePanel, _sfc_main$24 as UDatePicker, _sfc_main$25 as UDateRangePicker, _sfc_main$26 as UDialog, _sfc_main$27 as UDrawer, _sfc_main$28 as UDropdown, _sfc_main$29 as UDualNav, _sfc_main$30 as UEmpty, _sfc_main$31 as UExpressionEditor, _sfc_main$32 as UFilePicker, _sfc_main$33 as UFileViewer, _sfc_main$34 as UFloatButton, form_default as UForm, form_item_default as UFormItem, _sfc_main$35 as UGanttChart, _sfc_main$36 as UGrid, _sfc_main$37 as UGridInput, _sfc_main$38 as UGridItem, _sfc_main$39 as UGroupInput, _sfc_main$40 as UGroupNav, _sfc_main$41 as UIcon, _sfc_main$42 as UImageCropper, input_default as UInput, _sfc_main$43 as UKbd, _sfc_main$44 as ULayout, _sfc_main$45 as UList, _sfc_main$46 as UListItem, _sfc_main$47 as ULoading, _sfc_main$48 as UMessage, _sfc_main$49 as UMessageConfirm, _sfc_main$50 as UMultiSelect, _sfc_main$51 as UMultiTreeSelect, _sfc_main$52 as UNav, _sfc_main$53 as UNavItem, _sfc_main$54 as UNavSub, NodeRender as UNodeRender, _sfc_main$55 as UNotification, _sfc_main$56 as UNumber, _sfc_main$57 as UNumberInput, _sfc_main$58 as UNumberRangeInput, _sfc_main$59 as UPaginator, _sfc_main$60 as UPalette, _sfc_main$61 as UPasswordInput, _sfc_main$62 as UPopConfirm, _sfc_main$63 as UProgress, _sfc_main$64 as UProgressNodes, _sfc_main$65 as URadio, _sfc_main$66 as URadioGroup, _sfc_main$67 as URichTextEditor, _sfc_main$68 as UScroll, _sfc_main$69 as USegment, _sfc_main$70 as USelect, _sfc_main$71 as USlider, _sfc_main$72 as USteps, _sfc_main$73 as USwitch, _sfc_main$74 as UTable, _sfc_main$75 as UTableEditor, _sfc_main$76 as UTabs, _sfc_main$77 as UTabsHorizontal, _sfc_main$78 as UTabsVertical, _sfc_main$79 as UTag, _sfc_main$80 as UText, _sfc_main$81 as UTextarea, _sfc_main$82 as UTheme, _sfc_main$83 as UTip, _sfc_main$84 as UTree, _sfc_main$85 as UTreeSelect, _sfc_main$86 as UWatermark, type UploaderEmits, type UploaderExposed, type UploaderProps, type VariableItem, type WatermarkEmits, type WatermarkExposed, type WatermarkProps, type _ActionExposed, type _ActionGroupExposed, type _AnimationExposed, type _AutoCompleteExposed, type _BadgeExposed, type _BatchEditExposed, type _BreadcrumbExposed, type _ButtonExposed, type _CalendarExposed, type _CardExposed, type _CascadeExposed, type _CheckTagExposed, type _CodeEditorExposed, type _ConditionEditorExposed, type _ContextmenuExposed, type _CssTransitionExposed, type _DatePickerExposed, type _DateRangePickerExposed, type _DialogExposed, type _DrawerExposed, type _DropdownExposed, type _DualNavExposed, type _EmptyExposed, type _ExpressionEditorExposed, type _FileViewerExposed, type _FloatButtonExposed, type _FormExposed, type _GanttChartExposed, type _GridExposed, type _GridInputExposed, type _GroupInputExposed, type _ImageCropperExposed, type _InputExposed, type _LayoutExposed, type _ListExposed, type _LoadingExposed, type _MessageConfirmExposed, type _MessageExposed, type _MultiAutoCompleteExposed, type _MultiSelectExposed, type _MultiTreeSelectExposed, type _NavExposed, type _NotificationExposed, type _PaginatorExposed, type _PaletteExposed, type _PasswordInputExposed, type _PopConfirmExposed, type _PopExposed, type _ProgressExposed, type _ProgressNodesExposed, type _QuickBatchEditExposed, type _RadioExposed, type _RadioGroupExposed, type _RichTextEditorExposed, type _ScrollExposed, type _SegmentExposed, type _SelectExposed, type _SliderExposed, type _StepsExposed, type _SwitchExposed, type _TableEditorExposed, type _TableExposed, type _TabsExposed, type _TabsHorizontalExposed, type _TabsVerticalExposed, type _TextEditorExposed, type _TextExposed, type _TextareaExposed, type _ThemeExposed, type _TipExposed, type _TreeExposed, type _TreeSelectExposed, type _UploaderExposed, type _WatermarkExposed, contextmenu, createEmptyGroup, createEmptyLeaf, defineBatchEditColumns, defineTableColumns, evaluate as evaluateConditionExpression, message, messageConfirm, notification, vLoading };
|
|
190
|
+
export { type ActionEmits, type ActionExposed, type ActionGroupExposed, type ActionGroupProps, type ActionProps, type AnimationEmits, type AnimationExposed, type AnimationProps, type AutoCompleteEmits, type AutoCompleteExposed, type AutoCompleteProps, type BadgeEmits, type BadgeExposed, type BadgeProps, type BarType, type BatchEditColumn, type BatchEditEmits, type BatchEditExposed, type BatchEditFeature, type BatchEditProps, type BatchEditSlots, type BatchEditStates, type BreadcrumbEmits, type BreadcrumbExposed, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSlotScope, type BreakCols, type Breakpoint, type ButtonEmits, type ButtonExposed, type ButtonProps, type ButtonType, type CalendarDay, type CalendarEmits, type CalendarExposed, type CalendarMonth, type CalendarProps, type CalendarYear, type CardActionProps, type CardContentProps, type CardCoverProps, type CardEmits, type CardExposed, type CardProps, type CascadeEmits, type CascadeExposed, type CascadeNode, type CascadeProps, type CheckTagEmits, type CheckTagExposed, type CheckTagProps, type CheckboxButtonEmits, type CheckboxButtonProps, type CheckboxEmits, type CheckboxExposed, type CheckboxGroupEmits, type CheckboxGroupExposed, type CheckboxGroupProps, type CheckboxProps, type CodeEditorEmits, type CodeEditorExposed, type CodeEditorLang, type CodeEditorProps, type CollapseEmits, type CollapseItemEmits, type CollapseItemProps, type CollapseModelValue, type CollapseProps, type CollapseValue, type ConditionConnector, type ConditionEditorEmits, type ConditionEditorExposed, type ConditionEditorProps, type EvaluateOptions as ConditionEvaluateOptions, type ConditionExpression, type ConditionField, type ConditionGroup, type ConditionLeaf, type ConditionNode, type ConditionValue, type ContextmenuEmits, type ContextmenuExposed, type ContextmenuItem, ContextmenuPanelDIKey, type ContextmenuProps, ContextmenuRootDIKey, type CssTransitionEmits, type CssTransitionExposed, type CssTransitionProps, type DatePanelEmits, type DatePanelProps, type DatePickerDataType, type DatePickerEmits, type DatePickerExposed, type DatePickerProps, type DateRangePickerDataType, type DateRangePickerEmits, type DateRangePickerExposed, type DateRangePickerProps, type DateRangeValue, type DialogEmits, type DialogExposed, type DialogProps, type DialogTransition, type DrawerDirection, type DrawerEmits, type DrawerExposed, type DrawerMode, type DrawerProps, type DropdownEmits, type DropdownExposed, type DropdownProps, type DualNavEmits, type DualNavExposed, type DualNavProps, type DualNavRailVariant, type DualNavRootItem, type EmptyEmits, type EmptyExposed, type EmptyProps, type ExpressionEditorEmits, type ExpressionEditorExposed, type ExpressionEditorProps, type ExpressionSelectableLevels, type FileViewerEmits, type FileViewerExposed, type FileViewerItem, type FileViewerKind, type FileViewerProps, type FloatButtonEmits, type FloatButtonExposed, type FloatButtonItem, type FloatButtonProps, type FormEmits, type FormExposed, type FormItemEmits, type FormItemExposed, type FormItemProps, type FormProps, type GanttChartEmits, type GanttChartExposed, type GanttChartProps, type GridEmits, type GridExposed, type GridInputEmits, type GridInputExposed, type GridInputProps, type GridItemProps, type GridProps, type GroupInputEmits, type GroupInputExposed, type GroupInputProps, type GroupNavEmits, type GroupNavGroup, type GroupNavProps, type IconEmits, type IconExposed, type IconProps, type ImageCropperChangePayload, type ImageCropperCropTransform, type ImageCropperEmits, type ImageCropperExposed, type ImageCropperProps, type ImageCropperResult, type ImageCropperResultOptions, type ImageCropperSelection, type InputEmits, type InputExposed, type InputProps, type KanbanColumnItem, type KanbanEmits, type KanbanExposed, type KanbanProps, type KanbanSlots, type LayoutEmits, type LayoutExposed, type LayoutProps, type ListEmits, type ListExposed, type ListProps, type LoadingEmits, type LoadingExposed, type LoadingProps, type LoadingType, type Message, type MessageConfirm, type MessageConfirmAction, type MessageConfirmEmits, type MessageConfirmExposed, type MessageConfirmInstance, type MessageConfirmOptions, type MessageConfirmProps, type MessageEmits, type MessageExposed, type MessageInstance, type MessageOptions, type MessageProps, type MessageType, type MultiAutoCompleteEmits, type MultiAutoCompleteExposed, type MultiAutoCompleteProps, type MultiSelectEmits, type MultiSelectExposed, type MultiSelectProps, type MultiTreeSelectEmits, type MultiTreeSelectExposed, type MultiTreeSelectProps, type NavEmits, type NavExposed, type NavItem, type NavProps, type NodeRenderExposed, type NodeRenderProps, type Notification, type NotificationEmits, type NotificationExposed, type NotificationInstance, type NotificationOptions, type NotificationPosition, type NotificationProps, type NumberEmits, type NumberExposed, type NumberInputEmits, type NumberInputExposed, type NumberInputProps, type NumberProps, type NumberRangeInputEmits, type NumberRangeInputExposed, type NumberRangeInputProps, type NumberRangeTuple, type PaginatorEmits, type PaginatorExposed, type PaginatorProps, type PaletteColorType, type PaletteEmits, type PaletteExposed, type PaletteHSV, type PaletteProps, type PaletteRGB, type PanelItem, type PanelType, type PasswordInputEmits, type PasswordInputExposed, type PasswordInputProps, type PopConfirmEmits, type PopConfirmExposed, type PopConfirmProps, type PopEmits, type PopExposed, type PopProps, type ProgressEmits, type ProgressExposed, type ProgressNodesEmits, type ProgressNodesExposed, type ProgressNodesProps, type ProgressProps, type QuickBatchEditEmits, type QuickBatchEditExposed, type QuickBatchEditProps, type RadioEmits, type RadioExposed, type RadioGroupEmits, type RadioGroupExposed, type RadioGroupProps, type RadioProps, type RichTextEditorEmits, type RichTextEditorExposed, type RichTextEditorProps, type RichTextFormat, type RichTextImageUploader, type ScrollEmits, type ScrollExposed, type ScrollPosition, type ScrollProps, type SegmentEmits, type SegmentExposed, type SegmentItem, type SegmentProps, type SelectEmits, type SelectExposed, type SelectProps, type SliderEmits, type SliderExposed, type SliderProps, type StepsEmits, type StepsExposed, type StepsProps, type StepsSlotScope, type SwitchEmits, type SwitchExposed, type SwitchProps, type TabItem, type TableColumn, type TableColumnAlign, type TableColumnNode, type TableColumnRenderContext, type TableColumnSlotsScope, type TableColumnStyle, type TableEditorColumn, type TableEditorEmits, type TableEditorExposed, type TableEditorProps, type TableEmits, type TableExposed, type TableProps, type TableRow, type TableRowSlotsScope, type TableSummaryContext, type TabsEmits, type TabsExposed, type TabsHorizontalEmits, type TabsHorizontalExposed, type TabsHorizontalProps, type TabsProps, type TabsVerticalEmits, type TabsVerticalExposed, type TabsVerticalProps, type TagEmits, type TagExposed, type TagProps, type TextEditorEmits, type TextEditorExposed, type TextEditorProps, type TextEmits, type TextExposed, type TextProps, type TextareaEmits, type TextareaExposed, type TextareaProps, type ThemeExposed, type ThemeProps, type TipAlign, type TipDirection, type TipEmits, type TipExposed, type TipProps, type TipType, type ToolbarItem, type TreeEmit, type TreeExposed, type TreeNode, type TreeNodeProps, type TreeProps, type TreeSelectEmits, type TreeSelectExposed, type TreeSelectProps, _sfc_main as UAction, action_group_default as UActionGroup, _sfc_main$1 as UAutoComplete, _sfc_main$2 as UBadge, _sfc_main$3 as UBatchEdit, _sfc_main$4 as UBreadcrumb, _sfc_main$5 as UButton, _sfc_main$6 as UButtonGroup, _sfc_main$7 as UCalendar, _sfc_main$8 as UCard, _sfc_main$9 as UCardAction, _sfc_main$10 as UCardContent, _sfc_main$11 as UCardCover, _sfc_main$12 as UCardHeader, _sfc_main$13 as UCascade, _sfc_main$14 as UCheckTag, _sfc_main$15 as UCheckbox, _sfc_main$16 as UCheckboxButton, _sfc_main$17 as UCheckboxGroup, _sfc_main$18 as UCodeEditor, _sfc_main$19 as UCollapse, _sfc_main$20 as UCollapseItem, _sfc_main$21 as UConditionEditor, _sfc_main$22 as UContextmenu, _sfc_main$23 as UDatePanel, _sfc_main$24 as UDatePicker, _sfc_main$25 as UDateRangePicker, _sfc_main$26 as UDialog, _sfc_main$27 as UDrawer, _sfc_main$28 as UDropdown, _sfc_main$29 as UDualNav, _sfc_main$30 as UEmpty, _sfc_main$31 as UExpressionEditor, _sfc_main$32 as UFilePicker, _sfc_main$33 as UFileViewer, _sfc_main$34 as UFloatButton, form_default as UForm, form_item_default as UFormItem, _sfc_main$35 as UGanttChart, _sfc_main$36 as UGrid, _sfc_main$37 as UGridInput, _sfc_main$38 as UGridItem, _sfc_main$39 as UGroupInput, _sfc_main$40 as UGroupNav, _sfc_main$41 as UIcon, _sfc_main$42 as UImageCropper, input_default as UInput, _sfc_main$43 as UKanban, _sfc_main$44 as UKbd, _sfc_main$45 as ULayout, _sfc_main$46 as UList, _sfc_main$47 as UListItem, _sfc_main$48 as ULoading, _sfc_main$49 as UMessage, _sfc_main$50 as UMessageConfirm, _sfc_main$51 as UMultiSelect, _sfc_main$52 as UMultiTreeSelect, _sfc_main$53 as UNav, _sfc_main$54 as UNavItem, _sfc_main$55 as UNavSub, NodeRender as UNodeRender, _sfc_main$56 as UNotification, _sfc_main$57 as UNumber, _sfc_main$58 as UNumberInput, _sfc_main$59 as UNumberRangeInput, _sfc_main$60 as UPaginator, _sfc_main$61 as UPalette, _sfc_main$62 as UPasswordInput, _sfc_main$63 as UPopConfirm, _sfc_main$64 as UProgress, _sfc_main$65 as UProgressNodes, _sfc_main$66 as URadio, _sfc_main$67 as URadioGroup, _sfc_main$68 as URichTextEditor, _sfc_main$69 as UScroll, _sfc_main$70 as USegment, _sfc_main$71 as USelect, _sfc_main$72 as USlider, _sfc_main$73 as USteps, _sfc_main$74 as USwitch, _sfc_main$75 as UTable, _sfc_main$76 as UTableEditor, _sfc_main$77 as UTabs, _sfc_main$78 as UTabsHorizontal, _sfc_main$79 as UTabsVertical, _sfc_main$80 as UTag, _sfc_main$81 as UText, _sfc_main$82 as UTextarea, _sfc_main$83 as UTheme, _sfc_main$84 as UTip, _sfc_main$85 as UTree, _sfc_main$86 as UTreeSelect, _sfc_main$87 as UWatermark, type UploaderEmits, type UploaderExposed, type UploaderProps, type VariableItem, type WatermarkEmits, type WatermarkExposed, type WatermarkProps, type _ActionExposed, type _ActionGroupExposed, type _AnimationExposed, type _AutoCompleteExposed, type _BadgeExposed, type _BatchEditExposed, type _BreadcrumbExposed, type _ButtonExposed, type _CalendarExposed, type _CardExposed, type _CascadeExposed, type _CheckTagExposed, type _CodeEditorExposed, type _ConditionEditorExposed, type _ContextmenuExposed, type _CssTransitionExposed, type _DatePickerExposed, type _DateRangePickerExposed, type _DialogExposed, type _DrawerExposed, type _DropdownExposed, type _DualNavExposed, type _EmptyExposed, type _ExpressionEditorExposed, type _FileViewerExposed, type _FloatButtonExposed, type _FormExposed, type _GanttChartExposed, type _GridExposed, type _GridInputExposed, type _GroupInputExposed, type _ImageCropperExposed, type _InputExposed, type _KanbanExposed, type _LayoutExposed, type _ListExposed, type _LoadingExposed, type _MessageConfirmExposed, type _MessageExposed, type _MultiAutoCompleteExposed, type _MultiSelectExposed, type _MultiTreeSelectExposed, type _NavExposed, type _NotificationExposed, type _PaginatorExposed, type _PaletteExposed, type _PasswordInputExposed, type _PopConfirmExposed, type _PopExposed, type _ProgressExposed, type _ProgressNodesExposed, type _QuickBatchEditExposed, type _RadioExposed, type _RadioGroupExposed, type _RichTextEditorExposed, type _ScrollExposed, type _SegmentExposed, type _SelectExposed, type _SliderExposed, type _StepsExposed, type _SwitchExposed, type _TableEditorExposed, type _TableExposed, type _TabsExposed, type _TabsHorizontalExposed, type _TabsVerticalExposed, type _TextEditorExposed, type _TextExposed, type _TextareaExposed, type _ThemeExposed, type _TipExposed, type _TreeExposed, type _TreeSelectExposed, type _UploaderExposed, type _WatermarkExposed, contextmenu, createEmptyGroup, createEmptyLeaf, defineBatchEditColumns, defineTableColumns, evaluate as evaluateConditionExpression, message, messageConfirm, notification, vLoading };
|