fast-element-plus 2.0.18 → 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.
Files changed (47) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/component.d.ts +17 -17
  3. package/dist/components/button/src/button.d.ts +1 -1
  4. package/dist/components/button/src/button.mjs +2 -2
  5. package/dist/components/button/src/button.mjs.map +1 -1
  6. package/dist/components/contextMenu/src/contextMenu.d.ts +1 -1
  7. package/dist/components/contextMenu/src/contextMenu.mjs +2 -2
  8. package/dist/components/contextMenu/src/contextMenu.mjs.map +1 -1
  9. package/dist/components/dialog/src/dialog.d.ts +2 -2
  10. package/dist/components/dialog/src/dialog.mjs +3 -3
  11. package/dist/components/dialog/src/dialog.mjs.map +1 -1
  12. package/dist/components/drawer/src/drawer.d.ts +2 -2
  13. package/dist/components/drawer/src/drawer.mjs +3 -3
  14. package/dist/components/drawer/src/drawer.mjs.map +1 -1
  15. package/dist/components/layoutGrid/src/layoutGridItem.d.ts +1 -1
  16. package/dist/components/layoutGrid/src/layoutGridItem.mjs +1 -1
  17. package/dist/components/layoutGrid/src/layoutGridItem.mjs.map +1 -1
  18. package/dist/components/select/src/select.d.ts +1 -1
  19. package/dist/components/select/src/select.mjs +2 -2
  20. package/dist/components/select/src/select.mjs.map +1 -1
  21. package/dist/components/selectPage/src/selectPage.d.ts +10 -4
  22. package/dist/components/selectPage/src/selectPage.mjs +2 -2
  23. package/dist/components/selectPage/src/selectPage.mjs.map +1 -1
  24. package/dist/components/selectV2/src/selectV2.d.ts +1 -1
  25. package/dist/components/selectV2/src/selectV2.mjs +2 -2
  26. package/dist/components/selectV2/src/selectV2.mjs.map +1 -1
  27. package/dist/components/table/src/table.d.ts +1 -1
  28. package/dist/components/table/src/table.mjs +2 -2
  29. package/dist/components/table/src/table.mjs.map +1 -1
  30. package/dist/components/tree/src/tree.d.ts +1 -1
  31. package/dist/components/tree/src/tree.mjs +2 -2
  32. package/dist/components/tree/src/tree.mjs.map +1 -1
  33. package/dist/components/treeSelect/src/treeSelect.d.ts +19 -7
  34. package/dist/components/treeSelect/src/treeSelect.mjs +2 -2
  35. package/dist/components/treeSelect/src/treeSelect.mjs.map +1 -1
  36. package/dist/components/upload/src/upload.mjs +2 -2
  37. package/dist/components/upload/src/upload.mjs.map +1 -1
  38. package/dist/components/uploadImage/src/uploadImage.mjs +1 -5
  39. package/dist/components/uploadImage/src/uploadImage.mjs.map +1 -1
  40. package/dist/index.css +1 -1
  41. package/dist/index.css.map +1 -1
  42. package/dist/index.global.min.js +3 -3
  43. package/dist/index.global.min.js.map +1 -1
  44. package/dist/version.d.ts +1 -1
  45. package/dist/version.mjs +1 -1
  46. package/dist/version.mjs.map +1 -1
  47. package/package.json +1 -1
