fast-element-plus 2.0.17 → 2.0.19
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/CHANGELOG.md +20 -0
- package/CONTRIBUTING.md +8 -0
- package/dist/component.d.ts +27 -33
- package/dist/components/avatar/src/avatar.d.ts +4 -4
- package/dist/components/button/src/button.d.ts +1 -1
- package/dist/components/button/src/button.mjs +2 -2
- package/dist/components/button/src/button.mjs.map +1 -1
- package/dist/components/contextMenu/src/contextMenu.d.ts +1 -1
- package/dist/components/contextMenu/src/contextMenu.mjs +2 -2
- package/dist/components/contextMenu/src/contextMenu.mjs.map +1 -1
- package/dist/components/dialog/src/dialog.d.ts +2 -2
- package/dist/components/dialog/src/dialog.mjs +3 -3
- package/dist/components/dialog/src/dialog.mjs.map +1 -1
- package/dist/components/drawer/src/drawer.d.ts +2 -2
- package/dist/components/drawer/src/drawer.mjs +3 -3
- package/dist/components/drawer/src/drawer.mjs.map +1 -1
- package/dist/components/image/src/image.d.ts +1 -1
- package/dist/components/layoutGrid/src/layoutGridItem.d.ts +1 -1
- package/dist/components/layoutGrid/src/layoutGridItem.mjs +1 -1
- package/dist/components/layoutGrid/src/layoutGridItem.mjs.map +1 -1
- package/dist/components/select/src/select.d.ts +1 -1
- package/dist/components/select/src/select.mjs +2 -2
- package/dist/components/select/src/select.mjs.map +1 -1
- package/dist/components/selectPage/src/selectPage.d.ts +10 -4
- package/dist/components/selectPage/src/selectPage.mjs +2 -2
- package/dist/components/selectPage/src/selectPage.mjs.map +1 -1
- package/dist/components/selectV2/src/selectV2.d.ts +1 -1
- package/dist/components/selectV2/src/selectV2.mjs +2 -2
- package/dist/components/selectV2/src/selectV2.mjs.map +1 -1
- package/dist/components/table/src/table.d.ts +1 -1
- package/dist/components/table/src/table.mjs +2 -2
- package/dist/components/table/src/table.mjs.map +1 -1
- package/dist/components/table/src/tableColumn.d.ts +6 -6
- package/dist/components/tree/src/tree.d.ts +1 -1
- package/dist/components/tree/src/tree.mjs +2 -2
- package/dist/components/tree/src/tree.mjs.map +1 -1
- package/dist/components/treeSelect/src/treeSelect.d.ts +19 -7
- package/dist/components/treeSelect/src/treeSelect.mjs +2 -2
- package/dist/components/treeSelect/src/treeSelect.mjs.map +1 -1
- package/dist/components/upload/src/upload.mjs +2 -2
- package/dist/components/upload/src/upload.mjs.map +1 -1
- package/dist/components/uploadImage/src/uploadImage.d.ts +3 -15
- package/dist/components/uploadImage/src/uploadImage.mjs +1 -10
- package/dist/components/uploadImage/src/uploadImage.mjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.global.min.js +4 -4
- package/dist/index.global.min.js.map +1 -1
- package/dist/utils/async/index.mjs.map +1 -1
- package/dist/utils/date/index.mjs.map +1 -1
- package/dist/utils/object/index.d.ts +28 -6
- package/dist/utils/object/index.mjs +142 -96
- package/dist/utils/object/index.mjs.map +1 -1
- package/dist/utils/string/index.mjs.map +1 -1
- package/dist/utils/vue/emits.mjs.map +1 -1
- package/dist/utils/vue/install.mjs.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.mjs +1 -1
- package/dist/version.mjs.map +1 -1
- package/package.json +4 -3
|
@@ -53,7 +53,7 @@ export declare const tableColumnProps: {
|
|
|
53
53
|
* @description whether column can be sorted. Remote sorting can be done by setting this attribute to 'custom' and listening to the `sort-change` event of Table
|
|
54
54
|
*/
|
|
55
55
|
sortable: {
|
|
56
|
-
type: (
|
|
56
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
57
57
|
default: boolean;
|
|
58
58
|
};
|
|
59
59
|
/**
|
|
@@ -95,7 +95,7 @@ export declare const tableColumnProps: {
|
|
|
95
95
|
/**
|
|
96
96
|
* @description whether column is fixed at left / right. Will be fixed at left if `true`
|
|
97
97
|
*/
|
|
98
|
-
fixed: (
|
|
98
|
+
fixed: (StringConstructor | BooleanConstructor)[];
|
|
99
99
|
/**
|
|
100
100
|
* @description function that formats cell content
|
|
101
101
|
*/
|
|
@@ -314,7 +314,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
314
314
|
* @description whether column can be sorted. Remote sorting can be done by setting this attribute to 'custom' and listening to the `sort-change` event of Table
|
|
315
315
|
*/
|
|
316
316
|
sortable: {
|
|
317
|
-
type: (
|
|
317
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
318
318
|
default: boolean;
|
|
319
319
|
};
|
|
320
320
|
/**
|
|
@@ -348,7 +348,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
348
348
|
/**
|
|
349
349
|
* @description whether column is fixed at left / right. Will be fixed at left if `true`
|
|
350
350
|
*/
|
|
351
|
-
fixed: (
|
|
351
|
+
fixed: (StringConstructor | BooleanConstructor)[];
|
|
352
352
|
/**
|
|
353
353
|
* @description function that formats cell content
|
|
354
354
|
*/
|
|
@@ -544,7 +544,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
544
544
|
* @description whether column can be sorted. Remote sorting can be done by setting this attribute to 'custom' and listening to the `sort-change` event of Table
|
|
545
545
|
*/
|
|
546
546
|
sortable: {
|
|
547
|
-
type: (
|
|
547
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
548
548
|
default: boolean;
|
|
549
549
|
};
|
|
550
550
|
/**
|
|
@@ -578,7 +578,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
578
578
|
/**
|
|
579
579
|
* @description whether column is fixed at left / right. Will be fixed at left if `true`
|
|
580
580
|
*/
|
|
581
|
-
fixed: (
|
|
581
|
+
fixed: (StringConstructor | BooleanConstructor)[];
|
|
582
582
|
/**
|
|
583
583
|
* @description function that formats cell content
|
|
584
584
|
*/
|
|
@@ -367,7 +367,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
367
367
|
/** @description 在 Tree 中给定节点后插入一个节点 */
|
|
368
368
|
insertAfter: import("vue").ComputedRef<((data: TreeNodeData, refNode: import("element-plus").TreeKey | TreeNodeData | import("element-plus/es/components/tree/src/model/node.mjs").default) => void) | undefined>;
|
|
369
369
|
/** @description 加载状态 */
|
|
370
|
-
loading: import("vue").
|
|
370
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
371
371
|
/** @description 刷新 */
|
|
372
372
|
refresh: () => Promise<void>;
|
|
373
373
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -6,7 +6,7 @@ import { definePropType, useProps } from "../../../utils/vue/props.mjs";
|
|
|
6
6
|
import { useRender } from "../../../utils/vue/render.mjs";
|
|
7
7
|
import { makeSlots } from "../../../utils/vue/slots.mjs";
|
|
8
8
|
import { withDefineType } from "../../../utils/vue/with.mjs";
|
|
9
|
-
import { computed, createTextVNode, createVNode, defineComponent, mergeProps, nextTick, onMounted, reactive, resolveDirective, shallowRef, useModel, watch, withDirectives } from "vue";
|
|
9
|
+
import { computed, createTextVNode, createVNode, defineComponent, mergeProps, nextTick, onMounted, reactive, resolveDirective, shallowRef, toRef, useModel, watch, withDirectives } from "vue";
|
|
10
10
|
import { Expand, Fold } from "@element-plus/icons-vue";
|
|
11
11
|
import { ElIcon, ElInput, ElScrollbar, ElTree, treeEmits, treeProps, useGlobalSize } from "element-plus";
|
|
12
12
|
//#region src/components/tree/src/tree.tsx
|
|
@@ -330,7 +330,7 @@ var tree_default = defineComponent({
|
|
|
330
330
|
/** @description 在 Tree 中给定节点后插入一个节点 */
|
|
331
331
|
insertAfter: computed(() => treeRef.value?.insertAfter),
|
|
332
332
|
/** @description 加载状态 */
|
|
333
|
-
loading:
|
|
333
|
+
loading: toRef(state, "loading"),
|
|
334
334
|
/** @description 刷新 */
|
|
335
335
|
refresh: loadData
|
|
336
336
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.mjs","names":["update:modelValue","update:label","node-click"],"sources":["../../../../src/components/tree/src/tree.tsx"],"sourcesContent":["import { computed, defineComponent, nextTick, onMounted, reactive, shallowRef, useModel, watch } from \"vue\";\nimport { Expand, Fold } from \"@element-plus/icons-vue\";\nimport { ElIcon, ElInput, ElScrollbar, ElTree, treeEmits, treeProps, useGlobalSize } from \"element-plus\";\nimport { addCssUnit, definePropType, isEqual, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport type { FilterValue, TreeNodeData } from \"element-plus\";\nimport type { ComponentInternalInstance } from \"vue\";\nimport type { PagedInput } from \"../../table\";\nimport type { FilterNodeMethodFunction, TreeNode } from \"./tree.props\";\nimport type { ElTreeOutput } from \"./tree.type\";\n\n/** FaTree 的运行时 Props 定义。 */\nexport const faTreeProps = {\n\t...treeProps,\n\t/** 树节点筛选方法。 */\n\tfilterNodeMethod: {\n\t\ttype: definePropType<FilterNodeMethodFunction>(Function),\n\t},\n\t/** @description whether Select is disabled 重载使其支持 ElForm*/\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: undefined,\n\t},\n\t/** 每个树节点用来作为唯一标识的属性,整棵树应该是唯一的 */\n\tnodeKey: {\n\t\ttype: String,\n\t\tdefault: \"value\",\n\t},\n\t/** @description 是否默认展开所有节点 */\n\tdefaultExpandAll: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否在点击节点的时候选中节点 */\n\tcheckOnClickNode: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否高亮当前选中节点 */\n\thighlightCurrent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 点击折叠节点,需要开启 'expandOnClickNode' */\n\tcollapseOnClickNode: Boolean,\n\t/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<string | number | boolean | object | null>([String, Number, Boolean, Object]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: String,\n\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: 180,\n\t},\n\t/** @description 默认选择 */\n\tdefaultSelection: [String, Number],\n\t/** @description 标题 */\n\ttitle: String,\n\t/** @description 折叠 */\n\thamburger: Boolean,\n\t/** @description 隐藏全部 */\n\thideAll: Boolean,\n\t/** @description 隐藏过滤 */\n\thideFilter: Boolean,\n\t/** @description 全部值 */\n\tallValue: {\n\t\ttype: definePropType<string | number | boolean | object | null>([String, Number, Boolean, Object]),\n\t\tdefault: undefined,\n\t},\n\t/** @description 树形数据 */\n\tdata: {\n\t\ttype: definePropType<ElTreeOutput[]>(Array),\n\t\tdefault: () => [],\n\t},\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: string | number | PagedInput) => Promise<ElTreeOutput[]>>(Function),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | PagedInput | null>([String, Number, Object]),\n};\n\n/** FaTree 的运行时 Emits 定义。 */\nexport const faTreeEmits = {\n\t...treeEmits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string | number | boolean | object | null | undefined) =>\n\t\ttypeof value === \"string\" ||\n\t\ttypeof value === \"number\" ||\n\t\ttypeof value === \"boolean\" ||\n\t\t(typeof value === \"object\" && value !== null) ||\n\t\tvalue == null,\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string) => typeof value === \"string\" || value === null,\n\t/** @description 数据改变 */\n\tdataChange: (data: ElTreeOutput[]) => Array.isArray(data),\n\t/** @description 选中数据改变 */\n\tchange: (_data: ElTreeOutput, _node: TreeNode, _instance: ComponentInternalInstance, _event: MouseEvent) => true,\n\t/** @description 节点点击 */\n\t\"node-click\": (_data: ElTreeOutput, _node: TreeNode, _instance: ComponentInternalInstance | null, _event: MouseEvent) => true,\n};\n\n/** FaTree 的插槽参数。 */\nexport interface FaTreeSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: { node: TreeNode; data: ElTreeOutput };\n\t/** @description 当数据为空时自定义的内容 */\n\tempty: never;\n\t/** @description 显示内容插槽 */\n\tlabel: { node: TreeNode; data: ElTreeOutput };\n}\n\nexport default defineComponent({\n\tname: \"FaTree\",\n\tprops: faTreeProps,\n\temits: faTreeEmits,\n\tslots: makeSlots<FaTreeSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst selectedLabel = useModel(props, \"label\");\n\n\t\tconst globalSize = useGlobalSize();\n\t\tconst treeRef = shallowRef<InstanceType<typeof ElTree> | null>(null);\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<string | number | boolean | object | null | undefined>(),\n\t\t\tloading: false,\n\t\t\tsearchValue: withDefineType<string>(),\n\t\t\toriginalTreeData: withDefineType<ElTreeOutput[]>([]),\n\t\t\ttreeData: withDefineType<ElTreeOutput[]>([]),\n\t\t\thamburger: false,\n\t\t\twidth: computed(() => {\n\t\t\t\tif (state.hamburger) {\n\t\t\t\t\treturn \"130px\";\n\t\t\t\t} else {\n\t\t\t\t\tconst width = addCssUnit(props.width);\n\t\t\t\t\tif (globalSize.value === \"small\") {\n\t\t\t\t\t\treturn `calc(${width} * 0.9)`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn width;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}),\n\t\t});\n\t\tlet requestVersion = 0;\n\n\t\t/** @description 只有一层节点 */\n\t\tconst fold = computed<boolean>(() => {\n\t\t\tconst childrenKey = props.props.children ?? \"children\";\n\t\t\treturn state.originalTreeData.every((item) => !Array.isArray(item[childrenKey]) || item[childrenKey].length === 0);\n\t\t});\n\n\t\tconst loadData = async () => {\n\t\t\tconst currentRequestVersion = ++requestVersion;\n\t\t\tlet curSelectedData: string | number | undefined;\n\t\t\tif (props.nodeKey) {\n\t\t\t\t// 记录原本选中的值\n\t\t\t\tconst currentKey = treeRef.value?.getCurrentKey();\n\t\t\t\tif (typeof currentKey === \"string\" || typeof currentKey === \"number\") curSelectedData = currentKey;\n\t\t\t}\n\t\t\tlet treeData: ElTreeOutput[];\n\t\t\t// 判断是否需要自动请求\n\t\t\tif (props.requestApi) {\n\t\t\t\tstate.loading = true;\n\t\t\t\tconst params = {\n\t\t\t\t\t...(typeof props.initParam === \"object\" && props.initParam !== null ? props.initParam : {}),\n\t\t\t\t\tsearchValue: state.searchValue,\n\t\t\t\t};\n\t\t\t\ttry {\n\t\t\t\t\tconst responseData = await props.requestApi(params);\n\t\t\t\t\ttreeData = responseData.map((item) => ({ ...item }));\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\tthrow error;\n\t\t\t\t} finally {\n\t\t\t\t\tif (currentRequestVersion === requestVersion) state.loading = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttreeData = props.data.map((item) => ({ ...item }));\n\t\t\t}\n\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\tif (!props.hideAll) {\n\t\t\t\ttreeData.unshift({ [props.nodeKey]: props.allValue, label: \"全部\", value: null, all: true });\n\t\t\t}\n\t\t\tstate.originalTreeData = treeData;\n\t\t\tstate.treeData = treeData;\n\t\t\temit(\"dataChange\", state.treeData);\n\t\t\tconst selectedKey = curSelectedData ?? props.modelValue ?? props.defaultSelection;\n\t\t\tif (props.nodeKey && (typeof selectedKey === \"string\" || typeof selectedKey === \"number\")) {\n\t\t\t\tnextTick(() => {\n\t\t\t\t\t// 设置原本选中的值\n\t\t\t\t\ttreeRef.value?.setCurrentKey(selectedKey);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tconst handleHamburgerClick = () => {\n\t\t\tif (state.hamburger) {\n\t\t\t\tstate.treeData = state.originalTreeData;\n\t\t\t} else {\n\t\t\t\t// 折叠只显示一级数据\n\t\t\t\tstate.treeData = state.originalTreeData.map((item) => ({ ...item, [props.props.children ?? \"children\"]: [] }));\n\t\t\t}\n\t\t\tstate.hamburger = !state.hamburger;\n\t\t};\n\n\t\tconst handleFilterNode = (value: FilterValue, data: TreeNodeData, child: TreeNode) => {\n\t\t\tif (!value) return true;\n\t\t\tconst isAll: unknown = data[\"all\"];\n\t\t\tconst dataLabel: unknown = data[\"label\"];\n\t\t\tlet parentNode = child.parent,\n\t\t\t\tlabels: unknown[] = isAll ? [dataLabel] : [child.label],\n\t\t\t\tlevel = 1;\n\t\t\twhile (level < child.level && parentNode) {\n\t\t\t\tlabels = [...labels, parentNode.label];\n\t\t\t\tparentNode = parentNode.parent;\n\t\t\t\tlevel++;\n\t\t\t}\n\t\t\tconst filterText = typeof value === \"string\" || typeof value === \"number\" ? String(value) : \"\";\n\t\t\tconst result = labels.some((label) =>\n\t\t\t\ttypeof label === \"string\" || typeof label === \"number\" ? String(label).includes(filterText) : false\n\t\t\t);\n\t\t\tif (props.filterNodeMethod) {\n\t\t\t\treturn result && props.filterNodeMethod(value, data, child);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\n\t\tconst handleNodeClick = (data: ElTreeOutput, node: TreeNode, instance: ComponentInternalInstance | null, event: MouseEvent) => {\n\t\t\tif (!instance) return;\n\t\t\t// 判断是否开启点击展开节点,并且节点是折叠状态,则自动展开,否则需要点击箭头图标才能折叠或开启 'collapseOnClickNode'\n\t\t\tif (props.expandOnClickNode) {\n\t\t\t\tif (!node.expanded) {\n\t\t\t\t\tnode.expand();\n\t\t\t\t} else if (props.collapseOnClickNode) {\n\t\t\t\t\tnode.collapse();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (data[\"all\"] || (node.key !== undefined && node.key !== null)) {\n\t\t\t\tconst value = data[\"all\"] ? props.allValue : node.key;\n\t\t\t\tif (!isEqual(state.value, value)) {\n\t\t\t\t\tstate.value = value;\n\t\t\t\t\tselectedLabel.value = node.label;\n\t\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\t\temit(\"change\", data, node, instance, event);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// eslint-disable-next-line vue/custom-event-name-casing -- Element Plus 的公开事件名为 node-click,需要保持原始名称透传。\n\t\t\temit(\"node-click\", data, node, instance, event);\n\t\t};\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t(newValue) => {\n\t\t\t\tstate.value = newValue;\n\t\t\t\tif (typeof newValue === \"string\" || typeof newValue === \"number\") treeRef.value?.setCurrentKey(newValue);\n\t\t\t},\n\t\t\t{ immediate: true }\n\t\t);\n\n\t\twatch(\n\t\t\t() => props.hamburger,\n\t\t\t(newValue) => {\n\t\t\t\tstate.hamburger = newValue;\n\t\t\t},\n\t\t\t{ immediate: true }\n\t\t);\n\n\t\twatch(\n\t\t\t() => props.data,\n\t\t\t() => {\n\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\treturn loadData();\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ deep: true }\n\t\t);\n\n\t\tonMounted(async () => {\n\t\t\tawait loadData();\n\t\t});\n\n\t\tconst elTreeProps = useProps(props, treeProps, [\"data\", \"expandOnClickNode\", \"filterNodeMethod\"]);\n\t\tconst elTreeEmits = useEmits(treeEmits, emit, [\"node-click\"]);\n\n\t\tuseRender(() => (\n\t\t\t<div\n\t\t\t\tclass={[\"el-card fa-tree\", `fa-tree-${globalSize.value}`, { \"fa-tree__fold\": state.hamburger || fold.value }]}\n\t\t\t\tstyle={{ width: state.width }}\n\t\t\t\tvLoading={state.loading}\n\t\t\t>\n\t\t\t\t{(props.title !== undefined || props.hamburger) && (\n\t\t\t\t\t<div class=\"fa-tree__title\">\n\t\t\t\t\t\t{props.title && <h4>{props.title}</h4>}\n\t\t\t\t\t\t{props.hamburger &&\n\t\t\t\t\t\t\t(state.hamburger ? (\n\t\t\t\t\t\t\t\t<ElIcon onClick={handleHamburgerClick} title=\"展开\">\n\t\t\t\t\t\t\t\t\t<Expand />\n\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<ElIcon onClick={handleHamburgerClick} title=\"折叠\">\n\t\t\t\t\t\t\t\t\t<Fold />\n\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{!props.hideFilter && (\n\t\t\t\t\t<ElInput\n\t\t\t\t\t\tclass=\"fa-tree__search-input\"\n\t\t\t\t\t\tvModel_trim={state.searchValue}\n\t\t\t\t\t\tplaceholder={state.hamburger ? \"关键字过滤\" : \"输入关键字进行过滤\"}\n\t\t\t\t\t\tclearable={Boolean(state.searchValue)}\n\t\t\t\t\t\tonInput={(value) => treeRef.value?.filter(value)}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<ElScrollbar class=\"fa-tree__scrollbar\">\n\t\t\t\t\t<ElTree\n\t\t\t\t\t\t{...elTreeProps.value}\n\t\t\t\t\t\t{...elTreeEmits.value}\n\t\t\t\t\t\tref={treeRef}\n\t\t\t\t\t\tdata={state.treeData}\n\t\t\t\t\t\texpandOnClickNode={props.checkOnClickNode ? false : props.expandOnClickNode}\n\t\t\t\t\t\tfilterNodeMethod={handleFilterNode}\n\t\t\t\t\t\tonNode-click={handleNodeClick}\n\t\t\t\t\t>\n\t\t\t\t\t\t{{\n\t\t\t\t\t\t\tdefault: ({ node, data }: { node: TreeNode; data: ElTreeOutput }) => (\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclass=\"el-tree-node__label\"\n\t\t\t\t\t\t\t\t\ttitle={data[\"all\"] ? data.label : node.label}\n\t\t\t\t\t\t\t\t\tstyle={{ paddingLeft: fold.value ? \"3px\" : \"\" }}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div>{data[\"all\"] ? data.label : slots.label ? slots.label({ node, data }) : node.label}</div>\n\t\t\t\t\t\t\t\t\t{node.key && data.showQuantity ? <span>[{data.quantity}]</span> : null}\n\t\t\t\t\t\t\t\t\t{!data[\"all\"] && slots.default && <span>{slots.default({ node, data })}</span>}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t...(slots.empty && { empty: () => slots.empty?.() ?? [] }),\n\t\t\t\t\t\t}}\n\t\t\t\t\t</ElTree>\n\t\t\t\t</ElScrollbar>\n\t\t\t</div>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 过滤所有树节点,过滤后的节点将被隐藏 */\n\t\t\tfilter: computed(() => treeRef.value?.filter),\n\t\t\t/** @description 获取节点的唯一标识。 */\n\t\t\tgetNodeKey: computed(() => treeRef.value?.getNodeKey),\n\t\t\t/** @description 获取指定节点的路径数据。 */\n\t\t\tgetNodePath: computed(() => treeRef.value?.getNodePath),\n\t\t\t/** @description 为节点设置新数据,只有当设置 node-key 属性的时候才可用 */\n\t\t\tupdateKeyChildren: computed(() => treeRef.value?.updateKeyChildren),\n\t\t\t/** @description 如果节点可以被选中,(show-checkbox 为 true), 本方法将返回当前选中节点的数组 */\n\t\t\tgetCheckedNodes: computed(() => treeRef.value?.getCheckedNodes),\n\t\t\t/** @description 设置目前勾选的节点,使用此方法必须提前设置 node-key 属性 */\n\t\t\tsetCheckedNodes: computed(() => treeRef.value?.setCheckedNodes),\n\t\t\t/** @description \t若节点可用被选中 (show-checkbox 为 true), 它将返回当前选中节点 key 的数组 */\n\t\t\tgetCheckedKeys: computed(() => treeRef.value?.getCheckedKeys),\n\t\t\t/** @description 设置目前选中的节点,使用此方法必须设置 node-key 属性 */\n\t\t\tsetCheckedKeys: computed(() => treeRef.value?.setCheckedKeys),\n\t\t\t/** @description 设置节点是否被选中, 使用此方法必须设置 node-key 属性 */\n\t\t\tsetChecked: computed(() => treeRef.value?.setChecked),\n\t\t\t/** @description 如果节点可用被选中 (show-checkbox 为 true), 它将返回当前半选中的节点组成的数组 */\n\t\t\tgetHalfCheckedNodes: computed(() => treeRef.value?.getHalfCheckedNodes),\n\t\t\t/** @description 若节点可被选中(show-checkbox 为 true),则返回目前半选中的节点的 key 所组成的数组 */\n\t\t\tgetHalfCheckedKeys: computed(() => treeRef.value?.getHalfCheckedKeys),\n\t\t\t/** @description 返回当前被选中节点的数据 (如果没有则返回 null) */\n\t\t\tgetCurrentKey: computed(() => treeRef.value?.getCurrentKey),\n\t\t\t/** @description 返回当前被选中节点的数据 (如果没有则返回 null) */\n\t\t\tgetCurrentNode: computed(() => treeRef.value?.getCurrentNode),\n\t\t\t/** @description 通过 key 设置某个节点的当前选中状态,使用此方法必须设置 node-key 属性 */\n\t\t\tsetCurrentKey: computed(() => treeRef.value?.setCurrentKey),\n\t\t\t/** @description 设置节点为选中状态,使用此方法必须设置 node-key 属性 */\n\t\t\tsetCurrentNode: computed(() => treeRef.value?.setCurrentNode),\n\t\t\t/** @description 根据 data 或者 key 拿到 Tree 组件中的 node */\n\t\t\tgetNode: computed(() => treeRef.value?.getNode),\n\t\t\t/** @description 删除 Tree 中的一个节点,使用此方法必须设置 node-key 属性 */\n\t\t\tremove: computed(() => treeRef.value?.remove),\n\t\t\t/** @description 为 Tree 中的一个节点追加一个子节点 */\n\t\t\tappend: computed(() => treeRef.value?.append),\n\t\t\t/** @description 在 Tree 中给定节点前插入一个节点 */\n\t\t\tinsertBefore: computed(() => treeRef.value?.insertBefore),\n\t\t\t/** @description 在 Tree 中给定节点后插入一个节点 */\n\t\t\tinsertAfter: computed(() => treeRef.value?.insertAfter),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading: computed(() => state.loading),\n\t\t\t/** @description 刷新 */\n\t\t\trefresh: loadData,\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;AAWA,MAAa,cAAc;CAC1B,GAAG;;CAEH,kBAAkB,EACjB,MAAM,eAAyC,QAAQ,EACxD;;CAEA,UAAU;EACT,MAAM;EACN,SAAS,KAAA;CACV;;CAEA,SAAS;EACR,MAAM;EACN,SAAS;CACV;;CAEA,kBAAkB;EACjB,MAAM;EACN,SAAS;CACV;;CAEA,kBAAkB;EACjB,MAAM;EACN,SAAS;CACV;;CAEA,kBAAkB;EACjB,MAAM;EACN,SAAS;CACV;;CAEA,qBAAqB;;CAErB,YAAY;EACX,MAAM,eAA0D;GAAC;GAAQ;GAAQ;GAAS;EAAM,CAAC;EACjG,SAAS,KAAA;CACV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AAe,QAAQ,OAAO,MAAM;;GAE5C,YAAY,eAAe,QAAQ,OAAO,UAAU;;GAEpD,aAAa,eAAe,QAAQ,OAAO,WAAW;;GAEtD,mBAAmB,eAAe,QAAQ,OAAO,iBAAiB;;GAElE,iBAAiB,eAAe,QAAQ,OAAO,eAAe;;GAE9D,iBAAiB,eAAe,QAAQ,OAAO,eAAe;;GAE9D,gBAAgB,eAAe,QAAQ,OAAO,cAAc;;GAE5D,gBAAgB,eAAe,QAAQ,OAAO,cAAc;;GAE5D,YAAY,eAAe,QAAQ,OAAO,UAAU;;GAEpD,qBAAqB,eAAe,QAAQ,OAAO,mBAAmB;;GAEtE,oBAAoB,eAAe,QAAQ,OAAO,kBAAkB;;GAEpE,eAAe,eAAe,QAAQ,OAAO,aAAa;;GAE1D,gBAAgB,eAAe,QAAQ,OAAO,cAAc;;GAE5D,eAAe,eAAe,QAAQ,OAAO,aAAa;;GAE1D,gBAAgB,eAAe,QAAQ,OAAO,cAAc;;GAE5D,SAAS,eAAe,QAAQ,OAAO,OAAO;;GAE9C,QAAQ,eAAe,QAAQ,OAAO,MAAM;;GAE5C,QAAQ,eAAe,QAAQ,OAAO,MAAM;;GAE5C,cAAc,eAAe,QAAQ,OAAO,YAAY;;GAExD,aAAa,eAAe,QAAQ,OAAO,WAAW;;GAEtD,SAAS,eAAe,MAAM,OAAO;;GAErC,SAAS;EACV,CAAC;CACF;AACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"tree.mjs","names":["update:modelValue","update:label","node-click"],"sources":["../../../../src/components/tree/src/tree.tsx"],"sourcesContent":["import { computed, defineComponent, nextTick, onMounted, reactive, shallowRef, toRef, useModel, watch } from \"vue\";\nimport { Expand, Fold } from \"@element-plus/icons-vue\";\nimport { ElIcon, ElInput, ElScrollbar, ElTree, treeEmits, treeProps, useGlobalSize } from \"element-plus\";\nimport { addCssUnit, definePropType, isEqual, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport type { FilterValue, TreeNodeData } from \"element-plus\";\nimport type { ComponentInternalInstance } from \"vue\";\nimport type { PagedInput } from \"../../table\";\nimport type { FilterNodeMethodFunction, TreeNode } from \"./tree.props\";\nimport type { ElTreeOutput } from \"./tree.type\";\n\n/** FaTree 的运行时 Props 定义。 */\nexport const faTreeProps = {\n\t...treeProps,\n\t/** 树节点筛选方法。 */\n\tfilterNodeMethod: {\n\t\ttype: definePropType<FilterNodeMethodFunction>(Function),\n\t},\n\t/** @description whether Select is disabled 重载使其支持 ElForm*/\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: undefined,\n\t},\n\t/** 每个树节点用来作为唯一标识的属性,整棵树应该是唯一的 */\n\tnodeKey: {\n\t\ttype: String,\n\t\tdefault: \"value\",\n\t},\n\t/** @description 是否默认展开所有节点 */\n\tdefaultExpandAll: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否在点击节点的时候选中节点 */\n\tcheckOnClickNode: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否高亮当前选中节点 */\n\thighlightCurrent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 点击折叠节点,需要开启 'expandOnClickNode' */\n\tcollapseOnClickNode: Boolean,\n\t/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<string | number | boolean | object | null>([String, Number, Boolean, Object]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: String,\n\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: 180,\n\t},\n\t/** @description 默认选择 */\n\tdefaultSelection: [String, Number],\n\t/** @description 标题 */\n\ttitle: String,\n\t/** @description 折叠 */\n\thamburger: Boolean,\n\t/** @description 隐藏全部 */\n\thideAll: Boolean,\n\t/** @description 隐藏过滤 */\n\thideFilter: Boolean,\n\t/** @description 全部值 */\n\tallValue: {\n\t\ttype: definePropType<string | number | boolean | object | null>([String, Number, Boolean, Object]),\n\t\tdefault: undefined,\n\t},\n\t/** @description 树形数据 */\n\tdata: {\n\t\ttype: definePropType<ElTreeOutput[]>(Array),\n\t\tdefault: () => [],\n\t},\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: string | number | PagedInput) => Promise<ElTreeOutput[]>>(Function),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | PagedInput | null>([String, Number, Object]),\n};\n\n/** FaTree 的运行时 Emits 定义。 */\nexport const faTreeEmits = {\n\t...treeEmits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string | number | boolean | object | null | undefined) =>\n\t\ttypeof value === \"string\" ||\n\t\ttypeof value === \"number\" ||\n\t\ttypeof value === \"boolean\" ||\n\t\t(typeof value === \"object\" && value !== null) ||\n\t\tvalue == null,\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string) => typeof value === \"string\" || value === null,\n\t/** @description 数据改变 */\n\tdataChange: (data: ElTreeOutput[]) => Array.isArray(data),\n\t/** @description 选中数据改变 */\n\tchange: (_data: ElTreeOutput, _node: TreeNode, _instance: ComponentInternalInstance, _event: MouseEvent) => true,\n\t/** @description 节点点击 */\n\t\"node-click\": (_data: ElTreeOutput, _node: TreeNode, _instance: ComponentInternalInstance | null, _event: MouseEvent) => true,\n};\n\n/** FaTree 的插槽参数。 */\nexport interface FaTreeSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: { node: TreeNode; data: ElTreeOutput };\n\t/** @description 当数据为空时自定义的内容 */\n\tempty: never;\n\t/** @description 显示内容插槽 */\n\tlabel: { node: TreeNode; data: ElTreeOutput };\n}\n\nexport default defineComponent({\n\tname: \"FaTree\",\n\tprops: faTreeProps,\n\temits: faTreeEmits,\n\tslots: makeSlots<FaTreeSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst selectedLabel = useModel(props, \"label\");\n\n\t\tconst globalSize = useGlobalSize();\n\t\tconst treeRef = shallowRef<InstanceType<typeof ElTree> | null>(null);\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<string | number | boolean | object | null | undefined>(),\n\t\t\tloading: false,\n\t\t\tsearchValue: withDefineType<string>(),\n\t\t\toriginalTreeData: withDefineType<ElTreeOutput[]>([]),\n\t\t\ttreeData: withDefineType<ElTreeOutput[]>([]),\n\t\t\thamburger: false,\n\t\t\twidth: computed(() => {\n\t\t\t\tif (state.hamburger) {\n\t\t\t\t\treturn \"130px\";\n\t\t\t\t} else {\n\t\t\t\t\tconst width = addCssUnit(props.width);\n\t\t\t\t\tif (globalSize.value === \"small\") {\n\t\t\t\t\t\treturn `calc(${width} * 0.9)`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn width;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}),\n\t\t});\n\t\tlet requestVersion = 0;\n\n\t\t/** @description 只有一层节点 */\n\t\tconst fold = computed<boolean>(() => {\n\t\t\tconst childrenKey = props.props.children ?? \"children\";\n\t\t\treturn state.originalTreeData.every((item) => !Array.isArray(item[childrenKey]) || item[childrenKey].length === 0);\n\t\t});\n\n\t\tconst loadData = async () => {\n\t\t\tconst currentRequestVersion = ++requestVersion;\n\t\t\tlet curSelectedData: string | number | undefined;\n\t\t\tif (props.nodeKey) {\n\t\t\t\t// 记录原本选中的值\n\t\t\t\tconst currentKey = treeRef.value?.getCurrentKey();\n\t\t\t\tif (typeof currentKey === \"string\" || typeof currentKey === \"number\") curSelectedData = currentKey;\n\t\t\t}\n\t\t\tlet treeData: ElTreeOutput[];\n\t\t\t// 判断是否需要自动请求\n\t\t\tif (props.requestApi) {\n\t\t\t\tstate.loading = true;\n\t\t\t\tconst params = {\n\t\t\t\t\t...(typeof props.initParam === \"object\" && props.initParam !== null ? props.initParam : {}),\n\t\t\t\t\tsearchValue: state.searchValue,\n\t\t\t\t};\n\t\t\t\ttry {\n\t\t\t\t\tconst responseData = await props.requestApi(params);\n\t\t\t\t\ttreeData = responseData.map((item) => ({ ...item }));\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\tthrow error;\n\t\t\t\t} finally {\n\t\t\t\t\tif (currentRequestVersion === requestVersion) state.loading = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttreeData = props.data.map((item) => ({ ...item }));\n\t\t\t}\n\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\tif (!props.hideAll) {\n\t\t\t\ttreeData.unshift({ [props.nodeKey]: props.allValue, label: \"全部\", value: null, all: true });\n\t\t\t}\n\t\t\tstate.originalTreeData = treeData;\n\t\t\tstate.treeData = treeData;\n\t\t\temit(\"dataChange\", state.treeData);\n\t\t\tconst selectedKey = curSelectedData ?? props.modelValue ?? props.defaultSelection;\n\t\t\tif (props.nodeKey && (typeof selectedKey === \"string\" || typeof selectedKey === \"number\")) {\n\t\t\t\tnextTick(() => {\n\t\t\t\t\t// 设置原本选中的值\n\t\t\t\t\ttreeRef.value?.setCurrentKey(selectedKey);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tconst handleHamburgerClick = () => {\n\t\t\tif (state.hamburger) {\n\t\t\t\tstate.treeData = state.originalTreeData;\n\t\t\t} else {\n\t\t\t\t// 折叠只显示一级数据\n\t\t\t\tstate.treeData = state.originalTreeData.map((item) => ({ ...item, [props.props.children ?? \"children\"]: [] }));\n\t\t\t}\n\t\t\tstate.hamburger = !state.hamburger;\n\t\t};\n\n\t\tconst handleFilterNode = (value: FilterValue, data: TreeNodeData, child: TreeNode) => {\n\t\t\tif (!value) return true;\n\t\t\tconst isAll: unknown = data[\"all\"];\n\t\t\tconst dataLabel: unknown = data[\"label\"];\n\t\t\tlet parentNode = child.parent,\n\t\t\t\tlabels: unknown[] = isAll ? [dataLabel] : [child.label],\n\t\t\t\tlevel = 1;\n\t\t\twhile (level < child.level && parentNode) {\n\t\t\t\tlabels = [...labels, parentNode.label];\n\t\t\t\tparentNode = parentNode.parent;\n\t\t\t\tlevel++;\n\t\t\t}\n\t\t\tconst filterText = typeof value === \"string\" || typeof value === \"number\" ? String(value) : \"\";\n\t\t\tconst result = labels.some((label) =>\n\t\t\t\ttypeof label === \"string\" || typeof label === \"number\" ? String(label).includes(filterText) : false\n\t\t\t);\n\t\t\tif (props.filterNodeMethod) {\n\t\t\t\treturn result && props.filterNodeMethod(value, data, child);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\n\t\tconst handleNodeClick = (data: ElTreeOutput, node: TreeNode, instance: ComponentInternalInstance | null, event: MouseEvent) => {\n\t\t\tif (!instance) return;\n\t\t\t// 判断是否开启点击展开节点,并且节点是折叠状态,则自动展开,否则需要点击箭头图标才能折叠或开启 'collapseOnClickNode'\n\t\t\tif (props.expandOnClickNode) {\n\t\t\t\tif (!node.expanded) {\n\t\t\t\t\tnode.expand();\n\t\t\t\t} else if (props.collapseOnClickNode) {\n\t\t\t\t\tnode.collapse();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (data[\"all\"] || (node.key !== undefined && node.key !== null)) {\n\t\t\t\tconst value = data[\"all\"] ? props.allValue : node.key;\n\t\t\t\tif (!isEqual(state.value, value)) {\n\t\t\t\t\tstate.value = value;\n\t\t\t\t\tselectedLabel.value = node.label;\n\t\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\t\temit(\"change\", data, node, instance, event);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// eslint-disable-next-line vue/custom-event-name-casing -- Element Plus 的公开事件名为 node-click,需要保持原始名称透传。\n\t\t\temit(\"node-click\", data, node, instance, event);\n\t\t};\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t(newValue) => {\n\t\t\t\tstate.value = newValue;\n\t\t\t\tif (typeof newValue === \"string\" || typeof newValue === \"number\") treeRef.value?.setCurrentKey(newValue);\n\t\t\t},\n\t\t\t{ immediate: true }\n\t\t);\n\n\t\twatch(\n\t\t\t() => props.hamburger,\n\t\t\t(newValue) => {\n\t\t\t\tstate.hamburger = newValue;\n\t\t\t},\n\t\t\t{ immediate: true }\n\t\t);\n\n\t\twatch(\n\t\t\t() => props.data,\n\t\t\t() => {\n\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\treturn loadData();\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ deep: true }\n\t\t);\n\n\t\tonMounted(async () => {\n\t\t\tawait loadData();\n\t\t});\n\n\t\tconst elTreeProps = useProps(props, treeProps, [\"data\", \"expandOnClickNode\", \"filterNodeMethod\"]);\n\t\tconst elTreeEmits = useEmits(treeEmits, emit, [\"node-click\"]);\n\n\t\tuseRender(() => (\n\t\t\t<div\n\t\t\t\tclass={[\"el-card fa-tree\", `fa-tree-${globalSize.value}`, { \"fa-tree__fold\": state.hamburger || fold.value }]}\n\t\t\t\tstyle={{ width: state.width }}\n\t\t\t\tvLoading={state.loading}\n\t\t\t>\n\t\t\t\t{(props.title !== undefined || props.hamburger) && (\n\t\t\t\t\t<div class=\"fa-tree__title\">\n\t\t\t\t\t\t{props.title && <h4>{props.title}</h4>}\n\t\t\t\t\t\t{props.hamburger &&\n\t\t\t\t\t\t\t(state.hamburger ? (\n\t\t\t\t\t\t\t\t<ElIcon onClick={handleHamburgerClick} title=\"展开\">\n\t\t\t\t\t\t\t\t\t<Expand />\n\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<ElIcon onClick={handleHamburgerClick} title=\"折叠\">\n\t\t\t\t\t\t\t\t\t<Fold />\n\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{!props.hideFilter && (\n\t\t\t\t\t<ElInput\n\t\t\t\t\t\tclass=\"fa-tree__search-input\"\n\t\t\t\t\t\tvModel_trim={state.searchValue}\n\t\t\t\t\t\tplaceholder={state.hamburger ? \"关键字过滤\" : \"输入关键字进行过滤\"}\n\t\t\t\t\t\tclearable={Boolean(state.searchValue)}\n\t\t\t\t\t\tonInput={(value) => treeRef.value?.filter(value)}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<ElScrollbar class=\"fa-tree__scrollbar\">\n\t\t\t\t\t<ElTree\n\t\t\t\t\t\t{...elTreeProps.value}\n\t\t\t\t\t\t{...elTreeEmits.value}\n\t\t\t\t\t\tref={treeRef}\n\t\t\t\t\t\tdata={state.treeData}\n\t\t\t\t\t\texpandOnClickNode={props.checkOnClickNode ? false : props.expandOnClickNode}\n\t\t\t\t\t\tfilterNodeMethod={handleFilterNode}\n\t\t\t\t\t\tonNode-click={handleNodeClick}\n\t\t\t\t\t>\n\t\t\t\t\t\t{{\n\t\t\t\t\t\t\tdefault: ({ node, data }: { node: TreeNode; data: ElTreeOutput }) => (\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclass=\"el-tree-node__label\"\n\t\t\t\t\t\t\t\t\ttitle={data[\"all\"] ? data.label : node.label}\n\t\t\t\t\t\t\t\t\tstyle={{ paddingLeft: fold.value ? \"3px\" : \"\" }}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div>{data[\"all\"] ? data.label : slots.label ? slots.label({ node, data }) : node.label}</div>\n\t\t\t\t\t\t\t\t\t{node.key && data.showQuantity ? <span>[{data.quantity}]</span> : null}\n\t\t\t\t\t\t\t\t\t{!data[\"all\"] && slots.default && <span>{slots.default({ node, data })}</span>}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t...(slots.empty && { empty: () => slots.empty?.() ?? [] }),\n\t\t\t\t\t\t}}\n\t\t\t\t\t</ElTree>\n\t\t\t\t</ElScrollbar>\n\t\t\t</div>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 过滤所有树节点,过滤后的节点将被隐藏 */\n\t\t\tfilter: computed(() => treeRef.value?.filter),\n\t\t\t/** @description 获取节点的唯一标识。 */\n\t\t\tgetNodeKey: computed(() => treeRef.value?.getNodeKey),\n\t\t\t/** @description 获取指定节点的路径数据。 */\n\t\t\tgetNodePath: computed(() => treeRef.value?.getNodePath),\n\t\t\t/** @description 为节点设置新数据,只有当设置 node-key 属性的时候才可用 */\n\t\t\tupdateKeyChildren: computed(() => treeRef.value?.updateKeyChildren),\n\t\t\t/** @description 如果节点可以被选中,(show-checkbox 为 true), 本方法将返回当前选中节点的数组 */\n\t\t\tgetCheckedNodes: computed(() => treeRef.value?.getCheckedNodes),\n\t\t\t/** @description 设置目前勾选的节点,使用此方法必须提前设置 node-key 属性 */\n\t\t\tsetCheckedNodes: computed(() => treeRef.value?.setCheckedNodes),\n\t\t\t/** @description \t若节点可用被选中 (show-checkbox 为 true), 它将返回当前选中节点 key 的数组 */\n\t\t\tgetCheckedKeys: computed(() => treeRef.value?.getCheckedKeys),\n\t\t\t/** @description 设置目前选中的节点,使用此方法必须设置 node-key 属性 */\n\t\t\tsetCheckedKeys: computed(() => treeRef.value?.setCheckedKeys),\n\t\t\t/** @description 设置节点是否被选中, 使用此方法必须设置 node-key 属性 */\n\t\t\tsetChecked: computed(() => treeRef.value?.setChecked),\n\t\t\t/** @description 如果节点可用被选中 (show-checkbox 为 true), 它将返回当前半选中的节点组成的数组 */\n\t\t\tgetHalfCheckedNodes: computed(() => treeRef.value?.getHalfCheckedNodes),\n\t\t\t/** @description 若节点可被选中(show-checkbox 为 true),则返回目前半选中的节点的 key 所组成的数组 */\n\t\t\tgetHalfCheckedKeys: computed(() => treeRef.value?.getHalfCheckedKeys),\n\t\t\t/** @description 返回当前被选中节点的数据 (如果没有则返回 null) */\n\t\t\tgetCurrentKey: computed(() => treeRef.value?.getCurrentKey),\n\t\t\t/** @description 返回当前被选中节点的数据 (如果没有则返回 null) */\n\t\t\tgetCurrentNode: computed(() => treeRef.value?.getCurrentNode),\n\t\t\t/** @description 通过 key 设置某个节点的当前选中状态,使用此方法必须设置 node-key 属性 */\n\t\t\tsetCurrentKey: computed(() => treeRef.value?.setCurrentKey),\n\t\t\t/** @description 设置节点为选中状态,使用此方法必须设置 node-key 属性 */\n\t\t\tsetCurrentNode: computed(() => treeRef.value?.setCurrentNode),\n\t\t\t/** @description 根据 data 或者 key 拿到 Tree 组件中的 node */\n\t\t\tgetNode: computed(() => treeRef.value?.getNode),\n\t\t\t/** @description 删除 Tree 中的一个节点,使用此方法必须设置 node-key 属性 */\n\t\t\tremove: computed(() => treeRef.value?.remove),\n\t\t\t/** @description 为 Tree 中的一个节点追加一个子节点 */\n\t\t\tappend: computed(() => treeRef.value?.append),\n\t\t\t/** @description 在 Tree 中给定节点前插入一个节点 */\n\t\t\tinsertBefore: computed(() => treeRef.value?.insertBefore),\n\t\t\t/** @description 在 Tree 中给定节点后插入一个节点 */\n\t\t\tinsertAfter: computed(() => treeRef.value?.insertAfter),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading: toRef(state, \"loading\"),\n\t\t\t/** @description 刷新 */\n\t\t\trefresh: loadData,\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;AAWA,MAAa,cAAc;CAC1B,GAAG;;CAEH,kBAAkB,EACjB,MAAM,eAAyC,QAAQ,EACxD;;CAEA,UAAU;EACT,MAAM;EACN,SAAS,KAAA;CACV;;CAEA,SAAS;EACR,MAAM;EACN,SAAS;CACV;;CAEA,kBAAkB;EACjB,MAAM;EACN,SAAS;CACV;;CAEA,kBAAkB;EACjB,MAAM;EACN,SAAS;CACV;;CAEA,kBAAkB;EACjB,MAAM;EACN,SAAS;CACV;;CAEA,qBAAqB;;CAErB,YAAY;EACX,MAAM,eAA0D;GAAC;GAAQ;GAAQ;GAAS;EAAM,CAAC;EACjG,SAAS,KAAA;CACV;;CAEA,OAAO;;CAEP,OAAO;EACN,MAAM,CAAC,QAAQ,MAAM;EACrB,SAAS;CACV;;CAEA,kBAAkB,CAAC,QAAQ,MAAM;;CAEjC,OAAO;;CAEP,WAAW;;CAEX,SAAS;;CAET,YAAY;;CAEZ,UAAU;EACT,MAAM,eAA0D;GAAC;GAAQ;GAAQ;GAAS;EAAM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AAe;;GAE9D,gBAAgB,eAAe,QAAQ,OAAO,cAAc;;GAE5D,gBAAgB,eAAe,QAAQ,OAAO,cAAc;;GAE5D,YAAY,eAAe,QAAQ,OAAO,UAAU;;GAEpD,qBAAqB,eAAe,QAAQ,OAAO,mBAAmB;;GAEtE,oBAAoB,eAAe,QAAQ,OAAO,kBAAkB;;GAEpE,eAAe,eAAe,QAAQ,OAAO,aAAa;;GAE1D,gBAAgB,eAAe,QAAQ,OAAO,cAAc;;GAE5D,eAAe,eAAe,QAAQ,OAAO,aAAa;;GAE1D,gBAAgB,eAAe,QAAQ,OAAO,cAAc;;GAE5D,SAAS,eAAe,QAAQ,OAAO,OAAO;;GAE9C,QAAQ,eAAe,QAAQ,OAAO,MAAM;;GAE5C,QAAQ,eAAe,QAAQ,OAAO,MAAM;;GAE5C,cAAc,eAAe,QAAQ,OAAO,YAAY;;GAExD,aAAa,eAAe,QAAQ,OAAO,WAAW;;GAEtD,SAAS,MAAM,OAAO,SAAS;;GAE/B,SAAS;EACV,CAAC;CACF;AACD,CAAC"}
|
|
@@ -199,7 +199,9 @@ export declare const faTreeSelectProps: {
|
|
|
199
199
|
filterable: BooleanConstructor;
|
|
200
200
|
allowCreate: BooleanConstructor;
|
|
201
201
|
loading: BooleanConstructor;
|
|
202
|
-
popperClass: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (
|
|
202
|
+
popperClass: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (
|
|
203
|
+
/** 每个树节点用来作为唯一标识的属性,整棵树应该是唯一的 */
|
|
204
|
+
...args: any[]) => string | false | Record<string, any> | import("element-plus/es/utils/typescript.mjs").ClassValue[]) | (() => import("element-plus/es/utils/typescript.mjs").ClassValue) | (((new (...args: any[]) => string | false | Record<string, any> | import("element-plus/es/utils/typescript.mjs").ClassValue[]) | (() => import("element-plus/es/utils/typescript.mjs").ClassValue)) | null)[], unknown, unknown, string, boolean>;
|
|
203
205
|
popperStyle: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (...args: any[]) => string | false | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue) | (((new (...args: any[]) => string | false | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
|
|
204
206
|
popperOptions: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (...args: any[]) => Partial<import("element-plus").Options>) | (() => Partial<import("element-plus").Options>) | (((new (...args: any[]) => Partial<import("element-plus").Options>) | (() => Partial<import("element-plus").Options>)) | null)[], unknown, unknown, () => Partial<import("element-plus").Options>, boolean>;
|
|
205
207
|
remote: BooleanConstructor;
|
|
@@ -233,7 +235,9 @@ export declare const faTreeSelectProps: {
|
|
|
233
235
|
persistent: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
234
236
|
clearIcon: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown, import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
|
|
235
237
|
fitInputWidth: BooleanConstructor;
|
|
236
|
-
suffixIcon: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (
|
|
238
|
+
suffixIcon: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (
|
|
239
|
+
/** @description select 组件自定义 loading内容 */
|
|
240
|
+
...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown, import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
|
|
237
241
|
tagType: {
|
|
238
242
|
default: string;
|
|
239
243
|
type: import("vue").PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<StringConstructor, "info" | "primary" | "success" | "warning" | "danger", unknown>>;
|
|
@@ -522,7 +526,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
522
526
|
filterable: BooleanConstructor;
|
|
523
527
|
allowCreate: BooleanConstructor;
|
|
524
528
|
loading: BooleanConstructor;
|
|
525
|
-
popperClass: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (
|
|
529
|
+
popperClass: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (
|
|
530
|
+
/** 每个树节点用来作为唯一标识的属性,整棵树应该是唯一的 */
|
|
531
|
+
...args: any[]) => string | false | Record<string, any> | import("element-plus/es/utils/typescript.mjs").ClassValue[]) | (() => import("element-plus/es/utils/typescript.mjs").ClassValue) | (((new (...args: any[]) => string | false | Record<string, any> | import("element-plus/es/utils/typescript.mjs").ClassValue[]) | (() => import("element-plus/es/utils/typescript.mjs").ClassValue)) | null)[], unknown, unknown, string, boolean>;
|
|
526
532
|
popperStyle: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (...args: any[]) => string | false | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue) | (((new (...args: any[]) => string | false | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
|
|
527
533
|
popperOptions: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (...args: any[]) => Partial<import("element-plus").Options>) | (() => Partial<import("element-plus").Options>) | (((new (...args: any[]) => Partial<import("element-plus").Options>) | (() => Partial<import("element-plus").Options>)) | null)[], unknown, unknown, () => Partial<import("element-plus").Options>, boolean>;
|
|
528
534
|
remote: BooleanConstructor;
|
|
@@ -556,7 +562,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
556
562
|
persistent: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
557
563
|
clearIcon: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown, import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
|
|
558
564
|
fitInputWidth: BooleanConstructor;
|
|
559
|
-
suffixIcon: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (
|
|
565
|
+
suffixIcon: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (
|
|
566
|
+
/** @description select 组件自定义 loading内容 */
|
|
567
|
+
...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown, import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
|
|
560
568
|
tagType: {
|
|
561
569
|
default: string;
|
|
562
570
|
type: import("vue").PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<StringConstructor, "info" | "primary" | "success" | "warning" | "danger", unknown>>;
|
|
@@ -638,7 +646,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
638
646
|
/** @description Element Plus Select 实例。 */
|
|
639
647
|
selectRef: import("vue").ComputedRef<SelectInstance | undefined>;
|
|
640
648
|
/** @description 加载状态 */
|
|
641
|
-
loading: import("vue").
|
|
649
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
642
650
|
/** @description 刷新 */
|
|
643
651
|
refresh: () => Promise<void>;
|
|
644
652
|
/** @description 设置选择 */
|
|
@@ -872,7 +880,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
872
880
|
filterable: BooleanConstructor;
|
|
873
881
|
allowCreate: BooleanConstructor;
|
|
874
882
|
loading: BooleanConstructor;
|
|
875
|
-
popperClass: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (
|
|
883
|
+
popperClass: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (
|
|
884
|
+
/** 每个树节点用来作为唯一标识的属性,整棵树应该是唯一的 */
|
|
885
|
+
...args: any[]) => string | false | Record<string, any> | import("element-plus/es/utils/typescript.mjs").ClassValue[]) | (() => import("element-plus/es/utils/typescript.mjs").ClassValue) | (((new (...args: any[]) => string | false | Record<string, any> | import("element-plus/es/utils/typescript.mjs").ClassValue[]) | (() => import("element-plus/es/utils/typescript.mjs").ClassValue)) | null)[], unknown, unknown, string, boolean>;
|
|
876
886
|
popperStyle: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (...args: any[]) => string | false | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue) | (((new (...args: any[]) => string | false | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
|
|
877
887
|
popperOptions: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (...args: any[]) => Partial<import("element-plus").Options>) | (() => Partial<import("element-plus").Options>) | (((new (...args: any[]) => Partial<import("element-plus").Options>) | (() => Partial<import("element-plus").Options>)) | null)[], unknown, unknown, () => Partial<import("element-plus").Options>, boolean>;
|
|
878
888
|
remote: BooleanConstructor;
|
|
@@ -906,7 +916,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
906
916
|
persistent: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
907
917
|
clearIcon: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown, import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
|
|
908
918
|
fitInputWidth: BooleanConstructor;
|
|
909
|
-
suffixIcon: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (
|
|
919
|
+
suffixIcon: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (
|
|
920
|
+
/** @description select 组件自定义 loading内容 */
|
|
921
|
+
...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown, import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
|
|
910
922
|
tagType: {
|
|
911
923
|
default: string;
|
|
912
924
|
type: import("vue").PropType<import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<StringConstructor, "info" | "primary" | "success" | "warning" | "danger", unknown>>;
|
|
@@ -6,7 +6,7 @@ import { definePropType, useProps } from "../../../utils/vue/props.mjs";
|
|
|
6
6
|
import { useRender } from "../../../utils/vue/render.mjs";
|
|
7
7
|
import { makeSlots } from "../../../utils/vue/slots.mjs";
|
|
8
8
|
import { withDefineType } from "../../../utils/vue/with.mjs";
|
|
9
|
-
import { computed, createVNode, defineComponent, mergeProps, onMounted, reactive, shallowRef, useModel, watch } from "vue";
|
|
9
|
+
import { computed, createVNode, defineComponent, mergeProps, onMounted, reactive, shallowRef, toRef, useModel, watch } from "vue";
|
|
10
10
|
import { ElTreeSelect, selectEmits, selectProps, treeEmits, treeProps } from "element-plus";
|
|
11
11
|
//#region src/components/treeSelect/src/treeSelect.tsx
|
|
12
12
|
const ElTreeSelectRuntime = ElTreeSelect;
|
|
@@ -447,7 +447,7 @@ var treeSelect_default = defineComponent({
|
|
|
447
447
|
/** @description Element Plus Select 实例。 */
|
|
448
448
|
selectRef: computed(() => treeSelectRef.value?.selectRef),
|
|
449
449
|
/** @description 加载状态 */
|
|
450
|
-
loading:
|
|
450
|
+
loading: toRef(state, "loading"),
|
|
451
451
|
/** @description 刷新 */
|
|
452
452
|
refresh: loadData,
|
|
453
453
|
/** @description 设置选择 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"treeSelect.mjs","names":["update:modelValue","update:label","node-click"],"sources":["../../../../src/components/treeSelect/src/treeSelect.tsx"],"sourcesContent":["import { computed, defineComponent, onMounted, reactive, shallowRef, useModel, watch } from \"vue\";\nimport { ElTreeSelect, selectEmits, selectProps, treeEmits, treeProps } from \"element-plus\";\nimport { addCssUnit, definePropType, isEqual, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport type { FilterValue, SelectInstance, TreeInstance, TreeNodeData } from \"element-plus\";\nimport type { ComponentInternalInstance } from \"vue\";\nimport type { ElSelectorModelValue, ElSelectorOutput, ElSelectorValue } from \"../../select\";\nimport type { SelectComponentProps } from \"../../select/src/select\";\nimport type { PagedInput } from \"../../table\";\nimport type { FilterNodeMethodFunction, TreeNode } from \"../../tree/src/tree.props\";\n\n/** 补充 Element Plus TreeSelect 运行时支持但类型声明缺失的事件。 */\ntype ElTreeSelectRuntimeType = typeof ElTreeSelect &\n\t(new () => {\n\t\t$props: InstanceType<typeof ElTreeSelect>[\"$props\"] & {\n\t\t\tonNodeClick?: (data: ElSelectorOutput, node: TreeNode, instance: ComponentInternalInstance | null) => void;\n\t\t\tonChange?: (value: ElSelectorModelValue) => void;\n\t\t\t\"onUpdate:modelValue\"?: (value: ElSelectorModelValue) => void;\n\t\t};\n\t});\n\nconst ElTreeSelectRuntime = ElTreeSelect as ElTreeSelectRuntimeType;\n\n/** Element Plus TreeSelect 运行时实际暴露的方法集合。 */\ntype ElTreeSelectExposes = Pick<SelectInstance, \"focus\" | \"blur\" | \"selectedLabel\"> &\n\tPick<\n\t\tTreeInstance,\n\t\t| \"filter\"\n\t\t| \"updateKeyChildren\"\n\t\t| \"getCheckedNodes\"\n\t\t| \"setCheckedNodes\"\n\t\t| \"getCheckedKeys\"\n\t\t| \"setCheckedKeys\"\n\t\t| \"setChecked\"\n\t\t| \"getHalfCheckedNodes\"\n\t\t| \"getHalfCheckedKeys\"\n\t\t| \"getCurrentKey\"\n\t\t| \"getCurrentNode\"\n\t\t| \"setCurrentKey\"\n\t\t| \"setCurrentNode\"\n\t\t| \"getNode\"\n\t\t| \"remove\"\n\t\t| \"append\"\n\t\t| \"insertBefore\"\n\t\t| \"insertAfter\"\n\t> & {\n\t\ttreeRef: TreeInstance;\n\t\tselectRef: SelectInstance;\n\t};\n\n/** FaTreeSelect 的运行时 Props 定义。 */\nexport const faTreeSelectProps = {\n\t...selectProps,\n\t...treeProps,\n\t/** 树节点筛选方法。 */\n\tfilterNodeMethod: {\n\t\ttype: definePropType<FilterNodeMethodFunction>(Function),\n\t},\n\t/**\n\t * 懒加载节点的缓存数据,结构与数据相同,用于获取未加载数据的标签\n\t * @description The cached data of the lazy node, the structure is the same as the data, used to get the label of the unloaded data\n\t */\n\tcacheData: {\n\t\ttype: definePropType<\n\t\t\t{\n\t\t\t\tvalue: string | number | boolean | object;\n\t\t\t\tcurrentLabel: string | number;\n\t\t\t\tisDisabled: boolean;\n\t\t\t}[]\n\t\t>(Array),\n\t\tdefault: () => [],\n\t},\n\t/** @description whether Select is disabled 重载使其支持 ElForm*/\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: undefined,\n\t},\n\t/** @description displayed text while loading data from server, default is 'Loading' */\n\tloadingText: {\n\t\ttype: String,\n\t\tdefault: \"加载中...\",\n\t},\n\t/** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */\n\tnoMatchText: {\n\t\ttype: String,\n\t\tdefault: \"暂无匹配的数据\",\n\t},\n\t/** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */\n\tnoDataText: {\n\t\ttype: String,\n\t\tdefault: \"暂无数据\",\n\t},\n\t/** @description whether to collapse tags to a text when multiple selecting */\n\tcollapseTags: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true */\n\tcollapseTagsTooltip: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** 每个树节点用来作为唯一标识的属性,整棵树应该是唯一的 */\n\tnodeKey: {\n\t\ttype: String,\n\t\tdefault: \"value\",\n\t},\n\t/** @description 是否默认展开所有节点 */\n\tdefaultExpandAll: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否在点击节点的时候选中节点 */\n\tcheckOnClickNode: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否高亮当前选中节点 */\n\thighlightCurrent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否在点击节点的时候展开或者收缩节点, 默认值为 true,如果为 false,则只有点箭头图标的时候才会展开或者收缩节点。 */\n\texpandOnClickNode: Boolean,\n\t/** @description 点击折叠节点,需要开启 'expandOnClickNode' */\n\tcollapseOnClickNode: Boolean,\n\t/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<ElSelectorModelValue>([String, Number, Boolean, Object, Array]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: definePropType<string | string[] | null>([String, Array]),\n\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"100%\",\n\t},\n\t/** @description 更多细节,只有使用slot的时候有用 */\n\tmoreDetail: Boolean,\n\t/** @description 懒加载远程数据,默认 true。当下拉框第一次显示的时候才会加载远程数据*/\n\tlazy: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 默认选中。不能和懒加载一起使用 */\n\tdefaultSelected: Boolean,\n\t/** @description 配置选项 */\n\tprops: {\n\t\ttype: definePropType<SelectComponentProps>(Object),\n\t\tdefault: () => ({\n\t\t\tlabel: \"label\",\n\t\t\thide: \"hide\",\n\t\t\tdisabled: \"disabled\",\n\t\t\tchildren: \"children\",\n\t\t}),\n\t},\n\t/** @description 下拉框数据 */\n\tdata: {\n\t\ttype: definePropType<ElSelectorOutput[]>(Array),\n\t\tdefault: () => [],\n\t},\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: string | number | PagedInput) => Promise<ElSelectorOutput[]>>(Function),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | PagedInput | null>([String, Number, Object]),\n};\n\n/** FaTreeSelect 的运行时 Emits 定义。 */\nexport const faTreeSelectEmits = {\n\t...selectEmits,\n\t...treeEmits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: ElSelectorModelValue) =>\n\t\ttypeof value === \"string\" ||\n\t\ttypeof value === \"number\" ||\n\t\ttypeof value === \"boolean\" ||\n\t\t(typeof value === \"object\" && value !== null) ||\n\t\tvalue == null,\n\t/** @description 选中数据改变 */\n\tchange: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue) => true,\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string | string[] | null) => typeof value === \"string\" || Array.isArray(value) || value === null,\n\n\t/** @description 数据改变 */\n\tdataChange: (data: ElSelectorOutput[]) => Array.isArray(data),\n\t/** @description 节点点击 */\n\t\"node-click\": (_data: ElSelectorOutput, _node: TreeNode, _instance: ComponentInternalInstance | null) => true,\n};\n\n/** FaTreeSelect 的插槽参数。 */\nexport interface FaTreeSelectSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: { node: TreeNode; data: ElSelectorOutput };\n\n\t/** @description 下拉列表顶部的内容 */\n\theader: never;\n\t/** @description 下拉列表底部的内容 */\n\tfooter: never;\n\t/** @description Select 组件头部内容 */\n\tprefix: never;\n\t/** @description 无选项时的列表 */\n\tempty: never;\n\t/** @description select 组件自定义标签内容 */\n\ttag: never;\n\t/** @description select 组件自定义 loading内容 */\n\tloading: never;\n\t/** @description select 组件自定义标签内容 */\n\tlabel: { label: string; value: string | number | boolean | object };\n}\n\nexport default defineComponent({\n\tname: \"FaTreeSelect\",\n\tprops: faTreeSelectProps,\n\temits: faTreeSelectEmits,\n\tslots: makeSlots<FaTreeSelectSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst selectedLabel = useModel(props, \"label\");\n\n\t\tconst treeSelectRef = shallowRef<ElTreeSelectExposes | null>(null);\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<ElSelectorModelValue>(),\n\t\t\tloading: false,\n\t\t\tselectorData: withDefineType<ElSelectorOutput[]>([]),\n\t\t\t/** 首次出现 */\n\t\t\tdebut: true,\n\t\t\t/** 回显 */\n\t\t\techo: true,\n\t\t\t/** 下次刷新 */\n\t\t\tnextRefresh: false,\n\t\t});\n\n\t\tlet requestVersion = 0;\n\n\t\tconst handleData = (data: ElSelectorOutput[]): ElSelectorOutput[] => {\n\t\t\treturn data\n\t\t\t\t.map((item) => {\n\t\t\t\t\tconst value: unknown = item[props.nodeKey];\n\t\t\t\t\tconst label: unknown = typeof props.props.label === \"function\" ? props.props.label(item) : item[props.props.label ?? \"label\"];\n\t\t\t\t\tconst hide: unknown = typeof props.props.hide === \"function\" ? props.props.hide(item) : item[props.props.hide ?? \"hide\"];\n\t\t\t\t\tconst disabled: unknown =\n\t\t\t\t\t\ttypeof props.props.disabled === \"function\" ? props.props.disabled(item) : item[props.props.disabled ?? \"disabled\"];\n\t\t\t\t\tconst children: unknown = item[props.props.children ?? \"children\"];\n\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t(typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\" || typeof value === \"object\")\n\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...item,\n\t\t\t\t\t\tchildren: Array.isArray(children) ? handleData(children as ElSelectorOutput[]) : [],\n\t\t\t\t\t\tdisabled: typeof disabled === \"boolean\" ? disabled : undefined,\n\t\t\t\t\t\thide: typeof hide === \"boolean\" ? hide : undefined,\n\t\t\t\t\t\tlabel: typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t\t.filter((item) => item.hide !== true);\n\t\t};\n\n\t\tconst handleModelValueUpdate = (value: ElSelectorModelValue) => {\n\t\t\tstate.value = value;\n\t\t\temit(\"update:modelValue\", value);\n\t\t};\n\n\t\tconst loadData = async () => {\n\t\t\tconst currentRequestVersion = ++requestVersion;\n\t\t\t// 判断是否需要自动请求\n\t\t\tif (props.requestApi) {\n\t\t\t\tstate.loading = true;\n\t\t\t\tconst params = props.initParam ?? {};\n\t\t\t\ttry {\n\t\t\t\t\tconst resData = await props.requestApi(params);\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\t// 这里不允许回显了\n\t\t\t\t\tstate.echo = false;\n\t\t\t\t\tstate.selectorData = handleData(resData);\n\t\t\t\t\temit(\"dataChange\", state.selectorData);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\tstate.selectorData = [];\n\t\t\t\t\tthrow error;\n\t\t\t\t} finally {\n\t\t\t\t\tif (currentRequestVersion === requestVersion) state.loading = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t// 这里不允许回显了\n\t\t\t\tstate.echo = false;\n\t\t\t\tstate.selectorData = handleData(props.data);\n\t\t\t}\n\t\t};\n\n\t\tconst handleFilterNode = (value: FilterValue, data: TreeNodeData, child: TreeNode) => {\n\t\t\tif (!value) return true;\n\t\t\tlet parentNode = child.parent,\n\t\t\t\tlabels = [child.label],\n\t\t\t\tlevel = 1;\n\t\t\twhile (level < child.level && parentNode) {\n\t\t\t\tlabels = [...labels, parentNode.label];\n\t\t\t\tparentNode = parentNode.parent;\n\t\t\t\tlevel++;\n\t\t\t}\n\t\t\tconst filterText = typeof value === \"string\" || typeof value === \"number\" ? String(value) : \"\";\n\t\t\tconst result = labels.some((label) => label.includes(filterText));\n\t\t\tif (props.filterNodeMethod) {\n\t\t\t\treturn result && props.filterNodeMethod(value, data, child);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\n\t\tconst handleNodeClick = (data: ElSelectorOutput, node: TreeNode, instance: ComponentInternalInstance | null) => {\n\t\t\t// 判断是否开启点击展开节点,并且节点是折叠状态,则自动展开,否则需要点击箭头图标才能折叠或开启 'collapseOnClickNode'\n\t\t\tif (props.expandOnClickNode) {\n\t\t\t\tif (!node.expanded) {\n\t\t\t\t\tnode.expand();\n\t\t\t\t} else if (props.collapseOnClickNode) {\n\t\t\t\t\tnode.collapse();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// eslint-disable-next-line vue/custom-event-name-casing -- Element Plus 的公开事件名为 node-click,需要保持原始名称透传。\n\t\t\temit(\"node-click\", data, node, instance);\n\t\t};\n\n\t\t/**\n\t\t * 下拉框出现/隐藏时触发\n\t\t */\n\t\tconst handleVisibleChange = async (visible: boolean) => {\n\t\t\tif (visible) {\n\t\t\t\tif (state.debut) {\n\t\t\t\t\t// 首次出现\n\t\t\t\t\tstate.debut = false;\n\t\t\t\t\t// 懒加载\n\t\t\t\t\tprops.lazy && (await loadData());\n\t\t\t\t} else {\n\t\t\t\t\t// 判断再次出现是否需要刷新数据\n\t\t\t\t\tif (state.nextRefresh) {\n\t\t\t\t\t\tstate.nextRefresh = false;\n\t\t\t\t\t\tawait loadData();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// eslint-disable-next-line vue/custom-event-name-casing -- Element Plus 的公开事件名为 visible-change,需要保持原始名称透传。\n\t\t\temit(\"visible-change\", visible);\n\t\t};\n\n\t\tconst flattenOptions = (data: ElSelectorOutput[]): ElSelectorOutput[] =>\n\t\t\tdata.flatMap((item) => [item, ...flattenOptions(item.children ?? [])]);\n\n\t\tconst handleChange = (value?: ElSelectorModelValue) => {\n\t\t\tconst selectorData = flattenOptions(state.selectorData);\n\t\t\tif (props.multiple) {\n\t\t\t\tconst valueList = Array.isArray(value) ? value : [];\n\t\t\t\tif (valueList.length === 0) {\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst dataList = valueList\n\t\t\t\t\t.map((item) => selectorData.find((option) => option.value !== undefined && isEqual(option.value, item)))\n\t\t\t\t\t.filter((item) => item !== undefined);\n\t\t\t\temit(\"change\", dataList, value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (value == null || Array.isArray(value)) {\n\t\t\t\temit(\"change\", null, null);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst data = selectorData.find((item) => item.value !== undefined && isEqual(item.value, value));\n\t\t\temit(\"change\", data ?? null, value);\n\t\t};\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t(newValue) => {\n\t\t\t\tif (state.echo && newValue != null) {\n\t\t\t\t\tconst hasLabel = props.label != null;\n\t\t\t\t\t// 判断是否为多选\n\t\t\t\t\tif (props.multiple) {\n\t\t\t\t\t\t// 判断是否为数组\n\t\t\t\t\t\tif (!Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaTreeSelect]\", \"当启用 multiple 时,传入的 modelValue 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && !Array.isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaTreeSelect]\", \"当启用 multiple 时,传入的 modelValue:label 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = newValue\n\t\t\t\t\t\t\t// 最大选项截取\n\t\t\t\t\t\t\t.slice(0, props.multipleLimit > 0 ? props.multipleLimit : newValue.length)\n\t\t\t\t\t\t\t.map((item, index) => {\n\t\t\t\t\t\t\t\tconst value: unknown = item;\n\t\t\t\t\t\t\t\tconst label: unknown = Array.isArray(props.label) ? props.label[index] : undefined;\n\t\t\t\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t\t\t\t(typeof value === \"string\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"number\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"boolean\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"object\")\n\t\t\t\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t\t\t\t\tlabel: hasLabel && typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaTreeSelect]\", \"当禁用 multiple 时,传入的 modelValue 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && Array.isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaTreeSelect]\", \"当禁用 multiple 时,传入的 modelValue:label 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: newValue,\n\t\t\t\t\t\t\t\tlabel: typeof props.label === \"string\" ? props.label : undefined,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstate.value = newValue;\n\t\t\t},\n\t\t\t{\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\twatch(\n\t\t\t[() => state.value, () => state.selectorData],\n\t\t\t([value]) => {\n\t\t\t\tconst selectorData = flattenOptions(state.selectorData);\n\n\t\t\t\tif (props.multiple) {\n\t\t\t\t\tif (!Array.isArray(value)) {\n\t\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tselectedLabel.value = value.map((item, index) => {\n\t\t\t\t\t\tconst data = selectorData.find((option) => option.value !== undefined && isEqual(option.value, item));\n\n\t\t\t\t\t\treturn data?.label ?? (Array.isArray(props.label) ? (props.label[index] ?? \"\") : \"\");\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (value == null || Array.isArray(value)) {\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tselectedLabel.value =\n\t\t\t\t\tselectorData.find((item) => item.value !== undefined && isEqual(item.value, value))?.label ??\n\t\t\t\t\t(typeof props.label === \"string\" ? props.label : null);\n\t\t\t},\n\t\t\t{\n\t\t\t\tdeep: true,\n\t\t\t\tflush: \"sync\",\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\twatch(\n\t\t\t() => props.initParam,\n\t\t\t(newValue, oldValue) => {\n\t\t\t\tif (!isEqual(newValue, oldValue)) {\n\t\t\t\t\tstate.nextRefresh = true;\n\t\t\t\t\tif (state.value != null) {\n\t\t\t\t\t\thandleModelValueUpdate(props.multiple ? [] : undefined);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\twatch(\n\t\t\t() => props.data,\n\t\t\t() => {\n\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\treturn loadData();\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ deep: true }\n\t\t);\n\n\t\twatch(\n\t\t\t() => props.data.length,\n\t\t\t(length) => {\n\t\t\t\tif (state.debut) state.echo = length === 0;\n\t\t\t},\n\t\t\t{ immediate: true }\n\t\t);\n\n\t\tonMounted(async () => {\n\t\t\tif (props.defaultSelected) {\n\t\t\t\tawait loadData();\n\t\t\t\tconst firstItem = state.selectorData[0];\n\t\t\t\tif (firstItem?.value !== undefined) {\n\t\t\t\t\tif (props.multiple) {\n\t\t\t\t\t\thandleModelValueUpdate([firstItem.value]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\thandleModelValueUpdate(firstItem.value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// 判断是否为本地数据\n\t\t\telse if (!props.requestApi && props.data.length > 0) {\n\t\t\t\tstate.debut = false;\n\t\t\t\tawait loadData();\n\t\t\t}\n\t\t\t// 判断是否非默认选中,且未启用懒加载\n\t\t\telse if (!props.lazy) {\n\t\t\t\tawait loadData();\n\t\t\t}\n\t\t});\n\n\t\tconst elTreeSelectProps = useProps(props, { ...selectProps, ...treeProps }, [\n\t\t\t\"modelValue\",\n\t\t\t\"popperClass\",\n\t\t\t\"lazy\",\n\t\t\t\"loading\",\n\t\t\t\"expandOnClickNode\",\n\t\t\t\"filterNodeMethod\",\n\t\t\t\"props\",\n\t\t]);\n\t\tconst elTreeSelectEmits = useEmits({ ...selectEmits, ...treeEmits }, emit, [\"update:modelValue\", \"change\", \"visible-change\", \"node-click\"]);\n\n\t\tuseRender(() => (\n\t\t\t<ElTreeSelectRuntime\n\t\t\t\t{...elTreeSelectProps.value}\n\t\t\t\t{...elTreeSelectEmits.value}\n\t\t\t\tref={treeSelectRef}\n\t\t\t\tclass=\"fa-tree-select\"\n\t\t\t\tpopperClass={[\"fa-tree-select-dropdown\", props.popperClass]}\n\t\t\t\tstyle={{ width: addCssUnit(props.width) }}\n\t\t\t\tmodelValue={state.value}\n\t\t\t\tonUpdate:modelValue={handleModelValueUpdate}\n\t\t\t\tonChange={handleChange}\n\t\t\t\tlazy={false}\n\t\t\t\tloading={state.loading}\n\t\t\t\tdata={state.selectorData}\n\t\t\t\texpandOnClickNode={props.checkOnClickNode ? false : props.expandOnClickNode}\n\t\t\t\tfilterNodeMethod={handleFilterNode as typeof props.filterNodeMethod}\n\t\t\t\tonNodeClick={handleNodeClick}\n\t\t\t\tonVisible-change={handleVisibleChange}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\t...(slots.default && {\n\t\t\t\t\t\tdefault: ({ node, data }: { node: TreeNode; data: ElSelectorOutput }) => slots.default?.({ node, data }) ?? [],\n\t\t\t\t\t}),\n\t\t\t\t\t...(slots.header && { header: () => slots.header?.() ?? [] }),\n\t\t\t\t\t...(slots.footer && { footer: () => slots.footer?.() ?? [] }),\n\t\t\t\t\t...(slots.prefix && { prefix: () => slots.prefix?.() ?? [] }),\n\t\t\t\t\t...(slots.empty && { empty: () => slots.empty?.() ?? [] }),\n\t\t\t\t\t...(slots.tag && { tag: () => slots.tag?.() ?? [] }),\n\t\t\t\t\t...(slots.loading && { loading: () => slots.loading?.() ?? [] }),\n\t\t\t\t\t...(slots.label && {\n\t\t\t\t\t\tlabel: ({ label, value }: { label: string; value: string | number | boolean | object }) =>\n\t\t\t\t\t\t\tslots.label?.({ label, value }) ?? [],\n\t\t\t\t\t}),\n\t\t\t\t}}\n\t\t\t</ElTreeSelectRuntime>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 使选择器的输入框获取焦点。 */\n\t\t\tfocus: computed(() => treeSelectRef.value?.focus),\n\t\t\t/** @description 使选择器的输入框失去焦点,并隐藏下拉框。 */\n\t\t\tblur: computed(() => treeSelectRef.value?.blur),\n\t\t\t/** @description 获取当前选中的标签。 */\n\t\t\tselectedLabel: computed(() => treeSelectRef.value?.selectedLabel),\n\t\t\t/** @description 过滤所有树节点,过滤后的节点将被隐藏。 */\n\t\t\tfilter: computed(() => treeSelectRef.value?.filter),\n\t\t\t/** @description 为节点设置新数据,只有设置 node-key 时可用。 */\n\t\t\tupdateKeyChildren: computed(() => treeSelectRef.value?.updateKeyChildren),\n\t\t\t/** @description 获取当前选中的节点。 */\n\t\t\tgetCheckedNodes: computed(() => treeSelectRef.value?.getCheckedNodes),\n\t\t\t/** @description 设置当前选中的节点。 */\n\t\t\tsetCheckedNodes: computed(() => treeSelectRef.value?.setCheckedNodes),\n\t\t\t/** @description 获取当前选中的节点 Key。 */\n\t\t\tgetCheckedKeys: computed(() => treeSelectRef.value?.getCheckedKeys),\n\t\t\t/** @description 设置当前选中的节点 Key。 */\n\t\t\tsetCheckedKeys: computed(() => treeSelectRef.value?.setCheckedKeys),\n\t\t\t/** @description 设置节点选中状态。 */\n\t\t\tsetChecked: computed(() => treeSelectRef.value?.setChecked),\n\t\t\t/** @description 获取当前半选中的节点。 */\n\t\t\tgetHalfCheckedNodes: computed(() => treeSelectRef.value?.getHalfCheckedNodes),\n\t\t\t/** @description 获取当前半选中的节点 Key。 */\n\t\t\tgetHalfCheckedKeys: computed(() => treeSelectRef.value?.getHalfCheckedKeys),\n\t\t\t/** @description 获取当前节点 Key。 */\n\t\t\tgetCurrentKey: computed(() => treeSelectRef.value?.getCurrentKey),\n\t\t\t/** @description 获取当前节点。 */\n\t\t\tgetCurrentNode: computed(() => treeSelectRef.value?.getCurrentNode),\n\t\t\t/** @description 设置当前节点 Key。 */\n\t\t\tsetCurrentKey: computed(() => treeSelectRef.value?.setCurrentKey),\n\t\t\t/** @description 设置当前节点。 */\n\t\t\tsetCurrentNode: computed(() => treeSelectRef.value?.setCurrentNode),\n\t\t\t/** @description 根据数据或 Key 获取节点。 */\n\t\t\tgetNode: computed(() => treeSelectRef.value?.getNode),\n\t\t\t/** @description 删除节点。 */\n\t\t\tremove: computed(() => treeSelectRef.value?.remove),\n\t\t\t/** @description 追加子节点。 */\n\t\t\tappend: computed(() => treeSelectRef.value?.append),\n\t\t\t/** @description 在指定节点前插入节点。 */\n\t\t\tinsertBefore: computed(() => treeSelectRef.value?.insertBefore),\n\t\t\t/** @description 在指定节点后插入节点。 */\n\t\t\tinsertAfter: computed(() => treeSelectRef.value?.insertAfter),\n\t\t\t/** @description Element Plus Tree 实例。 */\n\t\t\ttreeRef: computed(() => treeSelectRef.value?.treeRef),\n\t\t\t/** @description Element Plus Select 实例。 */\n\t\t\tselectRef: computed(() => treeSelectRef.value?.selectRef),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading: computed(() => state.loading),\n\t\t\t/** @description 刷新 */\n\t\t\trefresh: loadData,\n\t\t\t/** @description 设置选择 */\n\t\t\tsetSelection: (value: Exclude<ElSelectorModelValue, null | undefined>) => handleModelValueUpdate(value),\n\t\t\t/** @description 清除选择 */\n\t\t\tclearSelection: () => handleModelValueUpdate(props.multiple ? [] : undefined),\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;AAoBA,MAAM,sBAAsB;;AA8B5B,MAAa,oBAAoB;CAChC,GAAG;CACH,GAAG;;CAEH,kBAAkB,EACjB,MAAM,eAAyC,QAAQ,EACxD;;;;;CAKA,WAAW;EACV,MAAM,eAMJ,KAAK;EACP,eAAe,CAAA;CAChB;;CAEA,UAAU;EACT,MAAM;EACN,SAAS,KAAA;CACV;;CAEA,aAAa;EACZ,MAAM;EACN,SAAS;CACV;;CAEA,aAAa;EACZ,MAAM;EACN,SAAS;CACV;;CAEA,YAAY;EACX,MAAM;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AAc,OAAO,eAAe;;GAEpE,iBAAiB,eAAe,cAAc,OAAO,eAAe;;GAEpE,gBAAgB,eAAe,cAAc,OAAO,cAAc;;GAElE,gBAAgB,eAAe,cAAc,OAAO,cAAc;;GAElE,YAAY,eAAe,cAAc,OAAO,UAAU;;GAE1D,qBAAqB,eAAe,cAAc,OAAO,mBAAmB;;GAE5E,oBAAoB,eAAe,cAAc,OAAO,kBAAkB;;GAE1E,eAAe,eAAe,cAAc,OAAO,aAAa;;GAEhE,gBAAgB,eAAe,cAAc,OAAO,cAAc;;GAElE,eAAe,eAAe,cAAc,OAAO,aAAa;;GAEhE,gBAAgB,eAAe,cAAc,OAAO,cAAc;;GAElE,SAAS,eAAe,cAAc,OAAO,OAAO;;GAEpD,QAAQ,eAAe,cAAc,OAAO,MAAM;;GAElD,QAAQ,eAAe,cAAc,OAAO,MAAM;;GAElD,cAAc,eAAe,cAAc,OAAO,YAAY;;GAE9D,aAAa,eAAe,cAAc,OAAO,WAAW;;GAE5D,SAAS,eAAe,cAAc,OAAO,OAAO;;GAEpD,WAAW,eAAe,cAAc,OAAO,SAAS;;GAExD,SAAS,eAAe,MAAM,OAAO;;GAErC,SAAS;;GAET,eAAe,UAA2D,uBAAuB,KAAK;;GAEtG,sBAAsB,uBAAuB,MAAM,WAAW,CAAA,IAAK,KAAA,CAAS;EAC7E,CAAC;CACF;AACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"treeSelect.mjs","names":["update:modelValue","update:label","node-click"],"sources":["../../../../src/components/treeSelect/src/treeSelect.tsx"],"sourcesContent":["import { computed, defineComponent, onMounted, reactive, shallowRef, toRef, useModel, watch } from \"vue\";\nimport { ElTreeSelect, selectEmits, selectProps, treeEmits, treeProps } from \"element-plus\";\nimport { addCssUnit, definePropType, isEqual, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport type { FilterValue, SelectInstance, TreeInstance, TreeNodeData } from \"element-plus\";\nimport type { ComponentInternalInstance } from \"vue\";\nimport type { ElSelectorModelValue, ElSelectorOutput, ElSelectorValue } from \"../../select\";\nimport type { SelectComponentProps } from \"../../select/src/select\";\nimport type { PagedInput } from \"../../table\";\nimport type { FilterNodeMethodFunction, TreeNode } from \"../../tree/src/tree.props\";\n\n/** 补充 Element Plus TreeSelect 运行时支持但类型声明缺失的事件。 */\ntype ElTreeSelectRuntimeType = typeof ElTreeSelect &\n\t(new () => {\n\t\t$props: InstanceType<typeof ElTreeSelect>[\"$props\"] & {\n\t\t\tonNodeClick?: (data: ElSelectorOutput, node: TreeNode, instance: ComponentInternalInstance | null) => void;\n\t\t\tonChange?: (value: ElSelectorModelValue) => void;\n\t\t\t\"onUpdate:modelValue\"?: (value: ElSelectorModelValue) => void;\n\t\t};\n\t});\n\nconst ElTreeSelectRuntime = ElTreeSelect as ElTreeSelectRuntimeType;\n\n/** Element Plus TreeSelect 运行时实际暴露的方法集合。 */\ntype ElTreeSelectExposes = Pick<SelectInstance, \"focus\" | \"blur\" | \"selectedLabel\"> &\n\tPick<\n\t\tTreeInstance,\n\t\t| \"filter\"\n\t\t| \"updateKeyChildren\"\n\t\t| \"getCheckedNodes\"\n\t\t| \"setCheckedNodes\"\n\t\t| \"getCheckedKeys\"\n\t\t| \"setCheckedKeys\"\n\t\t| \"setChecked\"\n\t\t| \"getHalfCheckedNodes\"\n\t\t| \"getHalfCheckedKeys\"\n\t\t| \"getCurrentKey\"\n\t\t| \"getCurrentNode\"\n\t\t| \"setCurrentKey\"\n\t\t| \"setCurrentNode\"\n\t\t| \"getNode\"\n\t\t| \"remove\"\n\t\t| \"append\"\n\t\t| \"insertBefore\"\n\t\t| \"insertAfter\"\n\t> & {\n\t\ttreeRef: TreeInstance;\n\t\tselectRef: SelectInstance;\n\t};\n\n/** FaTreeSelect 的运行时 Props 定义。 */\nexport const faTreeSelectProps = {\n\t...selectProps,\n\t...treeProps,\n\t/** 树节点筛选方法。 */\n\tfilterNodeMethod: {\n\t\ttype: definePropType<FilterNodeMethodFunction>(Function),\n\t},\n\t/**\n\t * 懒加载节点的缓存数据,结构与数据相同,用于获取未加载数据的标签\n\t * @description The cached data of the lazy node, the structure is the same as the data, used to get the label of the unloaded data\n\t */\n\tcacheData: {\n\t\ttype: definePropType<\n\t\t\t{\n\t\t\t\tvalue: string | number | boolean | object;\n\t\t\t\tcurrentLabel: string | number;\n\t\t\t\tisDisabled: boolean;\n\t\t\t}[]\n\t\t>(Array),\n\t\tdefault: () => [],\n\t},\n\t/** @description whether Select is disabled 重载使其支持 ElForm*/\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: undefined,\n\t},\n\t/** @description displayed text while loading data from server, default is 'Loading' */\n\tloadingText: {\n\t\ttype: String,\n\t\tdefault: \"加载中...\",\n\t},\n\t/** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */\n\tnoMatchText: {\n\t\ttype: String,\n\t\tdefault: \"暂无匹配的数据\",\n\t},\n\t/** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */\n\tnoDataText: {\n\t\ttype: String,\n\t\tdefault: \"暂无数据\",\n\t},\n\t/** @description whether to collapse tags to a text when multiple selecting */\n\tcollapseTags: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true */\n\tcollapseTagsTooltip: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** 每个树节点用来作为唯一标识的属性,整棵树应该是唯一的 */\n\tnodeKey: {\n\t\ttype: String,\n\t\tdefault: \"value\",\n\t},\n\t/** @description 是否默认展开所有节点 */\n\tdefaultExpandAll: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否在点击节点的时候选中节点 */\n\tcheckOnClickNode: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否高亮当前选中节点 */\n\thighlightCurrent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否在点击节点的时候展开或者收缩节点, 默认值为 true,如果为 false,则只有点箭头图标的时候才会展开或者收缩节点。 */\n\texpandOnClickNode: Boolean,\n\t/** @description 点击折叠节点,需要开启 'expandOnClickNode' */\n\tcollapseOnClickNode: Boolean,\n\t/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<ElSelectorModelValue>([String, Number, Boolean, Object, Array]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: definePropType<string | string[] | null>([String, Array]),\n\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"100%\",\n\t},\n\t/** @description 更多细节,只有使用slot的时候有用 */\n\tmoreDetail: Boolean,\n\t/** @description 懒加载远程数据,默认 true。当下拉框第一次显示的时候才会加载远程数据*/\n\tlazy: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 默认选中。不能和懒加载一起使用 */\n\tdefaultSelected: Boolean,\n\t/** @description 配置选项 */\n\tprops: {\n\t\ttype: definePropType<SelectComponentProps>(Object),\n\t\tdefault: () => ({\n\t\t\tlabel: \"label\",\n\t\t\thide: \"hide\",\n\t\t\tdisabled: \"disabled\",\n\t\t\tchildren: \"children\",\n\t\t}),\n\t},\n\t/** @description 下拉框数据 */\n\tdata: {\n\t\ttype: definePropType<ElSelectorOutput[]>(Array),\n\t\tdefault: () => [],\n\t},\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: string | number | PagedInput) => Promise<ElSelectorOutput[]>>(Function),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | PagedInput | null>([String, Number, Object]),\n};\n\n/** FaTreeSelect 的运行时 Emits 定义。 */\nexport const faTreeSelectEmits = {\n\t...selectEmits,\n\t...treeEmits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: ElSelectorModelValue) =>\n\t\ttypeof value === \"string\" ||\n\t\ttypeof value === \"number\" ||\n\t\ttypeof value === \"boolean\" ||\n\t\t(typeof value === \"object\" && value !== null) ||\n\t\tvalue == null,\n\t/** @description 选中数据改变 */\n\tchange: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue) => true,\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string | string[] | null) => typeof value === \"string\" || Array.isArray(value) || value === null,\n\n\t/** @description 数据改变 */\n\tdataChange: (data: ElSelectorOutput[]) => Array.isArray(data),\n\t/** @description 节点点击 */\n\t\"node-click\": (_data: ElSelectorOutput, _node: TreeNode, _instance: ComponentInternalInstance | null) => true,\n};\n\n/** FaTreeSelect 的插槽参数。 */\nexport interface FaTreeSelectSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: { node: TreeNode; data: ElSelectorOutput };\n\n\t/** @description 下拉列表顶部的内容 */\n\theader: never;\n\t/** @description 下拉列表底部的内容 */\n\tfooter: never;\n\t/** @description Select 组件头部内容 */\n\tprefix: never;\n\t/** @description 无选项时的列表 */\n\tempty: never;\n\t/** @description select 组件自定义标签内容 */\n\ttag: never;\n\t/** @description select 组件自定义 loading内容 */\n\tloading: never;\n\t/** @description select 组件自定义标签内容 */\n\tlabel: { label: string; value: string | number | boolean | object };\n}\n\nexport default defineComponent({\n\tname: \"FaTreeSelect\",\n\tprops: faTreeSelectProps,\n\temits: faTreeSelectEmits,\n\tslots: makeSlots<FaTreeSelectSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst selectedLabel = useModel(props, \"label\");\n\n\t\tconst treeSelectRef = shallowRef<ElTreeSelectExposes | null>(null);\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<ElSelectorModelValue>(),\n\t\t\tloading: false,\n\t\t\tselectorData: withDefineType<ElSelectorOutput[]>([]),\n\t\t\t/** 首次出现 */\n\t\t\tdebut: true,\n\t\t\t/** 回显 */\n\t\t\techo: true,\n\t\t\t/** 下次刷新 */\n\t\t\tnextRefresh: false,\n\t\t});\n\n\t\tlet requestVersion = 0;\n\n\t\tconst handleData = (data: ElSelectorOutput[]): ElSelectorOutput[] => {\n\t\t\treturn data\n\t\t\t\t.map((item) => {\n\t\t\t\t\tconst value: unknown = item[props.nodeKey];\n\t\t\t\t\tconst label: unknown = typeof props.props.label === \"function\" ? props.props.label(item) : item[props.props.label ?? \"label\"];\n\t\t\t\t\tconst hide: unknown = typeof props.props.hide === \"function\" ? props.props.hide(item) : item[props.props.hide ?? \"hide\"];\n\t\t\t\t\tconst disabled: unknown =\n\t\t\t\t\t\ttypeof props.props.disabled === \"function\" ? props.props.disabled(item) : item[props.props.disabled ?? \"disabled\"];\n\t\t\t\t\tconst children: unknown = item[props.props.children ?? \"children\"];\n\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t(typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\" || typeof value === \"object\")\n\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...item,\n\t\t\t\t\t\tchildren: Array.isArray(children) ? handleData(children as ElSelectorOutput[]) : [],\n\t\t\t\t\t\tdisabled: typeof disabled === \"boolean\" ? disabled : undefined,\n\t\t\t\t\t\thide: typeof hide === \"boolean\" ? hide : undefined,\n\t\t\t\t\t\tlabel: typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t\t.filter((item) => item.hide !== true);\n\t\t};\n\n\t\tconst handleModelValueUpdate = (value: ElSelectorModelValue) => {\n\t\t\tstate.value = value;\n\t\t\temit(\"update:modelValue\", value);\n\t\t};\n\n\t\tconst loadData = async () => {\n\t\t\tconst currentRequestVersion = ++requestVersion;\n\t\t\t// 判断是否需要自动请求\n\t\t\tif (props.requestApi) {\n\t\t\t\tstate.loading = true;\n\t\t\t\tconst params = props.initParam ?? {};\n\t\t\t\ttry {\n\t\t\t\t\tconst resData = await props.requestApi(params);\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\t// 这里不允许回显了\n\t\t\t\t\tstate.echo = false;\n\t\t\t\t\tstate.selectorData = handleData(resData);\n\t\t\t\t\temit(\"dataChange\", state.selectorData);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\tstate.selectorData = [];\n\t\t\t\t\tthrow error;\n\t\t\t\t} finally {\n\t\t\t\t\tif (currentRequestVersion === requestVersion) state.loading = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t// 这里不允许回显了\n\t\t\t\tstate.echo = false;\n\t\t\t\tstate.selectorData = handleData(props.data);\n\t\t\t}\n\t\t};\n\n\t\tconst handleFilterNode = (value: FilterValue, data: TreeNodeData, child: TreeNode) => {\n\t\t\tif (!value) return true;\n\t\t\tlet parentNode = child.parent,\n\t\t\t\tlabels = [child.label],\n\t\t\t\tlevel = 1;\n\t\t\twhile (level < child.level && parentNode) {\n\t\t\t\tlabels = [...labels, parentNode.label];\n\t\t\t\tparentNode = parentNode.parent;\n\t\t\t\tlevel++;\n\t\t\t}\n\t\t\tconst filterText = typeof value === \"string\" || typeof value === \"number\" ? String(value) : \"\";\n\t\t\tconst result = labels.some((label) => label.includes(filterText));\n\t\t\tif (props.filterNodeMethod) {\n\t\t\t\treturn result && props.filterNodeMethod(value, data, child);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\n\t\tconst handleNodeClick = (data: ElSelectorOutput, node: TreeNode, instance: ComponentInternalInstance | null) => {\n\t\t\t// 判断是否开启点击展开节点,并且节点是折叠状态,则自动展开,否则需要点击箭头图标才能折叠或开启 'collapseOnClickNode'\n\t\t\tif (props.expandOnClickNode) {\n\t\t\t\tif (!node.expanded) {\n\t\t\t\t\tnode.expand();\n\t\t\t\t} else if (props.collapseOnClickNode) {\n\t\t\t\t\tnode.collapse();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// eslint-disable-next-line vue/custom-event-name-casing -- Element Plus 的公开事件名为 node-click,需要保持原始名称透传。\n\t\t\temit(\"node-click\", data, node, instance);\n\t\t};\n\n\t\t/**\n\t\t * 下拉框出现/隐藏时触发\n\t\t */\n\t\tconst handleVisibleChange = async (visible: boolean) => {\n\t\t\tif (visible) {\n\t\t\t\tif (state.debut) {\n\t\t\t\t\t// 首次出现\n\t\t\t\t\tstate.debut = false;\n\t\t\t\t\t// 懒加载\n\t\t\t\t\tprops.lazy && (await loadData());\n\t\t\t\t} else {\n\t\t\t\t\t// 判断再次出现是否需要刷新数据\n\t\t\t\t\tif (state.nextRefresh) {\n\t\t\t\t\t\tstate.nextRefresh = false;\n\t\t\t\t\t\tawait loadData();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// eslint-disable-next-line vue/custom-event-name-casing -- Element Plus 的公开事件名为 visible-change,需要保持原始名称透传。\n\t\t\temit(\"visible-change\", visible);\n\t\t};\n\n\t\tconst flattenOptions = (data: ElSelectorOutput[]): ElSelectorOutput[] =>\n\t\t\tdata.flatMap((item) => [item, ...flattenOptions(item.children ?? [])]);\n\n\t\tconst handleChange = (value?: ElSelectorModelValue) => {\n\t\t\tconst selectorData = flattenOptions(state.selectorData);\n\t\t\tif (props.multiple) {\n\t\t\t\tconst valueList = Array.isArray(value) ? value : [];\n\t\t\t\tif (valueList.length === 0) {\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst dataList = valueList\n\t\t\t\t\t.map((item) => selectorData.find((option) => option.value !== undefined && isEqual(option.value, item)))\n\t\t\t\t\t.filter((item) => item !== undefined);\n\t\t\t\temit(\"change\", dataList, value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (value == null || Array.isArray(value)) {\n\t\t\t\temit(\"change\", null, null);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst data = selectorData.find((item) => item.value !== undefined && isEqual(item.value, value));\n\t\t\temit(\"change\", data ?? null, value);\n\t\t};\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t(newValue) => {\n\t\t\t\tif (state.echo && newValue != null) {\n\t\t\t\t\tconst hasLabel = props.label != null;\n\t\t\t\t\t// 判断是否为多选\n\t\t\t\t\tif (props.multiple) {\n\t\t\t\t\t\t// 判断是否为数组\n\t\t\t\t\t\tif (!Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaTreeSelect]\", \"当启用 multiple 时,传入的 modelValue 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && !Array.isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaTreeSelect]\", \"当启用 multiple 时,传入的 modelValue:label 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = newValue\n\t\t\t\t\t\t\t// 最大选项截取\n\t\t\t\t\t\t\t.slice(0, props.multipleLimit > 0 ? props.multipleLimit : newValue.length)\n\t\t\t\t\t\t\t.map((item, index) => {\n\t\t\t\t\t\t\t\tconst value: unknown = item;\n\t\t\t\t\t\t\t\tconst label: unknown = Array.isArray(props.label) ? props.label[index] : undefined;\n\t\t\t\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t\t\t\t(typeof value === \"string\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"number\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"boolean\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"object\")\n\t\t\t\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t\t\t\t\tlabel: hasLabel && typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaTreeSelect]\", \"当禁用 multiple 时,传入的 modelValue 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && Array.isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaTreeSelect]\", \"当禁用 multiple 时,传入的 modelValue:label 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: newValue,\n\t\t\t\t\t\t\t\tlabel: typeof props.label === \"string\" ? props.label : undefined,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstate.value = newValue;\n\t\t\t},\n\t\t\t{\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\twatch(\n\t\t\t[() => state.value, () => state.selectorData],\n\t\t\t([value]) => {\n\t\t\t\tconst selectorData = flattenOptions(state.selectorData);\n\n\t\t\t\tif (props.multiple) {\n\t\t\t\t\tif (!Array.isArray(value)) {\n\t\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tselectedLabel.value = value.map((item, index) => {\n\t\t\t\t\t\tconst data = selectorData.find((option) => option.value !== undefined && isEqual(option.value, item));\n\n\t\t\t\t\t\treturn data?.label ?? (Array.isArray(props.label) ? (props.label[index] ?? \"\") : \"\");\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (value == null || Array.isArray(value)) {\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tselectedLabel.value =\n\t\t\t\t\tselectorData.find((item) => item.value !== undefined && isEqual(item.value, value))?.label ??\n\t\t\t\t\t(typeof props.label === \"string\" ? props.label : null);\n\t\t\t},\n\t\t\t{\n\t\t\t\tdeep: true,\n\t\t\t\tflush: \"sync\",\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\twatch(\n\t\t\t() => props.initParam,\n\t\t\t(newValue, oldValue) => {\n\t\t\t\tif (!isEqual(newValue, oldValue)) {\n\t\t\t\t\tstate.nextRefresh = true;\n\t\t\t\t\tif (state.value != null) {\n\t\t\t\t\t\thandleModelValueUpdate(props.multiple ? [] : undefined);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\twatch(\n\t\t\t() => props.data,\n\t\t\t() => {\n\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\treturn loadData();\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ deep: true }\n\t\t);\n\n\t\twatch(\n\t\t\t() => props.data.length,\n\t\t\t(length) => {\n\t\t\t\tif (state.debut) state.echo = length === 0;\n\t\t\t},\n\t\t\t{ immediate: true }\n\t\t);\n\n\t\tonMounted(async () => {\n\t\t\tif (props.defaultSelected) {\n\t\t\t\tawait loadData();\n\t\t\t\tconst firstItem = state.selectorData[0];\n\t\t\t\tif (firstItem?.value !== undefined) {\n\t\t\t\t\tif (props.multiple) {\n\t\t\t\t\t\thandleModelValueUpdate([firstItem.value]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\thandleModelValueUpdate(firstItem.value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// 判断是否为本地数据\n\t\t\telse if (!props.requestApi && props.data.length > 0) {\n\t\t\t\tstate.debut = false;\n\t\t\t\tawait loadData();\n\t\t\t}\n\t\t\t// 判断是否非默认选中,且未启用懒加载\n\t\t\telse if (!props.lazy) {\n\t\t\t\tawait loadData();\n\t\t\t}\n\t\t});\n\n\t\tconst elTreeSelectProps = useProps(props, { ...selectProps, ...treeProps }, [\n\t\t\t\"modelValue\",\n\t\t\t\"popperClass\",\n\t\t\t\"lazy\",\n\t\t\t\"loading\",\n\t\t\t\"expandOnClickNode\",\n\t\t\t\"filterNodeMethod\",\n\t\t\t\"props\",\n\t\t]);\n\t\tconst elTreeSelectEmits = useEmits({ ...selectEmits, ...treeEmits }, emit, [\"update:modelValue\", \"change\", \"visible-change\", \"node-click\"]);\n\n\t\tuseRender(() => (\n\t\t\t<ElTreeSelectRuntime\n\t\t\t\t{...elTreeSelectProps.value}\n\t\t\t\t{...elTreeSelectEmits.value}\n\t\t\t\tref={treeSelectRef}\n\t\t\t\tclass=\"fa-tree-select\"\n\t\t\t\tpopperClass={[\"fa-tree-select-dropdown\", props.popperClass]}\n\t\t\t\tstyle={{ width: addCssUnit(props.width) }}\n\t\t\t\tmodelValue={state.value}\n\t\t\t\tonUpdate:modelValue={handleModelValueUpdate}\n\t\t\t\tonChange={handleChange}\n\t\t\t\tlazy={false}\n\t\t\t\tloading={state.loading}\n\t\t\t\tdata={state.selectorData}\n\t\t\t\texpandOnClickNode={props.checkOnClickNode ? false : props.expandOnClickNode}\n\t\t\t\tfilterNodeMethod={handleFilterNode as typeof props.filterNodeMethod}\n\t\t\t\tonNodeClick={handleNodeClick}\n\t\t\t\tonVisible-change={handleVisibleChange}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\t...(slots.default && {\n\t\t\t\t\t\tdefault: ({ node, data }: { node: TreeNode; data: ElSelectorOutput }) => slots.default?.({ node, data }) ?? [],\n\t\t\t\t\t}),\n\t\t\t\t\t...(slots.header && { header: () => slots.header?.() ?? [] }),\n\t\t\t\t\t...(slots.footer && { footer: () => slots.footer?.() ?? [] }),\n\t\t\t\t\t...(slots.prefix && { prefix: () => slots.prefix?.() ?? [] }),\n\t\t\t\t\t...(slots.empty && { empty: () => slots.empty?.() ?? [] }),\n\t\t\t\t\t...(slots.tag && { tag: () => slots.tag?.() ?? [] }),\n\t\t\t\t\t...(slots.loading && { loading: () => slots.loading?.() ?? [] }),\n\t\t\t\t\t...(slots.label && {\n\t\t\t\t\t\tlabel: ({ label, value }: { label: string; value: string | number | boolean | object }) =>\n\t\t\t\t\t\t\tslots.label?.({ label, value }) ?? [],\n\t\t\t\t\t}),\n\t\t\t\t}}\n\t\t\t</ElTreeSelectRuntime>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 使选择器的输入框获取焦点。 */\n\t\t\tfocus: computed(() => treeSelectRef.value?.focus),\n\t\t\t/** @description 使选择器的输入框失去焦点,并隐藏下拉框。 */\n\t\t\tblur: computed(() => treeSelectRef.value?.blur),\n\t\t\t/** @description 获取当前选中的标签。 */\n\t\t\tselectedLabel: computed(() => treeSelectRef.value?.selectedLabel),\n\t\t\t/** @description 过滤所有树节点,过滤后的节点将被隐藏。 */\n\t\t\tfilter: computed(() => treeSelectRef.value?.filter),\n\t\t\t/** @description 为节点设置新数据,只有设置 node-key 时可用。 */\n\t\t\tupdateKeyChildren: computed(() => treeSelectRef.value?.updateKeyChildren),\n\t\t\t/** @description 获取当前选中的节点。 */\n\t\t\tgetCheckedNodes: computed(() => treeSelectRef.value?.getCheckedNodes),\n\t\t\t/** @description 设置当前选中的节点。 */\n\t\t\tsetCheckedNodes: computed(() => treeSelectRef.value?.setCheckedNodes),\n\t\t\t/** @description 获取当前选中的节点 Key。 */\n\t\t\tgetCheckedKeys: computed(() => treeSelectRef.value?.getCheckedKeys),\n\t\t\t/** @description 设置当前选中的节点 Key。 */\n\t\t\tsetCheckedKeys: computed(() => treeSelectRef.value?.setCheckedKeys),\n\t\t\t/** @description 设置节点选中状态。 */\n\t\t\tsetChecked: computed(() => treeSelectRef.value?.setChecked),\n\t\t\t/** @description 获取当前半选中的节点。 */\n\t\t\tgetHalfCheckedNodes: computed(() => treeSelectRef.value?.getHalfCheckedNodes),\n\t\t\t/** @description 获取当前半选中的节点 Key。 */\n\t\t\tgetHalfCheckedKeys: computed(() => treeSelectRef.value?.getHalfCheckedKeys),\n\t\t\t/** @description 获取当前节点 Key。 */\n\t\t\tgetCurrentKey: computed(() => treeSelectRef.value?.getCurrentKey),\n\t\t\t/** @description 获取当前节点。 */\n\t\t\tgetCurrentNode: computed(() => treeSelectRef.value?.getCurrentNode),\n\t\t\t/** @description 设置当前节点 Key。 */\n\t\t\tsetCurrentKey: computed(() => treeSelectRef.value?.setCurrentKey),\n\t\t\t/** @description 设置当前节点。 */\n\t\t\tsetCurrentNode: computed(() => treeSelectRef.value?.setCurrentNode),\n\t\t\t/** @description 根据数据或 Key 获取节点。 */\n\t\t\tgetNode: computed(() => treeSelectRef.value?.getNode),\n\t\t\t/** @description 删除节点。 */\n\t\t\tremove: computed(() => treeSelectRef.value?.remove),\n\t\t\t/** @description 追加子节点。 */\n\t\t\tappend: computed(() => treeSelectRef.value?.append),\n\t\t\t/** @description 在指定节点前插入节点。 */\n\t\t\tinsertBefore: computed(() => treeSelectRef.value?.insertBefore),\n\t\t\t/** @description 在指定节点后插入节点。 */\n\t\t\tinsertAfter: computed(() => treeSelectRef.value?.insertAfter),\n\t\t\t/** @description Element Plus Tree 实例。 */\n\t\t\ttreeRef: computed(() => treeSelectRef.value?.treeRef),\n\t\t\t/** @description Element Plus Select 实例。 */\n\t\t\tselectRef: computed(() => treeSelectRef.value?.selectRef),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading: toRef(state, \"loading\"),\n\t\t\t/** @description 刷新 */\n\t\t\trefresh: loadData,\n\t\t\t/** @description 设置选择 */\n\t\t\tsetSelection: (value: Exclude<ElSelectorModelValue, null | undefined>) => handleModelValueUpdate(value),\n\t\t\t/** @description 清除选择 */\n\t\t\tclearSelection: () => handleModelValueUpdate(props.multiple ? [] : undefined),\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;AAoBA,MAAM,sBAAsB;;AA8B5B,MAAa,oBAAoB;CAChC,GAAG;CACH,GAAG;;CAEH,kBAAkB,EACjB,MAAM,eAAyC,QAAQ,EACxD;;;;;CAKA,WAAW;EACV,MAAM,eAMJ,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GAEhD,MAAM,eAAe,cAAc,OAAO,IAAI;;GAE9C,eAAe,eAAe,cAAc,OAAO,aAAa;;GAEhE,QAAQ,eAAe,cAAc,OAAO,MAAM;;GAElD,mBAAmB,eAAe,cAAc,OAAO,iBAAiB;;GAExE,iBAAiB,eAAe,cAAc,OAAO,eAAe;;GAEpE,iBAAiB,eAAe,cAAc,OAAO,eAAe;;GAEpE,gBAAgB,eAAe,cAAc,OAAO,cAAc;;GAElE,gBAAgB,eAAe,cAAc,OAAO,cAAc;;GAElE,YAAY,eAAe,cAAc,OAAO,UAAU;;GAE1D,qBAAqB,eAAe,cAAc,OAAO,mBAAmB;;GAE5E,oBAAoB,eAAe,cAAc,OAAO,kBAAkB;;GAE1E,eAAe,eAAe,cAAc,OAAO,aAAa;;GAEhE,gBAAgB,eAAe,cAAc,OAAO,cAAc;;GAElE,eAAe,eAAe,cAAc,OAAO,aAAa;;GAEhE,gBAAgB,eAAe,cAAc,OAAO,cAAc;;GAElE,SAAS,eAAe,cAAc,OAAO,OAAO;;GAEpD,QAAQ,eAAe,cAAc,OAAO,MAAM;;GAElD,QAAQ,eAAe,cAAc,OAAO,MAAM;;GAElD,cAAc,eAAe,cAAc,OAAO,YAAY;;GAE9D,aAAa,eAAe,cAAc,OAAO,WAAW;;GAE5D,SAAS,eAAe,cAAc,OAAO,OAAO;;GAEpD,WAAW,eAAe,cAAc,OAAO,SAAS;;GAExD,SAAS,MAAM,OAAO,SAAS;;GAE/B,SAAS;;GAET,eAAe,UAA2D,uBAAuB,KAAK;;GAEtG,sBAAsB,uBAAuB,MAAM,WAAW,CAAA,IAAK,KAAA,CAAS;EAC7E,CAAC;CACF;AACD,CAAC"}
|
|
@@ -78,7 +78,7 @@ var upload_default = defineComponent({
|
|
|
78
78
|
]);
|
|
79
79
|
useRender(() => withDirectives(createVNode(ElUpload, mergeProps(elUploadProps.value, {
|
|
80
80
|
"ref": uploadRef,
|
|
81
|
-
"class": "fa-upload",
|
|
81
|
+
"class": ["fa-upload", { "fa-upload__trigger": !!slots.trigger }],
|
|
82
82
|
"fileList": fileList.value,
|
|
83
83
|
"onUpdate:fileList": ($event) => fileList.value = $event,
|
|
84
84
|
"disabled": disabled.value,
|
|
@@ -90,7 +90,7 @@ var upload_default = defineComponent({
|
|
|
90
90
|
"onRemove": handleOnRemove,
|
|
91
91
|
"onChange": handleOnChange
|
|
92
92
|
}), {
|
|
93
|
-
default: () => slots.default ? slots.default() : createVNode(Fragment, null, [createVNode(ElIcon, { "class": "el-icon--upload" }, { default: () => [createVNode(UploadFilled, null, null)] }), createVNode("div", { "class": "el-upload__text" }, [
|
|
93
|
+
default: () => slots.default ? slots.default() : createVNode(Fragment, null, [createVNode(ElIcon, { "class": "el-icon--upload" }, { default: () => [createVNode(UploadFilled, null, null)] }), createVNode("div", { "class": "el-upload__text" }, [props.drag ? "Drop file here or " : "Select a file or ", createVNode("em", null, [createTextVNode("click to upload")])])]),
|
|
94
94
|
...slots.trigger && { trigger: () => slots.trigger?.() ?? [] },
|
|
95
95
|
tip: () => slots.tip ? slots.tip() : createVNode(Fragment, null, [createVNode("div", { "class": "el-upload__tip" }, [
|
|
96
96
|
createTextVNode("files with a size less than "),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.mjs","names":["update:modelValue","update:fileList"],"sources":["../../../../src/components/upload/src/upload.tsx"],"sourcesContent":["import { Fragment, computed, defineComponent, shallowRef } from \"vue\";\nimport { UploadFilled } from \"@element-plus/icons-vue\";\nimport { ElIcon, ElUpload, uploadProps } from \"element-plus\";\nimport { definePropType, makeSlots, useExpose, useProps, useRender } from \"../../../utils\";\nimport { useUpload } from \"./useUpload\";\nimport type { UploadFile, UploadInstance, UploadProps, UploadUserFile } from \"element-plus\";\n\n/** FaUpload 的运行时 Props 定义。 */\nexport const faUploadProps = {\n\t// eslint-disable-next-line @typescript-eslint/no-deprecated -- Element Plus 2.x 尚未提供可替代的公开运行时 props 定义。\n\t...uploadProps,\n\t/** @description whether to activate drag and drop mode */\n\tdrag: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description maximum number of uploads allowed */\n\tlimit: {\n\t\ttype: Number,\n\t\tdefault: 1,\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: definePropType<string | string[] | null>([String, Array]),\n\t/** @description 大小限制,单位kb */\n\tmaxSize: {\n\t\ttype: definePropType<string | number>([String, Number]),\n\t\tdefault: 5120,\n\t},\n\t/** @description 图片上传接口,优先级最高 */\n\tuploadApi: {\n\t\ttype: definePropType<(formData: FormData) => Promise<string>>(Function),\n\t},\n\t/** @description 图片上传地址 */\n\tuploadUrl: String,\n};\n\n/** FaUpload 的运行时 Emits 定义。 */\nexport const faUploadEmits = {\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string | string[] | null) => typeof value === \"string\" || Array.isArray(value) || value === null,\n\t/** @description v-model:fileList 回调 */\n\t\"update:fileList\": (value: UploadUserFile[]) => Array.isArray(value),\n};\n\n/** FaUpload 的插槽参数。 */\nexport interface FaUploadSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: never;\n\t/** @description 触发文件选择框的内容 */\n\ttrigger: never;\n\t/** @description 提示说明文字 */\n\ttip: never;\n\t/** @description 缩略图模板的内容 */\n\tfile: { file: UploadFile; index: number };\n}\n\nexport default defineComponent({\n\tname: \"FaUpload\",\n\tprops: faUploadProps,\n\temits: faUploadEmits,\n\tslots: makeSlots<FaUploadSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst {\n\t\t\tfileList,\n\t\t\tloading,\n\t\t\tformContext,\n\t\t\tmaxSizeMB,\n\t\t\thandleHttpRequest,\n\t\t\thandleOnSuccess,\n\t\t\thandleOnError,\n\t\t\thandleOnRemove,\n\t\t\thandleOnExceed,\n\t\t\thandleOnUpload,\n\t\t\thandleOnChange,\n\t\t} = useUpload(\"FaUpload\", \"文件\", props, emit, {\n\t\t\tget maxSize() {\n\t\t\t\treturn props.maxSize;\n\t\t\t},\n\t\t\tget uploadApi() {\n\t\t\t\treturn props.uploadApi;\n\t\t\t},\n\t\t\tget uploadUrl() {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-deprecated -- 需要与 Element Plus 2.x 的运行时默认 action 比较。\n\t\t\t\treturn props.uploadUrl || (props.action === uploadProps.action.default ? undefined : props.action);\n\t\t\t},\n\t\t});\n\n\t\tconst uploadRef = shallowRef<UploadInstance | null>(null);\n\t\tconst disabled = computed(() => {\n\t\t\treturn props.disabled === true || formContext?.disabled === true;\n\t\t});\n\t\t// eslint-disable-next-line @typescript-eslint/no-deprecated -- 需要识别 Element Plus 2.x 注入的默认请求实现。\n\t\tconst httpRequest = computed(() => (props.httpRequest === uploadProps.httpRequest.default ? handleHttpRequest : props.httpRequest));\n\n\t\tconst handleBeforeUpload: UploadProps[\"beforeUpload\"] = (rawFile) => {\n\t\t\tif (!handleOnUpload(rawFile)) return false;\n\t\t\treturn props.beforeUpload(rawFile);\n\t\t};\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-deprecated -- 透传范围必须与继承的 Element Plus 2.x 运行时 props 保持一致。\n\t\tconst elUploadProps = useProps(props, uploadProps, [\n\t\t\t\"fileList\",\n\t\t\t\"disabled\",\n\t\t\t\"httpRequest\",\n\t\t\t\"beforeUpload\",\n\t\t\t\"onExceed\",\n\t\t\t\"onSuccess\",\n\t\t\t\"onError\",\n\t\t\t\"onRemove\",\n\t\t\t\"onChange\",\n\t\t]);\n\n\t\tuseRender(() => (\n\t\t\t<ElUpload\n\t\t\t\t{...elUploadProps.value}\n\t\t\t\tref={uploadRef}\n\t\t\t\tclass
|
|
1
|
+
{"version":3,"file":"upload.mjs","names":["update:modelValue","update:fileList"],"sources":["../../../../src/components/upload/src/upload.tsx"],"sourcesContent":["import { Fragment, computed, defineComponent, shallowRef } from \"vue\";\nimport { UploadFilled } from \"@element-plus/icons-vue\";\nimport { ElIcon, ElUpload, uploadProps } from \"element-plus\";\nimport { definePropType, makeSlots, useExpose, useProps, useRender } from \"../../../utils\";\nimport { useUpload } from \"./useUpload\";\nimport type { UploadFile, UploadInstance, UploadProps, UploadUserFile } from \"element-plus\";\n\n/** FaUpload 的运行时 Props 定义。 */\nexport const faUploadProps = {\n\t// eslint-disable-next-line @typescript-eslint/no-deprecated -- Element Plus 2.x 尚未提供可替代的公开运行时 props 定义。\n\t...uploadProps,\n\t/** @description whether to activate drag and drop mode */\n\tdrag: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description maximum number of uploads allowed */\n\tlimit: {\n\t\ttype: Number,\n\t\tdefault: 1,\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: definePropType<string | string[] | null>([String, Array]),\n\t/** @description 大小限制,单位kb */\n\tmaxSize: {\n\t\ttype: definePropType<string | number>([String, Number]),\n\t\tdefault: 5120,\n\t},\n\t/** @description 图片上传接口,优先级最高 */\n\tuploadApi: {\n\t\ttype: definePropType<(formData: FormData) => Promise<string>>(Function),\n\t},\n\t/** @description 图片上传地址 */\n\tuploadUrl: String,\n};\n\n/** FaUpload 的运行时 Emits 定义。 */\nexport const faUploadEmits = {\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string | string[] | null) => typeof value === \"string\" || Array.isArray(value) || value === null,\n\t/** @description v-model:fileList 回调 */\n\t\"update:fileList\": (value: UploadUserFile[]) => Array.isArray(value),\n};\n\n/** FaUpload 的插槽参数。 */\nexport interface FaUploadSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: never;\n\t/** @description 触发文件选择框的内容 */\n\ttrigger: never;\n\t/** @description 提示说明文字 */\n\ttip: never;\n\t/** @description 缩略图模板的内容 */\n\tfile: { file: UploadFile; index: number };\n}\n\nexport default defineComponent({\n\tname: \"FaUpload\",\n\tprops: faUploadProps,\n\temits: faUploadEmits,\n\tslots: makeSlots<FaUploadSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst {\n\t\t\tfileList,\n\t\t\tloading,\n\t\t\tformContext,\n\t\t\tmaxSizeMB,\n\t\t\thandleHttpRequest,\n\t\t\thandleOnSuccess,\n\t\t\thandleOnError,\n\t\t\thandleOnRemove,\n\t\t\thandleOnExceed,\n\t\t\thandleOnUpload,\n\t\t\thandleOnChange,\n\t\t} = useUpload(\"FaUpload\", \"文件\", props, emit, {\n\t\t\tget maxSize() {\n\t\t\t\treturn props.maxSize;\n\t\t\t},\n\t\t\tget uploadApi() {\n\t\t\t\treturn props.uploadApi;\n\t\t\t},\n\t\t\tget uploadUrl() {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-deprecated -- 需要与 Element Plus 2.x 的运行时默认 action 比较。\n\t\t\t\treturn props.uploadUrl || (props.action === uploadProps.action.default ? undefined : props.action);\n\t\t\t},\n\t\t});\n\n\t\tconst uploadRef = shallowRef<UploadInstance | null>(null);\n\t\tconst disabled = computed(() => {\n\t\t\treturn props.disabled === true || formContext?.disabled === true;\n\t\t});\n\t\t// eslint-disable-next-line @typescript-eslint/no-deprecated -- 需要识别 Element Plus 2.x 注入的默认请求实现。\n\t\tconst httpRequest = computed(() => (props.httpRequest === uploadProps.httpRequest.default ? handleHttpRequest : props.httpRequest));\n\n\t\tconst handleBeforeUpload: UploadProps[\"beforeUpload\"] = (rawFile) => {\n\t\t\tif (!handleOnUpload(rawFile)) return false;\n\t\t\treturn props.beforeUpload(rawFile);\n\t\t};\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-deprecated -- 透传范围必须与继承的 Element Plus 2.x 运行时 props 保持一致。\n\t\tconst elUploadProps = useProps(props, uploadProps, [\n\t\t\t\"fileList\",\n\t\t\t\"disabled\",\n\t\t\t\"httpRequest\",\n\t\t\t\"beforeUpload\",\n\t\t\t\"onExceed\",\n\t\t\t\"onSuccess\",\n\t\t\t\"onError\",\n\t\t\t\"onRemove\",\n\t\t\t\"onChange\",\n\t\t]);\n\n\t\tuseRender(() => (\n\t\t\t<ElUpload\n\t\t\t\t{...elUploadProps.value}\n\t\t\t\tref={uploadRef}\n\t\t\t\tclass={[\"fa-upload\", { \"fa-upload__trigger\": !!slots.trigger }]}\n\t\t\t\tvLoading={loading.value}\n\t\t\t\tvModel:fileList={fileList.value}\n\t\t\t\tdisabled={disabled.value}\n\t\t\t\thttpRequest={httpRequest.value}\n\t\t\t\tbeforeUpload={handleBeforeUpload}\n\t\t\t\tonExceed={handleOnExceed}\n\t\t\t\tonSuccess={handleOnSuccess}\n\t\t\t\tonError={handleOnError}\n\t\t\t\tonRemove={handleOnRemove}\n\t\t\t\tonChange={handleOnChange}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\tdefault: () =>\n\t\t\t\t\t\tslots.default ? (\n\t\t\t\t\t\t\tslots.default()\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<ElIcon class=\"el-icon--upload\">\n\t\t\t\t\t\t\t\t\t<UploadFilled />\n\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t\t<div class=\"el-upload__text\">\n\t\t\t\t\t\t\t\t\t{props.drag ? \"Drop file here or \" : \"Select a file or \"}\n\t\t\t\t\t\t\t\t\t<em>click to upload</em>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t),\n\t\t\t\t\t...(slots.trigger && { trigger: () => slots.trigger?.() ?? [] }),\n\t\t\t\t\ttip: () =>\n\t\t\t\t\t\tslots.tip ? (\n\t\t\t\t\t\t\tslots.tip()\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<div class=\"el-upload__tip\">files with a size less than {maxSizeMB.value.toString()}MB</div>\n\t\t\t\t\t\t\t\t{!props.showFileList && fileList.value.length > 0 && (\n\t\t\t\t\t\t\t\t\t<div class=\"el-upload__tip\">\n\t\t\t\t\t\t\t\t\t\t{fileList.value.map((item, index) => (\n\t\t\t\t\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t\t\t\t\t{item.name}\n\t\t\t\t\t\t\t\t\t\t\t\t{fileList.value.length <= index && <br />}\n\t\t\t\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t),\n\t\t\t\t\t...(slots.file && {\n\t\t\t\t\t\tfile: ({ file, index }: { file: UploadFile; index: number }) => slots.file?.({ file, index }) ?? [],\n\t\t\t\t\t}),\n\t\t\t\t}}\n\t\t\t</ElUpload>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 取消上传请求 */\n\t\t\tabort: computed(() => uploadRef.value?.abort),\n\t\t\t/** @description 手动上传文件列表 */\n\t\t\tsubmit: computed(() => uploadRef.value?.submit),\n\t\t\t/** @description 清空已上传的文件列表(该方法不支持在 before-upload 中调用) */\n\t\t\tclearFiles: computed(() => uploadRef.value?.clearFiles),\n\t\t\t/** @description 手动选择文件 */\n\t\t\thandleStart: computed(() => uploadRef.value?.handleStart),\n\t\t\t/** @description 手动移除文件。file 和 rawFile 已被合并。 */\n\t\t\thandleRemove: computed(() => uploadRef.value?.handleRemove),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading,\n\t\t\t/** @description 文件集合 */\n\t\t\tfileList,\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;AAQA,MAAa,gBAAgB;CAE5B,GAAG;;CAEH,MAAM;EACL,MAAM;EACN,SAAS;CACV;;CAEA,OAAO;EACN,MAAM;EACN,SAAS;CACV;;CAEA,YAAY,eAAyC,CAAC,QAAQ,KAAK,CAAC;;CAEpE,SAAS;EACR,MAAM,eAAgC,CAAC,QAAQ,MAAM,CAAC;EACtD,SAAS;CACV;;CAEA,WAAW,EACV,MAAM,eAAwD,QAAQ,EACvE;;CAEA,WAAW;AACZ;;AAGA,MAAa,gBAAgB;;CAE5B,sBAAsB,UAAoC,OAAO,UAAU,YAAY,MAA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