@@ -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 (...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>;
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 (...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>;
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 (...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>;
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 (...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>;
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").ComputedRef<boolean>;
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 (...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>;
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 (...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>;
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: computed(() => state.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;EACN,SAAS;CACV;;CAEA,cAAc;EACb,MAAM;EACN,SAAS;CACV;;CAEA,qBAAqB;EACpB,MAAM;EACN,SAAS;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,mBAAmB;;CAEnB,qBAAqB;;CAErB,YAAY;EACX,MAAM,eAAqC;GAAC;GAAQ;GAAQ;GAAS;GAAQ;EAAK,CAAC;EACnF,SAAS,KAAA;CACV;;CAEA,OAAO,eAAyC,CAAC,QAAQ,KAAK,CAAC;;CAE/D,OAAO;EACN,MAAM,CAAC,QAAQ,MAAM;EACrB,SAAS;CACV;;CAEA,YAAY;;CAEZ,MAAM;EACL,MAAM;EACN,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Ae,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,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;EACN,SAAS;CACV;;CAEA,cAAc;EACb,MAAM;EACN,SAAS;CACV;;CAEA,qBAAqB;EACpB,MAAM;EACN,SAAS;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,mBAAmB;;CAEnB,qBAAqB;;CAErB,YAAY;EACX,MAAM,eAAqC;GAAC;GAAQ;GAAQ;GAAS;GAAQ;EAAK,CAAC;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;;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" }, [createTextVNode("Drop file here or "), createVNode("em", null, [createTextVNode("click to upload")])])]),
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=\"fa-upload\"\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\tDrop file here or <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;E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5C,QAAQ,eAAe,UAAU,OAAO,MAAM;;GAE9C,YAAY,eAAe,UAAU,OAAO,UAAU;;GAEtD,aAAa,eAAe,UAAU,OAAO,WAAW;;GAExD,cAAc,eAAe,UAAU,OAAO,YAAY;;GAE1D;;GAEA;EACD,CAAC;CACF;AACD,CAAC"}
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 文件集合 */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AE,MAAM,YAAiD,MAAM,OAAO;IAAE;IAAM;GAAM,CAAC,KAAK,CAAA,EAClG;EAAE,CAAA,GAAA,CAAA,CAAA,iBAAA,SAAA,GA/CO,QAAQ,KAAK,CAAA,CAAA,CAkDxB;EAED,OAAO,UAAU,QAAQ;;GAExB,OAAO,eAAe,UAAU,OAAO,KAAK;;GAE5C,QAAQ,eAAe,UAAU,OAAO,MAAM;;GAE9C,YAAY,eAAe,UAAU,OAAO,UAAU;;GAEtD,aAAa,eAAe,UAAU,OAAO,WAAW;;GAExD,cAAc,eAAe,UAAU,OAAO,YAAY;;GAE1D;;GAEA;EACD,CAAC;CACF;AACD,CAAC"}
@@ -162,11 +162,7 @@ var uploadImage_default = defineComponent({
162
162
  "class": "el-upload-list__item-icon",
163
163
  "onClick": handleRemove,
164
164
  "title": "删除"
165
- }, [createVNode(ElIcon, null, { default: () => [createVNode(Delete, null, null)] })])])])]) : slots.default ? slots.default() : createVNode(Fragment, null, [createVNode(ElIcon, { "class": "el-icon--upload" }, { default: () => [createVNode(UploadFilled, null, null)] }), createVNode("div", { "class": "el-upload__text" }, [
166
- createTextVNode("Drop file here "),
167
- createVNode("br", null, null),
168
- createVNode("em", null, [createTextVNode("click to upload")])
169
- ])]),
165
+ }, [createVNode(ElIcon, null, { default: () => [createVNode(Delete, null, null)] })])])])]) : 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 && createVNode(Fragment, null, [createTextVNode("Drop file here "), createVNode("br", null, null)]), createVNode("em", null, [createTextVNode("click to upload")])])]),
170
166
  tip: () => createVNode("div", { "class": "el-upload__tip" }, [
171
167
  createTextVNode("file with a size less than "),
172
168
  maxSizeMB.value.toString(),
@@ -1 +1 @@
1
- {"version":3,"file":"uploadImage.mjs","names":["update:modelValue","update:fileList"],"sources":["../../../../src/components/uploadImage/src/uploadImage.tsx"],"sourcesContent":["import { Fragment, computed, defineComponent, reactive, shallowRef, withModifiers } from \"vue\";\nimport { Delete, Edit, UploadFilled, ZoomIn } from \"@element-plus/icons-vue\";\nimport { ElIcon, ElImageViewer, ElUpload, uploadProps } from \"element-plus\";\nimport { FaMimeType } from \"../../../constants\";\nimport { addCssUnit, definePropType, makeSlots, randomString, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport { useUpload } from \"../../upload/src/useUpload\";\nimport type { UploadFile, UploadInstance, UploadProps, UploadUserFile } from \"element-plus\";\n\n/** FaUploadImage 的运行时 Props 定义。 */\nexport const faUploadImageProps = {\n\t// eslint-disable-next-line @typescript-eslint/no-deprecated -- Element Plus 2.x 尚未提供可替代的公开运行时 props 定义。\n\t...uploadProps,\n\t/** @description accepted [file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept), will not work when `thumbnail-mode === true` */\n\taccept: {\n\t\ttype: String,\n\t\tdefault: () => FaMimeType.Image,\n\t},\n\t/** @description type of file list */\n\tlistType: {\n\t\ttype: definePropType<NonNullable<UploadProps[\"listType\"]>>(String),\n\t\tdefault: \"picture\",\n\t},\n\t/** @description whether uploading multiple files is permitted */\n\tmultiple: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t\tvalidator: (value: boolean) => {\n\t\t\tif (value) {\n\t\t\t\tconsole.warn(\"[Fast:FaUploadImage]\", \"'multiple' 属性固定为 false,外部设置不会生效。\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t},\n\t/** @description whether to show the uploaded file list */\n\tshowFileList: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: definePropType<string | null>(String),\n\t/** @description 大小限制,单位kb */\n\tmaxSize: {\n\t\ttype: [String, Number],\n\t\tdefault: 2048,\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\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: 150,\n\t},\n\t/** @description 高度 */\n\theight: {\n\t\ttype: [String, Number],\n\t\tdefault: 150,\n\t},\n};\n\n/** FaUploadImage 的运行时 Emits 定义。 */\nexport const faUploadImageEmits = {\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string | null) => typeof value === \"string\" || value === null,\n\t/** @description v-model:fileList 回调 */\n\t\"update:fileList\": (value: UploadUserFile[]) => Array.isArray(value),\n};\n\n/** FaUploadImage 的插槽参数。 */\nexport interface FaUploadImageSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: never;\n}\n\nexport default defineComponent({\n\tname: \"FaUploadImage\",\n\tprops: faUploadImageProps,\n\temits: faUploadImageEmits,\n\tslots: makeSlots<FaUploadImageSlots>(),\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<string>(\"FaUploadImage\", \"图片\", 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\n\t\tconst state = reactive({\n\t\t\tuploadKey: `fa-upload-image__${randomString(8)}`,\n\t\t\tpreview: false,\n\t\t\tpreviewList: withDefineType<string[]>([]),\n\t\t});\n\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 handleEdit = () => {\n\t\t\tconst uploadInputEl = document.querySelector(`.${state.uploadKey} .el-upload__input`);\n\t\t\tuploadInputEl?.dispatchEvent(new MouseEvent(\"click\"));\n\t\t};\n\n\t\tconst handlePreview = () => {\n\t\t\tconst fileUrl = fileList.value[0]?.url;\n\t\t\tif (!fileUrl) return;\n\t\t\tstate.previewList = [fileUrl];\n\t\t\tstate.preview = true;\n\t\t};\n\n\t\tconst handleRemove = () => {\n\t\t\tconst file = fileList.value[0];\n\t\t\tif (file) uploadRef.value?.handleRemove(file as UploadFile);\n\t\t};\n\n\t\tconst handleBeforeUpload: UploadProps[\"beforeUpload\"] = (rawFile) => {\n\t\t\tif (!handleOnUpload(rawFile)) {\n\t\t\t\treturn false;\n\t\t\t}\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<Fragment>\n\t\t\t\t<ElUpload\n\t\t\t\t\t{...elUploadProps.value}\n\t\t\t\t\tref={uploadRef}\n\t\t\t\t\tclass={[\"fa-upload-image\", state.uploadKey]}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\"--width\": addCssUnit(props.width),\n\t\t\t\t\t\t\"--height\": addCssUnit(props.height),\n\t\t\t\t\t}}\n\t\t\t\t\tvLoading={loading.value}\n\t\t\t\t\tvModel:fileList={fileList.value}\n\t\t\t\t\tmultiple={false}\n\t\t\t\t\tdisabled={disabled.value}\n\t\t\t\t\thttpRequest={httpRequest.value}\n\t\t\t\t\tbeforeUpload={handleBeforeUpload}\n\t\t\t\t\tonExceed={handleOnExceed}\n\t\t\t\t\tonSuccess={handleOnSuccess}\n\t\t\t\t\tonError={handleOnError}\n\t\t\t\t\tonRemove={handleOnRemove}\n\t\t\t\t\tonChange={handleOnChange}\n\t\t\t\t>\n\t\t\t\t\t{{\n\t\t\t\t\t\tdefault: () =>\n\t\t\t\t\t\t\tfileList.value.length > 0 ? (\n\t\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t\t<img class=\"el-upload-list__item-thumbnail\" src={fileList.value[0]?.url} />\n\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\tclass=\"el-upload-list__item-actions\"\n\t\t\t\t\t\t\t\t\t\tonClick={withModifiers(() => {\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}, [\"stop\"])}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<span class=\"el-upload-list__item-icon\" onClick={handlePreview} title=\"查看\">\n\t\t\t\t\t\t\t\t\t\t\t<ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t\t<ZoomIn />\n\t\t\t\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t{!disabled.value && (\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<span class=\"el-upload-list__item-icon\" onClick={handleEdit} title=\"编辑\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Edit />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"el-upload-list__item-icon\" onClick={handleRemove} title=\"删除\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Delete />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\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</span>\n\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t) : slots.default ? (\n\t\t\t\t\t\t\t\tslots.default()\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t\t<ElIcon class=\"el-icon--upload\">\n\t\t\t\t\t\t\t\t\t\t<UploadFilled />\n\t\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t\t\t<div class=\"el-upload__text\">\n\t\t\t\t\t\t\t\t\t\tDrop file here <br />\n\t\t\t\t\t\t\t\t\t\t<em>click to upload</em>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\ttip: () => <div class=\"el-upload__tip\">file with a size less than {maxSizeMB.value.toString()}MB</div>,\n\t\t\t\t\t}}\n\t\t\t\t</ElUpload>\n\t\t\t\t{state.preview && (\n\t\t\t\t\t<ElImageViewer\n\t\t\t\t\t\tcloseOnPressEscape\n\t\t\t\t\t\thideOnClickModal\n\t\t\t\t\t\tteleported\n\t\t\t\t\t\tonClose={() => (state.preview = false)}\n\t\t\t\t\t\turlList={state.previewList}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</Fragment>\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\t/** @description 预览 */\n\t\t\tpreview: computed(() => state.preview),\n\t\t\t/** @description 预览集合 */\n\t\t\tpreviewList: computed(() => state.previewList),\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;AASA,MAAa,qBAAqB;CAEjC,GAAG;;CAEH,QAAQ;EACP,MAAM;EACN,eAAe,WAAW;CAC3B;;CAEA,UAAU;EACT,MAAM,eAAqD,MAAM;EACjE,SAAS;CACV;;CAEA,UAAU;EACT,MAAM;EACN,SAAS;EACT,YAAY,UAAmB;GAC9B,IAAI,OAAO;IACV,QAAQ,KAAK,wBAAwB,kCAAkC;IACvE,OAAO;GACR;GACA,OAAO;EACR;CACD;;CAEA,cAAc;EACb,MAAM;EACN,SAAS;CACV;;CAEA,YAAY,eAA8B,MAAM;;CAEhD,SAAS;EACR,MAAM,CAAC,QAAQ,MAAM;EACrB,SAAS;CACV;;CAEA,WAAW,EACV,MAAM,eAAwD,QAAQ,EACvE;;CAEA,WAAW;;CAEX,OAAO;EACN,MAAM,CAAC,QAAQ,MAAM;EACrB,SAAS;CACV;;CAEA,QAAQ;EACP,MAAM,CAAC,QAAQ,MAAM;EACrB,SAAS;CACV;AACD;;AAGA,MAAa,qBAAqB;;CAEj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A,YAAA,QAAA,MAAA,IAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAM9D,CAAA,CAAA,CAAA,IAGA,MAAM,UACT,MAAM,QAAQ,IAAC,YAAA,UAAA,MAAA,CAAA,YAAA,QAAA,EAAA,SAAA,kBAAA,GAAA,EAAA,eAAA,CAAA,YAAA,cAAA,MAAA,IAAA,CAAA,EAAA,CAAA,GAAA,YAAA,OAAA,EAAA,SAAA,kBAAA,GAAA;IAAA,gBAAA,iBAAA;IAAA,YAAA,MAAA,MAAA,IAAA;IAAA,YAAA,MAAA,MAAA,CAAA,gBAAA,iBAAA,CAAA,CAAA;GAAA,CAAA,CAAA,CAAA;GAYjB,WAAK,YAAA,OAAA,EAAA,SAAA,iBAAA,GAAA;IAAA,gBAAA,6BAAA;IAA8D,UAAU,MAAM,SAAS;IAAC,gBAAA,IAAA;GAAA,CAAA;EAAS,CAAA,GAAA,CAAA,CAAA,iBAAA,SAAA,GAzD7F,QAAQ,KAAK,CAAA,CAAA,GA4DvB,MAAM,WAAO,YAAA,eAAA;GAAA,sBAAA;GAAA,oBAAA;GAAA,cAAA;GAAA,iBAKI,MAAM,UAAU;GAAM,WAC7B,MAAM;EAAW,GAAA,IAAA,CAE3B,CAAA,CAEF;EAED,OAAO,UAAU,QAAQ;;GAExB,OAAO,eAAe,UAAU,OAAO,KAAK;;GAE5C,QAAQ,eAAe,UAAU,OAAO,MAAM;;GAE9C,YAAY,eAAe,UAAU,OAAO,UAAU;;GAEtD,aAAa,eAAe,UAAU,OAAO,WAAW;;GAExD,cAAc,eAAe,UAAU,OAAO,YAAY;;GAE1D;;GAEA;;GAEA,SAAS,eAAe,MAAM,OAAO;;GAErC,aAAa,eAAe,MAAM,WAAW;EAC9C,CAAC;CACF;AACD,CAAC"}
1
+ {"version":3,"file":"uploadImage.mjs","names":["update:modelValue","update:fileList"],"sources":["../../../../src/components/uploadImage/src/uploadImage.tsx"],"sourcesContent":["import { Fragment, computed, defineComponent, reactive, shallowRef, withModifiers } from \"vue\";\nimport { Delete, Edit, UploadFilled, ZoomIn } from \"@element-plus/icons-vue\";\nimport { ElIcon, ElImageViewer, ElUpload, uploadProps } from \"element-plus\";\nimport { FaMimeType } from \"../../../constants\";\nimport { addCssUnit, definePropType, makeSlots, randomString, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport { useUpload } from \"../../upload/src/useUpload\";\nimport type { UploadFile, UploadInstance, UploadProps, UploadUserFile } from \"element-plus\";\n\n/** FaUploadImage 的运行时 Props 定义。 */\nexport const faUploadImageProps = {\n\t// eslint-disable-next-line @typescript-eslint/no-deprecated -- Element Plus 2.x 尚未提供可替代的公开运行时 props 定义。\n\t...uploadProps,\n\t/** @description accepted [file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept), will not work when `thumbnail-mode === true` */\n\taccept: {\n\t\ttype: String,\n\t\tdefault: () => FaMimeType.Image,\n\t},\n\t/** @description type of file list */\n\tlistType: {\n\t\ttype: definePropType<NonNullable<UploadProps[\"listType\"]>>(String),\n\t\tdefault: \"picture\",\n\t},\n\t/** @description whether uploading multiple files is permitted */\n\tmultiple: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t\tvalidator: (value: boolean) => {\n\t\t\tif (value) {\n\t\t\t\tconsole.warn(\"[Fast:FaUploadImage]\", \"'multiple' 属性固定为 false,外部设置不会生效。\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t},\n\t/** @description whether to show the uploaded file list */\n\tshowFileList: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: definePropType<string | null>(String),\n\t/** @description 大小限制,单位kb */\n\tmaxSize: {\n\t\ttype: [String, Number],\n\t\tdefault: 2048,\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\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: 150,\n\t},\n\t/** @description 高度 */\n\theight: {\n\t\ttype: [String, Number],\n\t\tdefault: 150,\n\t},\n};\n\n/** FaUploadImage 的运行时 Emits 定义。 */\nexport const faUploadImageEmits = {\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string | null) => typeof value === \"string\" || value === null,\n\t/** @description v-model:fileList 回调 */\n\t\"update:fileList\": (value: UploadUserFile[]) => Array.isArray(value),\n};\n\n/** FaUploadImage 的插槽参数。 */\nexport interface FaUploadImageSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: never;\n}\n\nexport default defineComponent({\n\tname: \"FaUploadImage\",\n\tprops: faUploadImageProps,\n\temits: faUploadImageEmits,\n\tslots: makeSlots<FaUploadImageSlots>(),\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<string>(\"FaUploadImage\", \"图片\", 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\n\t\tconst state = reactive({\n\t\t\tuploadKey: `fa-upload-image__${randomString(8)}`,\n\t\t\tpreview: false,\n\t\t\tpreviewList: withDefineType<string[]>([]),\n\t\t});\n\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 handleEdit = () => {\n\t\t\tconst uploadInputEl = document.querySelector(`.${state.uploadKey} .el-upload__input`);\n\t\t\tuploadInputEl?.dispatchEvent(new MouseEvent(\"click\"));\n\t\t};\n\n\t\tconst handlePreview = () => {\n\t\t\tconst fileUrl = fileList.value[0]?.url;\n\t\t\tif (!fileUrl) return;\n\t\t\tstate.previewList = [fileUrl];\n\t\t\tstate.preview = true;\n\t\t};\n\n\t\tconst handleRemove = () => {\n\t\t\tconst file = fileList.value[0];\n\t\t\tif (file) uploadRef.value?.handleRemove(file as UploadFile);\n\t\t};\n\n\t\tconst handleBeforeUpload: UploadProps[\"beforeUpload\"] = (rawFile) => {\n\t\t\tif (!handleOnUpload(rawFile)) {\n\t\t\t\treturn false;\n\t\t\t}\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<Fragment>\n\t\t\t\t<ElUpload\n\t\t\t\t\t{...elUploadProps.value}\n\t\t\t\t\tref={uploadRef}\n\t\t\t\t\tclass={[\"fa-upload-image\", state.uploadKey]}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\"--width\": addCssUnit(props.width),\n\t\t\t\t\t\t\"--height\": addCssUnit(props.height),\n\t\t\t\t\t}}\n\t\t\t\t\tvLoading={loading.value}\n\t\t\t\t\tvModel:fileList={fileList.value}\n\t\t\t\t\tmultiple={false}\n\t\t\t\t\tdisabled={disabled.value}\n\t\t\t\t\thttpRequest={httpRequest.value}\n\t\t\t\t\tbeforeUpload={handleBeforeUpload}\n\t\t\t\t\tonExceed={handleOnExceed}\n\t\t\t\t\tonSuccess={handleOnSuccess}\n\t\t\t\t\tonError={handleOnError}\n\t\t\t\t\tonRemove={handleOnRemove}\n\t\t\t\t\tonChange={handleOnChange}\n\t\t\t\t>\n\t\t\t\t\t{{\n\t\t\t\t\t\tdefault: () =>\n\t\t\t\t\t\t\tfileList.value.length > 0 ? (\n\t\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t\t<img class=\"el-upload-list__item-thumbnail\" src={fileList.value[0]?.url} />\n\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\tclass=\"el-upload-list__item-actions\"\n\t\t\t\t\t\t\t\t\t\tonClick={withModifiers(() => {\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}, [\"stop\"])}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<span class=\"el-upload-list__item-icon\" onClick={handlePreview} title=\"查看\">\n\t\t\t\t\t\t\t\t\t\t\t<ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t\t<ZoomIn />\n\t\t\t\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t{!disabled.value && (\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<span class=\"el-upload-list__item-icon\" onClick={handleEdit} title=\"编辑\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Edit />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"el-upload-list__item-icon\" onClick={handleRemove} title=\"删除\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<Delete />\n\t\t\t\t\t\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\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</span>\n\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t) : slots.default ? (\n\t\t\t\t\t\t\t\tslots.default()\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t\t<ElIcon class=\"el-icon--upload\">\n\t\t\t\t\t\t\t\t\t\t<UploadFilled />\n\t\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t\t\t<div class=\"el-upload__text\">\n\t\t\t\t\t\t\t\t\t\t{props.drag && (\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\tDrop file here <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\t<em>click to upload</em>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\ttip: () => <div class=\"el-upload__tip\">file with a size less than {maxSizeMB.value.toString()}MB</div>,\n\t\t\t\t\t}}\n\t\t\t\t</ElUpload>\n\t\t\t\t{state.preview && (\n\t\t\t\t\t<ElImageViewer\n\t\t\t\t\t\tcloseOnPressEscape\n\t\t\t\t\t\thideOnClickModal\n\t\t\t\t\t\tteleported\n\t\t\t\t\t\tonClose={() => (state.preview = false)}\n\t\t\t\t\t\turlList={state.previewList}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</Fragment>\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\t/** @description 预览 */\n\t\t\tpreview: computed(() => state.preview),\n\t\t\t/** @description 预览集合 */\n\t\t\tpreviewList: computed(() => state.previewList),\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;AASA,MAAa,qBAAqB;CAEjC,GAAG;;CAEH,QAAQ;EACP,MAAM;EACN,eAAe,WAAW;CAC3B;;CAEA,UAAU;EACT,MAAM,eAAqD,MAAM;EACjE,SAAS;CACV;;CAEA,UAAU;EACT,MAAM;EACN,SAAS;EACT,YAAY,UAAmB;GAC9B,IAAI,OAAO;IACV,QAAQ,KAAK,wBAAwB,kCAAkC;IACvE,OAAO;GACR;GACA,OAAO;EACR;CACD;;CAEA,cAAc;EACb,MAAM;EACN,SAAS;CACV;;CAEA,YAAY,eAA8B,MAAM;;CAEhD,SAAS;EACR,MAAM,CAAC,QAAQ,MAAM;EACrB,SAAS;CACV;;CAEA,WAAW,EACV,MAAM,eAAwD,QAAQ,EACvE;;CAEA,WAAW;;CAEX,OAAO;EACN,MAAM,CAAC,QAAQ,MAAM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