fast-element-plus 2.0.1 → 2.0.2

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 (88) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +2 -0
  3. package/README.zh.md +2 -0
  4. package/dist/components/avatar/index.d.ts +2 -2
  5. package/dist/components/avatar/index.mjs.map +1 -1
  6. package/dist/components/button/index.d.ts +1 -1
  7. package/dist/components/button/index.mjs.map +1 -1
  8. package/dist/components/contextMenu/src/contextMenu.d.ts +4 -4
  9. package/dist/components/contextMenu/src/contextMenu.type.d.ts +3 -3
  10. package/dist/components/dialog/index.d.ts +1 -1
  11. package/dist/components/dialog/index.mjs.map +1 -1
  12. package/dist/components/drawer/index.d.ts +2 -2
  13. package/dist/components/drawer/index.mjs.map +1 -1
  14. package/dist/components/form/index.d.ts +1 -1
  15. package/dist/components/form/index.mjs.map +1 -1
  16. package/dist/components/form/src/form.d.ts +5 -2
  17. package/dist/components/form/src/form.mjs.map +1 -1
  18. package/dist/components/formItemTip/index.d.ts +1 -1
  19. package/dist/components/formItemTip/index.mjs.map +1 -1
  20. package/dist/components/icon/index.d.ts +2 -2
  21. package/dist/components/icon/index.mjs.map +1 -1
  22. package/dist/components/image/index.d.ts +1 -1
  23. package/dist/components/image/index.mjs.map +1 -1
  24. package/dist/components/inputDialogPage/index.d.ts +1 -1
  25. package/dist/components/inputDialogPage/index.mjs.map +1 -1
  26. package/dist/components/inputDialogPage/src/inputDialogPage.d.ts +15 -15
  27. package/dist/components/inputDialogPage/src/inputDialogPage.mjs.map +1 -1
  28. package/dist/components/layoutGrid/src/layoutGrid.mjs.map +1 -1
  29. package/dist/components/layoutGrid/src/layoutGridItem.mjs.map +1 -1
  30. package/dist/components/select/index.d.ts +2 -2
  31. package/dist/components/select/index.mjs.map +1 -1
  32. package/dist/components/select/src/select.d.ts +15 -14
  33. package/dist/components/select/src/select.mjs.map +1 -1
  34. package/dist/components/select/src/select.type.d.ts +4 -4
  35. package/dist/components/select/src/selectOption.d.ts +5 -5
  36. package/dist/components/selectPage/index.d.ts +1 -1
  37. package/dist/components/selectPage/index.mjs.map +1 -1
  38. package/dist/components/selectPage/src/selectPage.d.ts +10 -10
  39. package/dist/components/selectPage/src/selectPage.mjs.map +1 -1
  40. package/dist/components/selectV2/index.d.ts +2 -2
  41. package/dist/components/selectV2/index.mjs.map +1 -1
  42. package/dist/components/selectV2/src/selectV2.d.ts +28 -36
  43. package/dist/components/selectV2/src/selectV2.mjs.map +1 -1
  44. package/dist/components/table/index.d.ts +1 -1
  45. package/dist/components/table/index.mjs.map +1 -1
  46. package/dist/components/table/src/page.type.d.ts +3 -1
  47. package/dist/components/table/src/page.type.mjs.map +1 -1
  48. package/dist/components/table/src/table.d.ts +38 -39
  49. package/dist/components/table/src/table.mjs +4 -2
  50. package/dist/components/table/src/table.mjs.map +1 -1
  51. package/dist/components/table/src/table.state.d.ts +5 -5
  52. package/dist/components/table/src/table.type.d.ts +13 -10
  53. package/dist/components/table/src/table.type.mjs.map +1 -1
  54. package/dist/components/table/src/tableColumn.d.ts +3 -4
  55. package/dist/components/table/src/tableColumn.mjs +1 -1
  56. package/dist/components/table/src/tableColumn.mjs.map +1 -1
  57. package/dist/components/table/src/tableColumnSettingDialog.mjs.map +1 -1
  58. package/dist/components/table/src/tableSearchForm.d.ts +1 -1
  59. package/dist/components/table/src/tableSearchForm.mjs.map +1 -1
  60. package/dist/components/table/src/tableSearchFormItem.mjs.map +1 -1
  61. package/dist/components/table/src/useTable.d.ts +5 -5
  62. package/dist/components/table/src/useTable.mjs.map +1 -1
  63. package/dist/components/table/utils/table.d.ts +3 -2
  64. package/dist/components/table/utils/table.mjs.map +1 -1
  65. package/dist/components/tree/index.d.ts +1 -1
  66. package/dist/components/tree/index.mjs.map +1 -1
  67. package/dist/components/tree/src/tree.d.ts +27 -25
  68. package/dist/components/tree/src/tree.mjs +3 -1
  69. package/dist/components/tree/src/tree.mjs.map +1 -1
  70. package/dist/components/tree/src/tree.props.d.ts +1 -4
  71. package/dist/components/tree/src/tree.type.d.ts +4 -4
  72. package/dist/components/treeSelect/index.d.ts +1 -1
  73. package/dist/components/treeSelect/index.mjs.map +1 -1
  74. package/dist/components/treeSelect/src/treeSelect.d.ts +32 -31
  75. package/dist/components/treeSelect/src/treeSelect.mjs.map +1 -1
  76. package/dist/components/upload/index.d.ts +1 -1
  77. package/dist/components/upload/index.mjs.map +1 -1
  78. package/dist/components/uploadImage/index.d.ts +1 -1
  79. package/dist/components/uploadImage/index.mjs.map +1 -1
  80. package/dist/components/uploadImages/index.d.ts +2 -2
  81. package/dist/components/uploadImages/index.mjs.map +1 -1
  82. package/dist/directives/click-icon-copy/index.mjs.map +1 -1
  83. package/dist/index.global.min.js +2 -2
  84. package/dist/index.global.min.js.map +1 -1
  85. package/dist/version.d.ts +1 -1
  86. package/dist/version.mjs +1 -1
  87. package/dist/version.mjs.map +1 -1
  88. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
+ import type { SelectV2Props as ElementPlusSelectV2Props, Options, Placement, ScrollbarDirection } from "element-plus";
2
+ import type { Component, PropType } from "vue";
1
3
  import type { ElSelectorModelValue, ElSelectorOutput, ElSelectorValue } from "../../select/src/select.type";
2
4
  import type { PagedInput, PagedResult } from "../../table";
3
- import type { SelectV2Props as ElementPlusSelectV2Props, Options, Placement } from "element-plus";
4
- import type { Component, PropType } from "vue";
5
5
  /** 传递给底层 Element Plus 虚拟化选择器的扩展 Props。 */
6
6
  export interface Props {
7
7
  label?: string;
@@ -160,9 +160,7 @@ export declare const SelectV2Props: {
160
160
  * @description data of the options, the key of `value` and `label` can be customize by `props`
161
161
  */
162
162
  options: {
163
- type: PropType<(Record<string, unknown> | (Record<string, unknown> & {
164
- created?: boolean;
165
- }))[]>;
163
+ type: PropType<import("element-plus/es/components/select-v2/src/select.types.mjs").OptionType[]>;
166
164
  };
167
165
  /**
168
166
  * @description placeholder, the default is 'Please select'
@@ -317,8 +315,8 @@ export declare const SelectV2Props: {
317
315
  export declare const selectV2Emits: {
318
316
  readonly "update:modelValue": (_value: ElSelectorModelValue) => boolean;
319
317
  readonly change: (_value: ElSelectorModelValue) => boolean;
320
- readonly "end-reached": (_direction: unknown) => boolean;
321
- readonly "remove-tag": (_value: unknown) => boolean;
318
+ readonly "end-reached": (_direction: ScrollbarDirection) => boolean;
319
+ readonly "remove-tag": (_value: ElSelectorValue) => boolean;
322
320
  readonly "visible-change": (_visible: boolean) => boolean;
323
321
  readonly focus: (_event: FocusEvent) => boolean;
324
322
  readonly blur: (_event: FocusEvent) => boolean;
@@ -379,17 +377,17 @@ export declare const faSelectV2Props: {
379
377
  defaultSelected: BooleanConstructor;
380
378
  /** @description 下拉框数据 */
381
379
  data: {
382
- type: PropType<ElSelectorOutput<ElSelectorValue>[]>;
380
+ type: PropType<ElSelectorOutput<ElSelectorValue, any>[]>;
383
381
  default: () => ElSelectorOutput[];
384
382
  };
385
383
  /** 分页返回 */
386
384
  pageResult: BooleanConstructor;
387
385
  /** @description 请求api */
388
386
  requestApi: {
389
- type: PropType<((params?: unknown) => Promise<ElSelectorOutput[]>) | ((params?: PagedInput) => Promise<PagedResult<ElSelectorOutput>>)>;
387
+ type: PropType<(params?: string | number | PagedInput) => Promise<ElSelectorOutput[] | PagedResult<ElSelectorOutput>>>;
390
388
  };
391
389
  /** 初始化参数 */
392
- initParam: PropType<unknown>;
390
+ initParam: PropType<string | number | PagedInput>;
393
391
  ariaLabel: StringConstructor;
394
392
  emptyValues: ArrayConstructor;
395
393
  valueOnClear: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown, undefined, boolean>;
@@ -509,9 +507,7 @@ export declare const faSelectV2Props: {
509
507
  * @description data of the options, the key of `value` and `label` can be customize by `props`
510
508
  */
511
509
  options: {
512
- type: PropType<(Record<string, unknown> | (Record<string, unknown> & {
513
- created?: boolean;
514
- }))[]>;
510
+ type: PropType<import("element-plus/es/components/select-v2/src/select.types.mjs").OptionType[]>;
515
511
  };
516
512
  /**
517
513
  * @description placeholder, the default is 'Please select'
@@ -671,9 +667,9 @@ export declare const faSelectV2Emits: {
671
667
  /** @description 数据改变 */
672
668
  dataChangeCallBack: (data: ElSelectorOutput[]) => boolean;
673
669
  /** @description 改变 */
674
- change: (_data: unknown, _value?: ElSelectorModelValue) => boolean;
675
- "end-reached": (_direction: unknown) => boolean;
676
- "remove-tag": (_value: unknown) => boolean;
670
+ change: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue) => boolean;
671
+ "end-reached": (_direction: ScrollbarDirection) => boolean;
672
+ "remove-tag": (_value: ElSelectorValue) => boolean;
677
673
  "visible-change": (_visible: boolean) => boolean;
678
674
  focus: (_event: FocusEvent) => boolean;
679
675
  blur: (_event: FocusEvent) => boolean;
@@ -759,17 +755,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
759
755
  defaultSelected: BooleanConstructor;
760
756
  /** @description 下拉框数据 */
761
757
  data: {
762
- type: PropType<ElSelectorOutput<ElSelectorValue>[]>;
758
+ type: PropType<ElSelectorOutput<ElSelectorValue, any>[]>;
763
759
  default: () => ElSelectorOutput[];
764
760
  };
765
761
  /** 分页返回 */
766
762
  pageResult: BooleanConstructor;
767
763
  /** @description 请求api */
768
764
  requestApi: {
769
- type: PropType<((params?: unknown) => Promise<ElSelectorOutput[]>) | ((params?: PagedInput) => Promise<PagedResult<ElSelectorOutput>>)>;
765
+ type: PropType<(params?: string | number | PagedInput) => Promise<ElSelectorOutput[] | PagedResult<ElSelectorOutput>>>;
770
766
  };
771
767
  /** 初始化参数 */
772
- initParam: PropType<unknown>;
768
+ initParam: PropType<string | number | PagedInput>;
773
769
  ariaLabel: StringConstructor;
774
770
  emptyValues: ArrayConstructor;
775
771
  valueOnClear: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown, undefined, boolean>;
@@ -889,9 +885,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
889
885
  * @description data of the options, the key of `value` and `label` can be customize by `props`
890
886
  */
891
887
  options: {
892
- type: PropType<(Record<string, unknown> | (Record<string, unknown> & {
893
- created?: boolean;
894
- }))[]>;
888
+ type: PropType<import("element-plus/es/components/select-v2/src/select.types.mjs").OptionType[]>;
895
889
  };
896
890
  /**
897
891
  * @description placeholder, the default is 'Please select'
@@ -1066,9 +1060,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1066
1060
  /** @description 数据改变 */
1067
1061
  dataChangeCallBack: (data: ElSelectorOutput[]) => boolean;
1068
1062
  /** @description 改变 */
1069
- change: (_data: unknown, _value?: ElSelectorModelValue) => boolean;
1070
- "end-reached": (_direction: unknown) => boolean;
1071
- "remove-tag": (_value: unknown) => boolean;
1063
+ change: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue) => boolean;
1064
+ "end-reached": (_direction: ScrollbarDirection) => boolean;
1065
+ "remove-tag": (_value: ElSelectorValue) => boolean;
1072
1066
  "visible-change": (_visible: boolean) => boolean;
1073
1067
  focus: (_event: FocusEvent) => boolean;
1074
1068
  blur: (_event: FocusEvent) => boolean;
@@ -1127,17 +1121,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1127
1121
  defaultSelected: BooleanConstructor;
1128
1122
  /** @description 下拉框数据 */
1129
1123
  data: {
1130
- type: PropType<ElSelectorOutput<ElSelectorValue>[]>;
1124
+ type: PropType<ElSelectorOutput<ElSelectorValue, any>[]>;
1131
1125
  default: () => ElSelectorOutput[];
1132
1126
  };
1133
1127
  /** 分页返回 */
1134
1128
  pageResult: BooleanConstructor;
1135
1129
  /** @description 请求api */
1136
1130
  requestApi: {
1137
- type: PropType<((params?: unknown) => Promise<ElSelectorOutput[]>) | ((params?: PagedInput) => Promise<PagedResult<ElSelectorOutput>>)>;
1131
+ type: PropType<(params?: string | number | PagedInput) => Promise<ElSelectorOutput[] | PagedResult<ElSelectorOutput>>>;
1138
1132
  };
1139
1133
  /** 初始化参数 */
1140
- initParam: PropType<unknown>;
1134
+ initParam: PropType<string | number | PagedInput>;
1141
1135
  ariaLabel: StringConstructor;
1142
1136
  emptyValues: ArrayConstructor;
1143
1137
  valueOnClear: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown, undefined, boolean>;
@@ -1257,9 +1251,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1257
1251
  * @description data of the options, the key of `value` and `label` can be customize by `props`
1258
1252
  */
1259
1253
  options: {
1260
- type: PropType<(Record<string, unknown> | (Record<string, unknown> & {
1261
- created?: boolean;
1262
- }))[]>;
1254
+ type: PropType<import("element-plus/es/components/select-v2/src/select.types.mjs").OptionType[]>;
1263
1255
  };
1264
1256
  /**
1265
1257
  * @description placeholder, the default is 'Please select'
@@ -1413,15 +1405,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1413
1405
  onBlur?: ((_event: FocusEvent) => any) | undefined;
1414
1406
  onFocus?: ((_event: FocusEvent) => any) | undefined;
1415
1407
  onClear?: (() => any) | undefined;
1416
- onChange?: ((_data: unknown, _value?: ElSelectorModelValue) => any) | undefined;
1408
+ onChange?: ((_data: ElSelectorOutput<ElSelectorValue, any> | ElSelectorOutput<ElSelectorValue, any>[] | null, _value?: ElSelectorModelValue) => any) | undefined;
1417
1409
  "onUpdate:modelValue"?: ((value: ElSelectorModelValue) => any) | undefined;
1418
- "onEnd-reached"?: ((_direction: unknown) => any) | undefined;
1410
+ "onEnd-reached"?: ((_direction: ScrollbarDirection) => any) | undefined;
1419
1411
  "onVisible-change"?: ((_visible: boolean) => any) | undefined;
1420
1412
  "onUpdate:label"?: ((value: string | string[] | null) => any) | undefined;
1421
- onDataChangeCallBack?: ((data: ElSelectorOutput<ElSelectorValue>[]) => any) | undefined;
1422
- "onRemove-tag"?: ((_value: unknown) => any) | undefined;
1413
+ onDataChangeCallBack?: ((data: ElSelectorOutput<ElSelectorValue, any>[]) => any) | undefined;
1414
+ "onRemove-tag"?: ((_value: ElSelectorValue) => any) | undefined;
1423
1415
  }>, {
1424
- data: ElSelectorOutput<ElSelectorValue>[];
1416
+ data: ElSelectorOutput<ElSelectorValue, any>[];
1425
1417
  props: Props;
1426
1418
  offset: number;
1427
1419
  placement: Placement;
@@ -1 +1 @@
1
- {"version":3,"file":"selectV2.mjs","names":["update:modelValue","end-reached","remove-tag","visible-change","update:label"],"sources":["../../../../src/components/selectV2/src/selectV2.tsx"],"sourcesContent":["import { useVModel } from \"@vueuse/core\";\nimport { computed, defineComponent, onMounted, reactive, ref, watch } from \"vue\";\nimport { ArrowDown, CircleClose } from \"@element-plus/icons-vue\";\nimport { ElSelectV2, tagProps, useAriaProps, useEmptyValuesProps, useGlobalSize, useSizeProp, useTooltipContentProps } from \"element-plus\";\nimport { isArray, isBoolean, isEqual, isNil, isNull, isNumber, isObject, isString } from \"lodash-unified\";\nimport { addCssUnit, definePropType, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport type { ElSelectorModelValue, ElSelectorOutput, ElSelectorValue } from \"../../select/src/select.type\";\nimport type { PagedInput, PagedResult } from \"../../table\";\nimport type { SelectV2Props as ElementPlusSelectV2Props, Options, Placement } from \"element-plus\";\nimport type { Component, PropType, VNode } from \"vue\";\n\n/** 传递给底层 Element Plus 虚拟化选择器的扩展 Props。 */\nexport interface Props {\n\tlabel?: string;\n\tvalue?: string;\n\tdisabled?: string;\n\toptions?: string;\n}\n\n/** FaSelectV2 支持的业务选择器 Props 定义。 */\nexport const SelectV2Props = {\n\t/**\n\t * @description whether creating new items is allowed. To use this, `filterable` must be true\n\t */\n\tallowCreate: Boolean,\n\t/**\n\t * @description autocomplete of select input\n\t */\n\tautocomplete: {\n\t\ttype: definePropType<\"none\" | \"both\" | \"list\" | \"inline\">(String),\n\t\tdefault: \"none\",\n\t},\n\t/**\n\t * @description for non-filterable Select, this prop decides if the option menu pops up when the input is focused\n\t */\n\tautomaticDropdown: Boolean,\n\t/**\n\t * @description whether select can be cleared\n\t */\n\tclearable: Boolean,\n\t/**\n\t * @description custom clear icon\n\t */\n\tclearIcon: {\n\t\ttype: definePropType<string | Component>([String, Object, Function]),\n\t\tdefault: CircleClose,\n\t},\n\t/**\n\t * @description tooltip theme, built-in theme: `dark` / `light`\n\t */\n\teffect: {\n\t\ttype: definePropType<string>(String),\n\t\tdefault: \"light\",\n\t},\n\t/**\n\t * @description whether to collapse tags to a text when multiple selecting\n\t */\n\tcollapseTags: Boolean,\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\t */\n\tcollapseTagsTooltip: Boolean,\n\t/** @description collapse-tags tooltip configuration */\n\ttagTooltip: {\n\t\ttype: definePropType<ElementPlusSelectV2Props[\"tagTooltip\"]>(Object),\n\t\tdefault: (): NonNullable<ElementPlusSelectV2Props[\"tagTooltip\"]> => ({}),\n\t},\n\t/**\n\t * @description The max tags number to be shown. To use this, `collapse-tags` must be true\n\t */\n\tmaxCollapseTags: {\n\t\ttype: Number,\n\t\tdefault: 1,\n\t},\n\t/**\n\t * @description\n\t */\n\tdefaultFirstOption: Boolean,\n\t/**\n\t * @description is disabled\n\t */\n\tdisabled: Boolean,\n\t/**\n\t * @description\n\t */\n\testimatedOptionHeight: {\n\t\ttype: Number,\n\t\tdefault: undefined,\n\t},\n\t/**\n\t * @description is filterable\n\t */\n\tfilterable: Boolean,\n\t/**\n\t * @description\n\t */\n\tfilterMethod: Function as PropType<ElementPlusSelectV2Props[\"filterMethod\"]>,\n\t/**\n\t * @description The height of the dropdown panel, 34px for each item\n\t */\n\theight: {\n\t\ttype: Number,\n\t\tdefault: 274, // same as select dropdown menu\n\t},\n\t/**\n\t * @description The height of the dropdown item\n\t */\n\titemHeight: {\n\t\ttype: Number,\n\t\tdefault: 34,\n\t},\n\t/**\n\t * @description\n\t */\n\tid: String,\n\t/**\n\t * @description whether Select is loading data from server\n\t */\n\tloading: Boolean,\n\t/**\n\t * @description displayed text while loading data from server, default is 'Loading'\n\t */\n\tloadingText: String,\n\t/**\n\t * @description biding value\n\t */\n\tmodelValue: {\n\t\ttype: definePropType<ElSelectorModelValue>([Array, String, Number, Boolean, Object]),\n\t},\n\t/**\n\t * @description is multiple\n\t */\n\tmultiple: Boolean,\n\t/**\n\t * @description maximum number of options user can select when multiple is true. No limit when set to 0\n\t */\n\tmultipleLimit: {\n\t\ttype: Number,\n\t\tdefault: 0,\n\t},\n\t/**\n\t * @description the name attribute of select input\n\t */\n\tname: String,\n\t/**\n\t * @description displayed text when there is no options, you can also use slot empty, the default is 'No Data'\n\t */\n\tnoDataText: String,\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\t */\n\tnoMatchText: String,\n\t/**\n\t * @description function that gets called when the input value changes. Its parameter is the current input value. To use this, `filterable` must be true\n\t */\n\tremoteMethod: Function as PropType<ElementPlusSelectV2Props[\"remoteMethod\"]>,\n\t/**\n\t * @description whether reserve the keyword after select filtered option.\n\t */\n\treserveKeyword: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description data of the options, the key of `value` and `label` can be customize by `props`\n\t */\n\toptions: {\n\t\ttype: definePropType<\n\t\t\t(\n\t\t\t\t| Record<string, unknown>\n\t\t\t\t| (Record<string, unknown> & {\n\t\t\t\t\t\tcreated?: boolean;\n\t\t\t\t })\n\t\t\t)[]\n\t\t>(Array),\n\t\t// required: true,\n\t},\n\t/**\n\t * @description placeholder, the default is 'Please select'\n\t */\n\tplaceholder: {\n\t\ttype: String,\n\t},\n\t/**\n\t * @description whether select dropdown is teleported to the body\n\t */\n\tteleported: useTooltipContentProps.teleported,\n\t/**\n\t * @description when select dropdown is inactive and `persistent` is `false`, select dropdown will be destroyed\n\t */\n\tpersistent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description custom class name for Select's dropdown\n\t */\n\tpopperClass: {\n\t\ttype: String,\n\t\tdefault: \"\",\n\t},\n\t/** @description custom style for Select's dropdown */\n\tpopperStyle: useTooltipContentProps.popperStyle,\n\t/**\n\t * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n\t */\n\tpopperOptions: {\n\t\ttype: definePropType<Partial<Options>>(Object),\n\t\tdefault: (): Partial<Options> => ({}),\n\t},\n\t/**\n\t * @description whether search data from server\n\t */\n\tremote: Boolean,\n\t/** @description debounce delay during remote search, in milliseconds */\n\tdebounce: {\n\t\ttype: Number,\n\t\tdefault: 300,\n\t},\n\t/**\n\t * @description size of component\n\t */\n\tsize: useSizeProp,\n\t/**\n\t * @description configuration options, see the following table\n\t */\n\tprops: {\n\t\ttype: definePropType<Props>(Object),\n\t\tdefault: (): Required<Props> => ({\n\t\t\tlabel: \"label\",\n\t\t\tvalue: \"value\",\n\t\t\tdisabled: \"disabled\",\n\t\t\toptions: \"options\",\n\t\t}),\n\t},\n\t/**\n\t * @description unique identity key name for value, required when value is an object\n\t */\n\tvalueKey: {\n\t\ttype: String,\n\t\tdefault: \"value\",\n\t},\n\t/**\n\t * @description Controls whether the scrollbar is always displayed\n\t */\n\tscrollbarAlwaysOn: Boolean,\n\t/**\n\t * @description whether to trigger form validation\n\t */\n\tvalidateEvent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description offset of the dropdown\n\t */\n\toffset: {\n\t\ttype: Number,\n\t\tdefault: 12,\n\t},\n\t/** @description whether to show the suffix icon during remote search */\n\tremoteShowSuffix: Boolean,\n\t/**\n\t * @description Determines whether the arrow is displayed\n\t */\n\tshowArrow: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description position of dropdown\n\t */\n\tplacement: {\n\t\ttype: definePropType<Placement>(String),\n\t\tdefault: \"bottom-start\",\n\t},\n\t/**\n\t * @description list of possible positions for dropdown\n\t */\n\tfallbackPlacements: {\n\t\ttype: definePropType<Placement[]>(Array),\n\t\tdefault: [\"bottom-start\", \"top-start\", \"right\", \"left\"],\n\t},\n\t/**\n\t * @description tag type\n\t */\n\ttagType: { ...tagProps.type, default: \"info\" },\n\t/**\n\t * @description tag effect\n\t */\n\ttagEffect: { ...tagProps.effect, default: \"light\" },\n\t/**\n\t * @description tabindex for input\n\t */\n\ttabindex: {\n\t\ttype: [String, Number],\n\t\tdefault: 0,\n\t},\n\t/**\n\t * @description which element the select dropdown appends to\n\t */\n\tappendTo: String,\n\t/** @description whether the dropdown width follows the input width, or a fixed width */\n\tfitInputWidth: {\n\t\ttype: [Boolean, Number],\n\t\tdefault: true,\n\t\tvalidator: (value: boolean | number): boolean => isBoolean(value) || isNumber(value),\n\t},\n\t/** @description select suffix icon */\n\tsuffixIcon: {\n\t\ttype: definePropType<string | Component>([String, Object, Function]),\n\t\tdefault: ArrowDown,\n\t},\n\t...useEmptyValuesProps,\n\t...useAriaProps([\"ariaLabel\"]),\n};\n\n/** 底层虚拟化选择器的运行时 Emits 定义。 */\nexport const selectV2Emits = {\n\t\"update:modelValue\": (_value: ElSelectorModelValue): boolean => true,\n\tchange: (_value: ElSelectorModelValue): boolean => true,\n\t\"end-reached\": (_direction: unknown): boolean => true,\n\t\"remove-tag\": (_value: unknown): boolean => true,\n\t\"visible-change\": (_visible: boolean): boolean => true,\n\tfocus: (_event: FocusEvent): boolean => true,\n\tblur: (_event: FocusEvent): boolean => true,\n\tclear: (): boolean => true,\n} as const;\n\n/** FaSelectV2 的运行时 Props 定义。 */\nexport const faSelectV2Props = {\n\t...SelectV2Props,\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/** @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\tdata: {\n\t\ttype: definePropType<ElSelectorOutput[]>(Array),\n\t\tdefault: (): ElSelectorOutput[] => [],\n\t},\n\t/** 分页返回 */\n\tpageResult: Boolean,\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<((params?: unknown) => Promise<ElSelectorOutput[]>) | ((params?: PagedInput) => Promise<PagedResult<ElSelectorOutput>>)>(\n\t\t\tFunction\n\t\t),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<unknown>([String, Number, Object]),\n};\n\n/** FaSelectV2 的运行时 Emits 定义。 */\nexport const faSelectV2Emits = {\n\t...selectV2Emits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: ElSelectorModelValue): boolean =>\n\t\tisString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isArray(value) || isNull(value),\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string | string[] | null): boolean => isString(value) || isArray(value) || isNull(value),\n\t/** @description 数据改变 */\n\tdataChangeCallBack: (data: ElSelectorOutput[]): boolean => isArray(data),\n\t/** @description 改变 */\n\tchange: (_data: unknown, _value?: ElSelectorModelValue): boolean => true,\n};\n\n/** FaSelectV2 的插槽参数。 */\nexport interface FaSelectV2Slots extends Record<string, unknown> {\n\t/** @description FaSelectOption 默认内容插槽 */\n\tdefault: { item: ElSelectorOutput; index: number; disabled: boolean };\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: \"FaSelectV2\",\n\tprops: faSelectV2Props,\n\temits: faSelectV2Emits,\n\tslots: makeSlots<FaSelectV2Slots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst selectedLabel = useVModel(props, \"label\", emit, { passive: true });\n\t\tconst _globalSize = useGlobalSize();\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: props.data?.length > 0 ? false : true,\n\t\t\t/** 下次刷新 */\n\t\t\tnextRefresh: false,\n\t\t});\n\n\t\tconst selectV2Ref = ref<InstanceType<typeof ElSelectV2>>();\n\t\tlet requestVersion = 0;\n\n\t\tconst loadData = async (): Promise<void> => {\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\t// 判断是否为分页返回\n\t\t\t\t\tif (props.pageResult) {\n\t\t\t\t\t\tstate.selectorData = (resData as PagedResult<ElSelectorOutput>).rows ?? [];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate.selectorData = resData as ElSelectorOutput[];\n\t\t\t\t\t}\n\t\t\t\t\temit(\"dataChangeCallBack\", 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 = props.data ?? [];\n\t\t\t}\n\t\t};\n\n\t\tconst handleChange = (value?: ElSelectorModelValue): void => {\n\t\t\t// 判断是否为多选\n\t\t\tif (props.multiple) {\n\t\t\t\t// value 必然是数组\n\t\t\t\tconst valueArr = Array.isArray(value) ? value : [];\n\t\t\t\tif (valueArr?.length === 0) {\n\t\t\t\t\tstate.value = null;\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\temit(\"update:modelValue\", null);\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 = state.selectorData.filter((item) => item.value !== undefined && valueArr.includes(item.value));\n\t\t\t\tstate.value = value;\n\t\t\t\tselectedLabel.value = dataList.map((item) => item.label ?? \"\");\n\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\temit(\"change\", dataList, value);\n\t\t\t} else {\n\t\t\t\t// value 必然不是数组\n\t\t\t\tif (isNil(value)) {\n\t\t\t\t\tstate.value = null;\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\temit(\"update:modelValue\", null);\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 data = state.selectorData.find((f) => f.value === value);\n\t\t\t\tstate.value = value;\n\t\t\t\tselectedLabel.value = data?.label ?? null;\n\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\temit(\"change\", data ?? null, value);\n\t\t\t}\n\t\t};\n\n\t\tconst handleClear = (): void => {\n\t\t\tstate.value = null;\n\t\t\tselectedLabel.value = null;\n\t\t\temit(\"update:modelValue\", null);\n\t\t\temit(\"clear\");\n\t\t};\n\n\t\tconst handleVisibleChange = async (visible: boolean): Promise<void> => {\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\t!props.defaultSelected && props.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\temit(\"visible-change\", visible);\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 && !isNil(newValue)) {\n\t\t\t\t\tconst hasLabel = !isNil(props.label);\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:FaSelectV2]\", \"当启用 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 && !isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectV2]\", \"当启用 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:FaSelectV2]\", \"当禁用 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 && isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectV2]\", \"当禁用 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\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\thandleChange(props.multiple ? [firstItem.value] : firstItem.value);\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\twatch(\n\t\t\t\t() => props.initParam,\n\t\t\t\t(newValue, oldValue) => {\n\t\t\t\t\tif (!isEqual(newValue, oldValue)) {\n\t\t\t\t\t\tstate.nextRefresh = true;\n\t\t\t\t\t\tif (!isNil(state.value)) {\n\t\t\t\t\t\t\thandleChange();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t\twatch(\n\t\t\t\t() => props.data,\n\t\t\t\t() => {\n\t\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\t\treturn loadData();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ deep: true }\n\t\t\t);\n\t\t});\n\n\t\tconst elSelectV2Props = useProps(props, SelectV2Props, [\"modelValue\", \"popperClass\", \"loading\", \"options\", \"itemHeight\"]);\n\t\tconst elSelectV2Emits = useEmits(faSelectV2Emits, emit, [\"update:modelValue\", \"change\", \"clear\", \"visible-change\"]);\n\t\tconst elPopperClass = computed(() => {\n\t\t\tlet localClass = `fa-select-v2-dropdown ${props.popperClass}`;\n\t\t\tif (props.moreDetail) {\n\t\t\t\tlocalClass += ` fa-select-v2-dropdown__more-detail fa-select-v2-dropdown__more-detail-${_globalSize.value}`;\n\t\t\t}\n\t\t\treturn localClass;\n\t\t});\n\n\t\tuseRender(() => (\n\t\t\t<ElSelectV2\n\t\t\t\t{...elSelectV2Props.value}\n\t\t\t\t{...elSelectV2Emits.value}\n\t\t\t\tref={selectV2Ref}\n\t\t\t\tclass=\"fa-select-v2\"\n\t\t\t\tpopperClass={elPopperClass.value}\n\t\t\t\tstyle={{ width: addCssUnit(props.width) }}\n\t\t\t\tvModel={state.value}\n\t\t\t\tloading={state.loading}\n\t\t\t\toptions={state.selectorData}\n\t\t\t\titemHeight={props.itemHeight + (_globalSize.value === \"small\" ? 0 : 8)}\n\t\t\t\tonChange={handleChange}\n\t\t\t\tonClear={handleClear}\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: ({ item, index, disabled }: { item: ElSelectorOutput; index: number; disabled: boolean }): VNode[] =>\n\t\t\t\t\t\t\tslots.default?.({ item, index, disabled }) ?? [],\n\t\t\t\t\t}),\n\t\t\t\t\t...(slots.header && { header: (): VNode[] => slots.header?.() ?? [] }),\n\t\t\t\t\t...(slots.footer && { footer: (): VNode[] => slots.footer?.() ?? [] }),\n\t\t\t\t\t...(slots.prefix && { prefix: (): VNode[] => slots.prefix?.() ?? [] }),\n\t\t\t\t\t...(slots.empty && { empty: (): VNode[] => slots.empty?.() ?? [] }),\n\t\t\t\t\t...(slots.tag && { tag: (): VNode[] => slots.tag?.() ?? [] }),\n\t\t\t\t\t...(slots.loading && { loading: (): VNode[] => 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 }): VNode[] =>\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</ElSelectV2>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 使选择器的输入框获取焦点 */\n\t\t\tfocus: computed(() => selectV2Ref.value?.focus),\n\t\t\t/** @description 使选择器的输入框失去焦点,并隐藏下拉框 */\n\t\t\tblur: computed(() => selectV2Ref.value?.blur),\n\t\t\t/** @description 获取当前选中的标签 */\n\t\t\tselectedLabel: computed(() => selectV2Ref.value?.selectedLabel),\n\t\t\t/** @description 滚动到指定选项索引。 */\n\t\t\tscrollTo: computed(() => selectV2Ref.value?.scrollTo),\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>) => handleChange(value),\n\t\t\t/** @description 清除选择 */\n\t\t\tclearSelection: () => handleChange(null),\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;AAoBA,MAAa,gBAAgB;;;;CAI5B,aAAa;;;;CAIb,cAAc;EACb,MAAM,eAAoD,MAAM;EAChE,SAAS;CACV;;;;CAIA,mBAAmB;;;;CAInB,WAAW;;;;CAIX,WAAW;EACV,MAAM,eAAmC;GAAC;GAAQ;GAAQ;EAAQ,CAAC;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CACF;AACD,CAAC"}
1
+ {"version":3,"file":"selectV2.mjs","names":["update:modelValue","end-reached","remove-tag","visible-change","update:label"],"sources":["../../../../src/components/selectV2/src/selectV2.tsx"],"sourcesContent":["import { useVModel } from \"@vueuse/core\";\nimport { computed, defineComponent, onMounted, reactive, ref, watch } from \"vue\";\nimport { ArrowDown, CircleClose } from \"@element-plus/icons-vue\";\nimport { ElSelectV2, tagProps, useAriaProps, useEmptyValuesProps, useGlobalSize, useSizeProp, useTooltipContentProps } from \"element-plus\";\nimport { isArray, isBoolean, isEqual, isNil, isNull, isNumber, isObject, isString } from \"lodash-unified\";\nimport { addCssUnit, definePropType, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport type { SelectV2Props as ElementPlusSelectV2Props, Options, Placement, ScrollbarDirection } from \"element-plus\";\nimport type { Component, PropType, VNode } from \"vue\";\nimport type { ElSelectorModelValue, ElSelectorOutput, ElSelectorValue } from \"../../select/src/select.type\";\nimport type { PagedInput, PagedResult } from \"../../table\";\n\n/** 传递给底层 Element Plus 虚拟化选择器的扩展 Props。 */\nexport interface Props {\n\tlabel?: string;\n\tvalue?: string;\n\tdisabled?: string;\n\toptions?: string;\n}\n\n/** FaSelectV2 支持的业务选择器 Props 定义。 */\nexport const SelectV2Props = {\n\t/**\n\t * @description whether creating new items is allowed. To use this, `filterable` must be true\n\t */\n\tallowCreate: Boolean,\n\t/**\n\t * @description autocomplete of select input\n\t */\n\tautocomplete: {\n\t\ttype: definePropType<\"none\" | \"both\" | \"list\" | \"inline\">(String),\n\t\tdefault: \"none\",\n\t},\n\t/**\n\t * @description for non-filterable Select, this prop decides if the option menu pops up when the input is focused\n\t */\n\tautomaticDropdown: Boolean,\n\t/**\n\t * @description whether select can be cleared\n\t */\n\tclearable: Boolean,\n\t/**\n\t * @description custom clear icon\n\t */\n\tclearIcon: {\n\t\ttype: definePropType<string | Component>([String, Object, Function]),\n\t\tdefault: CircleClose,\n\t},\n\t/**\n\t * @description tooltip theme, built-in theme: `dark` / `light`\n\t */\n\teffect: {\n\t\ttype: definePropType<string>(String),\n\t\tdefault: \"light\",\n\t},\n\t/**\n\t * @description whether to collapse tags to a text when multiple selecting\n\t */\n\tcollapseTags: Boolean,\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\t */\n\tcollapseTagsTooltip: Boolean,\n\t/** @description collapse-tags tooltip configuration */\n\ttagTooltip: {\n\t\ttype: definePropType<ElementPlusSelectV2Props[\"tagTooltip\"]>(Object),\n\t\tdefault: (): NonNullable<ElementPlusSelectV2Props[\"tagTooltip\"]> => ({}),\n\t},\n\t/**\n\t * @description The max tags number to be shown. To use this, `collapse-tags` must be true\n\t */\n\tmaxCollapseTags: {\n\t\ttype: Number,\n\t\tdefault: 1,\n\t},\n\t/**\n\t * @description\n\t */\n\tdefaultFirstOption: Boolean,\n\t/**\n\t * @description is disabled\n\t */\n\tdisabled: Boolean,\n\t/**\n\t * @description\n\t */\n\testimatedOptionHeight: {\n\t\ttype: Number,\n\t\tdefault: undefined,\n\t},\n\t/**\n\t * @description is filterable\n\t */\n\tfilterable: Boolean,\n\t/**\n\t * @description\n\t */\n\tfilterMethod: Function as PropType<ElementPlusSelectV2Props[\"filterMethod\"]>,\n\t/**\n\t * @description The height of the dropdown panel, 34px for each item\n\t */\n\theight: {\n\t\ttype: Number,\n\t\tdefault: 274, // same as select dropdown menu\n\t},\n\t/**\n\t * @description The height of the dropdown item\n\t */\n\titemHeight: {\n\t\ttype: Number,\n\t\tdefault: 34,\n\t},\n\t/**\n\t * @description\n\t */\n\tid: String,\n\t/**\n\t * @description whether Select is loading data from server\n\t */\n\tloading: Boolean,\n\t/**\n\t * @description displayed text while loading data from server, default is 'Loading'\n\t */\n\tloadingText: String,\n\t/**\n\t * @description biding value\n\t */\n\tmodelValue: {\n\t\ttype: definePropType<ElSelectorModelValue>([Array, String, Number, Boolean, Object]),\n\t},\n\t/**\n\t * @description is multiple\n\t */\n\tmultiple: Boolean,\n\t/**\n\t * @description maximum number of options user can select when multiple is true. No limit when set to 0\n\t */\n\tmultipleLimit: {\n\t\ttype: Number,\n\t\tdefault: 0,\n\t},\n\t/**\n\t * @description the name attribute of select input\n\t */\n\tname: String,\n\t/**\n\t * @description displayed text when there is no options, you can also use slot empty, the default is 'No Data'\n\t */\n\tnoDataText: String,\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\t */\n\tnoMatchText: String,\n\t/**\n\t * @description function that gets called when the input value changes. Its parameter is the current input value. To use this, `filterable` must be true\n\t */\n\tremoteMethod: Function as PropType<ElementPlusSelectV2Props[\"remoteMethod\"]>,\n\t/**\n\t * @description whether reserve the keyword after select filtered option.\n\t */\n\treserveKeyword: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description data of the options, the key of `value` and `label` can be customize by `props`\n\t */\n\toptions: {\n\t\ttype: definePropType<ElementPlusSelectV2Props[\"options\"]>(Array),\n\t\t// required: true,\n\t},\n\t/**\n\t * @description placeholder, the default is 'Please select'\n\t */\n\tplaceholder: {\n\t\ttype: String,\n\t},\n\t/**\n\t * @description whether select dropdown is teleported to the body\n\t */\n\tteleported: useTooltipContentProps.teleported,\n\t/**\n\t * @description when select dropdown is inactive and `persistent` is `false`, select dropdown will be destroyed\n\t */\n\tpersistent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description custom class name for Select's dropdown\n\t */\n\tpopperClass: {\n\t\ttype: String,\n\t\tdefault: \"\",\n\t},\n\t/** @description custom style for Select's dropdown */\n\tpopperStyle: useTooltipContentProps.popperStyle,\n\t/**\n\t * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n\t */\n\tpopperOptions: {\n\t\ttype: definePropType<Partial<Options>>(Object),\n\t\tdefault: (): Partial<Options> => ({}),\n\t},\n\t/**\n\t * @description whether search data from server\n\t */\n\tremote: Boolean,\n\t/** @description debounce delay during remote search, in milliseconds */\n\tdebounce: {\n\t\ttype: Number,\n\t\tdefault: 300,\n\t},\n\t/**\n\t * @description size of component\n\t */\n\tsize: useSizeProp,\n\t/**\n\t * @description configuration options, see the following table\n\t */\n\tprops: {\n\t\ttype: definePropType<Props>(Object),\n\t\tdefault: (): Required<Props> => ({\n\t\t\tlabel: \"label\",\n\t\t\tvalue: \"value\",\n\t\t\tdisabled: \"disabled\",\n\t\t\toptions: \"options\",\n\t\t}),\n\t},\n\t/**\n\t * @description unique identity key name for value, required when value is an object\n\t */\n\tvalueKey: {\n\t\ttype: String,\n\t\tdefault: \"value\",\n\t},\n\t/**\n\t * @description Controls whether the scrollbar is always displayed\n\t */\n\tscrollbarAlwaysOn: Boolean,\n\t/**\n\t * @description whether to trigger form validation\n\t */\n\tvalidateEvent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description offset of the dropdown\n\t */\n\toffset: {\n\t\ttype: Number,\n\t\tdefault: 12,\n\t},\n\t/** @description whether to show the suffix icon during remote search */\n\tremoteShowSuffix: Boolean,\n\t/**\n\t * @description Determines whether the arrow is displayed\n\t */\n\tshowArrow: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description position of dropdown\n\t */\n\tplacement: {\n\t\ttype: definePropType<Placement>(String),\n\t\tdefault: \"bottom-start\",\n\t},\n\t/**\n\t * @description list of possible positions for dropdown\n\t */\n\tfallbackPlacements: {\n\t\ttype: definePropType<Placement[]>(Array),\n\t\tdefault: [\"bottom-start\", \"top-start\", \"right\", \"left\"],\n\t},\n\t/**\n\t * @description tag type\n\t */\n\ttagType: { ...tagProps.type, default: \"info\" },\n\t/**\n\t * @description tag effect\n\t */\n\ttagEffect: { ...tagProps.effect, default: \"light\" },\n\t/**\n\t * @description tabindex for input\n\t */\n\ttabindex: {\n\t\ttype: [String, Number],\n\t\tdefault: 0,\n\t},\n\t/**\n\t * @description which element the select dropdown appends to\n\t */\n\tappendTo: String,\n\t/** @description whether the dropdown width follows the input width, or a fixed width */\n\tfitInputWidth: {\n\t\ttype: [Boolean, Number],\n\t\tdefault: true,\n\t\tvalidator: (value: boolean | number): boolean => isBoolean(value) || isNumber(value),\n\t},\n\t/** @description select suffix icon */\n\tsuffixIcon: {\n\t\ttype: definePropType<string | Component>([String, Object, Function]),\n\t\tdefault: ArrowDown,\n\t},\n\t...useEmptyValuesProps,\n\t...useAriaProps([\"ariaLabel\"]),\n};\n\n/** 底层虚拟化选择器的运行时 Emits 定义。 */\nexport const selectV2Emits = {\n\t\"update:modelValue\": (_value: ElSelectorModelValue): boolean => true,\n\tchange: (_value: ElSelectorModelValue): boolean => true,\n\t\"end-reached\": (_direction: ScrollbarDirection): boolean => true,\n\t\"remove-tag\": (_value: ElSelectorValue): boolean => true,\n\t\"visible-change\": (_visible: boolean): boolean => true,\n\tfocus: (_event: FocusEvent): boolean => true,\n\tblur: (_event: FocusEvent): boolean => true,\n\tclear: (): boolean => true,\n} as const;\n\n/** FaSelectV2 的运行时 Props 定义。 */\nexport const faSelectV2Props = {\n\t...SelectV2Props,\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/** @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\tdata: {\n\t\ttype: definePropType<ElSelectorOutput[]>(Array),\n\t\tdefault: (): ElSelectorOutput[] => [],\n\t},\n\t/** 分页返回 */\n\tpageResult: Boolean,\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: string | number | PagedInput) => Promise<ElSelectorOutput[] | PagedResult<ElSelectorOutput>>>(Function),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | PagedInput>([String, Number, Object]),\n};\n\n/** FaSelectV2 的运行时 Emits 定义。 */\nexport const faSelectV2Emits = {\n\t...selectV2Emits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: ElSelectorModelValue): boolean =>\n\t\tisString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isArray(value) || isNull(value),\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string | string[] | null): boolean => isString(value) || isArray(value) || isNull(value),\n\t/** @description 数据改变 */\n\tdataChangeCallBack: (data: ElSelectorOutput[]): boolean => isArray(data),\n\t/** @description 改变 */\n\tchange: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue): boolean => true,\n};\n\n/** FaSelectV2 的插槽参数。 */\nexport interface FaSelectV2Slots extends Record<string, unknown> {\n\t/** @description FaSelectOption 默认内容插槽 */\n\tdefault: { item: ElSelectorOutput; index: number; disabled: boolean };\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: \"FaSelectV2\",\n\tprops: faSelectV2Props,\n\temits: faSelectV2Emits,\n\tslots: makeSlots<FaSelectV2Slots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst selectedLabel = useVModel(props, \"label\", emit, { passive: true });\n\t\tconst _globalSize = useGlobalSize();\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: props.data?.length > 0 ? false : true,\n\t\t\t/** 下次刷新 */\n\t\t\tnextRefresh: false,\n\t\t});\n\n\t\tconst selectV2Ref = ref<InstanceType<typeof ElSelectV2>>();\n\t\tlet requestVersion = 0;\n\n\t\tconst loadData = async (): Promise<void> => {\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\t// 判断是否为分页返回\n\t\t\t\t\tif (props.pageResult) {\n\t\t\t\t\t\tstate.selectorData = (resData as PagedResult<ElSelectorOutput>).rows ?? [];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate.selectorData = resData as ElSelectorOutput[];\n\t\t\t\t\t}\n\t\t\t\t\temit(\"dataChangeCallBack\", 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 = props.data ?? [];\n\t\t\t}\n\t\t};\n\n\t\tconst handleChange = (value?: ElSelectorModelValue): void => {\n\t\t\t// 判断是否为多选\n\t\t\tif (props.multiple) {\n\t\t\t\t// value 必然是数组\n\t\t\t\tconst valueArr = Array.isArray(value) ? value : [];\n\t\t\t\tif (valueArr?.length === 0) {\n\t\t\t\t\tstate.value = null;\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\temit(\"update:modelValue\", null);\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 = state.selectorData.filter((item) => item.value !== undefined && valueArr.includes(item.value));\n\t\t\t\tstate.value = value;\n\t\t\t\tselectedLabel.value = dataList.map((item) => item.label ?? \"\");\n\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\temit(\"change\", dataList, value);\n\t\t\t} else {\n\t\t\t\t// value 必然不是数组\n\t\t\t\tif (isNil(value)) {\n\t\t\t\t\tstate.value = null;\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\temit(\"update:modelValue\", null);\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 data = state.selectorData.find((f) => f.value === value);\n\t\t\t\tstate.value = value;\n\t\t\t\tselectedLabel.value = data?.label ?? null;\n\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\temit(\"change\", data ?? null, value);\n\t\t\t}\n\t\t};\n\n\t\tconst handleClear = (): void => {\n\t\t\tstate.value = null;\n\t\t\tselectedLabel.value = null;\n\t\t\temit(\"update:modelValue\", null);\n\t\t\temit(\"clear\");\n\t\t};\n\n\t\tconst handleVisibleChange = async (visible: boolean): Promise<void> => {\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\t!props.defaultSelected && props.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\temit(\"visible-change\", visible);\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 && !isNil(newValue)) {\n\t\t\t\t\tconst hasLabel = !isNil(props.label);\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:FaSelectV2]\", \"当启用 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 && !isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectV2]\", \"当启用 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:FaSelectV2]\", \"当禁用 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 && isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectV2]\", \"当禁用 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\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\thandleChange(props.multiple ? [firstItem.value] : firstItem.value);\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\twatch(\n\t\t\t\t() => props.initParam,\n\t\t\t\t(newValue, oldValue) => {\n\t\t\t\t\tif (!isEqual(newValue, oldValue)) {\n\t\t\t\t\t\tstate.nextRefresh = true;\n\t\t\t\t\t\tif (!isNil(state.value)) {\n\t\t\t\t\t\t\thandleChange();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t\twatch(\n\t\t\t\t() => props.data,\n\t\t\t\t() => {\n\t\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\t\treturn loadData();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ deep: true }\n\t\t\t);\n\t\t});\n\n\t\tconst elSelectV2Props = useProps(props, SelectV2Props, [\"modelValue\", \"popperClass\", \"loading\", \"options\", \"itemHeight\"]);\n\t\tconst elSelectV2Emits = useEmits(faSelectV2Emits, emit, [\"update:modelValue\", \"change\", \"clear\", \"visible-change\"]);\n\t\tconst elPopperClass = computed(() => {\n\t\t\tlet localClass = `fa-select-v2-dropdown ${props.popperClass}`;\n\t\t\tif (props.moreDetail) {\n\t\t\t\tlocalClass += ` fa-select-v2-dropdown__more-detail fa-select-v2-dropdown__more-detail-${_globalSize.value}`;\n\t\t\t}\n\t\t\treturn localClass;\n\t\t});\n\n\t\tuseRender(() => (\n\t\t\t<ElSelectV2\n\t\t\t\t{...elSelectV2Props.value}\n\t\t\t\t{...elSelectV2Emits.value}\n\t\t\t\tref={selectV2Ref}\n\t\t\t\tclass=\"fa-select-v2\"\n\t\t\t\tpopperClass={elPopperClass.value}\n\t\t\t\tstyle={{ width: addCssUnit(props.width) }}\n\t\t\t\tvModel={state.value}\n\t\t\t\tloading={state.loading}\n\t\t\t\toptions={state.selectorData}\n\t\t\t\titemHeight={props.itemHeight + (_globalSize.value === \"small\" ? 0 : 8)}\n\t\t\t\tonChange={handleChange}\n\t\t\t\tonClear={handleClear}\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: ({ item, index, disabled }: { item: ElSelectorOutput; index: number; disabled: boolean }): VNode[] =>\n\t\t\t\t\t\t\tslots.default?.({ item, index, disabled }) ?? [],\n\t\t\t\t\t}),\n\t\t\t\t\t...(slots.header && { header: (): VNode[] => slots.header?.() ?? [] }),\n\t\t\t\t\t...(slots.footer && { footer: (): VNode[] => slots.footer?.() ?? [] }),\n\t\t\t\t\t...(slots.prefix && { prefix: (): VNode[] => slots.prefix?.() ?? [] }),\n\t\t\t\t\t...(slots.empty && { empty: (): VNode[] => slots.empty?.() ?? [] }),\n\t\t\t\t\t...(slots.tag && { tag: (): VNode[] => slots.tag?.() ?? [] }),\n\t\t\t\t\t...(slots.loading && { loading: (): VNode[] => 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 }): VNode[] =>\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</ElSelectV2>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 使选择器的输入框获取焦点 */\n\t\t\tfocus: computed(() => selectV2Ref.value?.focus),\n\t\t\t/** @description 使选择器的输入框失去焦点,并隐藏下拉框 */\n\t\t\tblur: computed(() => selectV2Ref.value?.blur),\n\t\t\t/** @description 获取当前选中的标签 */\n\t\t\tselectedLabel: computed(() => selectV2Ref.value?.selectedLabel),\n\t\t\t/** @description 滚动到指定选项索引。 */\n\t\t\tscrollTo: computed(() => selectV2Ref.value?.scrollTo),\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>) => handleChange(value),\n\t\t\t/** @description 清除选择 */\n\t\t\tclearSelection: () => handleChange(null),\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;AAoBA,MAAa,gBAAgB;;;;CAI5B,aAAa;;;;CAIb,cAAc;EACb,MAAM,eAAoD,MAAM;EAChE,SAAS;CACV;;;;CAIA,mBAAmB;;;;CAInB,WAAW;;;;CAIX,WAAW;EACV,MAAM,eAAmC;GAAC;GAAQ;GAAQ;EAAQ,CAAC;EACnE,SAAS;CACV;;;;CAIA,QAAQ;EACP,MAAM,eAAuB,MAAM;EACnC,SAAS;CACV;;;;CAIA,cAAc;;;;CAId,qBAAqB;;CAErB,YAAY;EACX,MAAM,eAAuD,MAAM;EACnE,gBAAqE,CAAC;CACvE;;;;CAIA,iBAAiB;EAChB,MAAM;EACN,SAAS;CACV;;;;CAIA,oBAAoB;;;;CAIpB,UAAU;;;;CAIV,uBAAuB;EACtB,MAAM;EACN,SAAS,KAAA;CACV;;;;CAIA,YAAY;;;;CAIZ,cAAc;;;;CAId,QAAQ;EACP,MAAM;EACN,SAAS;CACV;;;;CAIA,YAAY;EACX,MAAM;EACN,SAAS;CACV;;;;CAIA,IAAI;;;;CAIJ,SAAS;;;;CAIT,aAAa;;;;CAIb,YAAY,EACX,MAAM,eAAqC;EAAC;EAAO;EAAQ;EAAQ;EAAS;CAAM,CA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GACpE,GAAI,MAAM,UAAU,EAAE,cAAuB,MAAM,SAAS,KAAK,CAAA,EAAG;GACpE,GAAI,MAAM,SAAS,EAAE,aAAsB,MAAM,QAAQ,KAAK,CAAA,EAAG;GACjE,GAAI,MAAM,OAAO,EAAE,WAAoB,MAAM,MAAM,KAAK,CAAA,EAAG;GAC3D,GAAI,MAAM,WAAW,EAAE,eAAwB,MAAM,UAAU,KAAK,CAAA,EAAG;GACvE,GAAI,MAAM,SAAS,EAClB,QAAQ,EAAE,OAAO,YAChB,MAAM,QAAQ;IAAE;IAAO;GAAM,CAAC,KAAK,CAAA,EACrC;EAAE,CAAA,CAGJ;EAED,OAAO,UAAU,QAAQ;;GAExB,OAAO,eAAe,YAAY,OAAO,KAAK;;GAE9C,MAAM,eAAe,YAAY,OAAO,IAAI;;GAE5C,eAAe,eAAe,YAAY,OAAO,aAAa;;GAE9D,UAAU,eAAe,YAAY,OAAO,QAAQ;;GAEpD,SAAS,eAAe,MAAM,OAAO;;GAErC,SAAS;;GAET,eAAe,UAA2D,aAAa,KAAK;;GAE5F,sBAAsB,aAAa,IAAI;EACxC,CAAC;CACF;AACD,CAAC"}
@@ -4,8 +4,8 @@ import TableColumnsSettingDialog from "./src/tableColumnSettingDialog";
4
4
  import TablePagination from "./src/tablePagination";
5
5
  import TableSearchForm from "./src/tableSearchForm";
6
6
  import TableSearchFormItem from "./src/tableSearchFormItem";
7
- import type { TSXWithInstall } from "../../utils";
8
7
  import type { ExtractPropTypes } from "vue";
8
+ import type { TSXWithInstall } from "../../utils";
9
9
  /** 集成查询、分页、列配置和枚举映射的业务表格组件。 */
10
10
  export declare const FaTable: TSXWithInstall<typeof Table> & {
11
11
  TableColumn: typeof TableColumn;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["Table","TableColumn"],"sources":["../../../src/components/table/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from \"../../utils\";\nimport Table, { type FaTableSlots, faTableEmits, faTableProps, tableProps } from \"./src/table\";\nimport TableColumn, { tableColumnProps } from \"./src/tableColumn\";\nimport TableColumnsSettingDialog from \"./src/tableColumnSettingDialog\";\nimport TablePagination from \"./src/tablePagination\";\nimport TableSearchForm from \"./src/tableSearchForm\";\nimport TableSearchFormItem from \"./src/tableSearchFormItem\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { ExtractPropTypes } from \"vue\";\n\n/** 集成查询、分页、列配置和枚举映射的业务表格组件。 */\nexport const FaTable: TSXWithInstall<typeof Table> & {\n\tTableColumn: typeof TableColumn;\n\tTableColumnsSettingDialog: typeof TableColumnsSettingDialog;\n\tTablePagination: typeof TablePagination;\n\tTableSearchForm: typeof TableSearchForm;\n\tTableSearchFormItem: typeof TableSearchFormItem;\n} = withInstall(Table, {\n\tTableColumn,\n\tTableColumnsSettingDialog,\n\tTablePagination,\n\tTableSearchForm,\n\tTableSearchFormItem,\n});\nexport default FaTable;\n\n/** 可独立注册的 FaTable 列组件。 */\nexport const FaTableColumn: TSXWithInstall<typeof TableColumn> = withNoopInstall(TableColumn);\n\nexport * from \"./src/page.type\";\nexport * from \"./src/table.state\";\nexport * from \"./src/table.type\";\n\nexport { faTableEmits, faTableProps, tableColumnProps, tableProps };\nexport type { FaTableSlots };\nexport type { FaTableColumnSlots, FaTableColumnSlotsResult } from \"./src/tableColumn\";\n\n/** FaTable 暴露的组件实例类型。 */\nexport type FaTableInstance = InstanceType<typeof Table>;\n\n/** FaTable 的完整 Props 类型。 */\nexport type FaTableProps = ExtractPropTypes<typeof faTableProps>;\n\n/** FaTable 的 Emits 类型。 */\nexport type FaTableEmits = typeof faTableEmits;\n\n/** FaTableColumn 暴露的组件实例类型。 */\nexport type FaTableColumnInstance = InstanceType<typeof TableColumn>;\n\nexport * from \"./utils/table\";\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,UAMT,YAAYA,eAAO;CACtB,aAAA;CACA,2BAAA;CACA,iBAAA;CACA,iBAAA;CACA,qBAAA;AACD,CAAC;;AAID,MAAa,gBAAoD,gBAAgBC,mBAAW"}
1
+ {"version":3,"file":"index.mjs","names":["Table","TableColumn"],"sources":["../../../src/components/table/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from \"../../utils\";\nimport Table, { type FaTableSlots, faTableEmits, faTableProps, tableProps } from \"./src/table\";\nimport TableColumn, { tableColumnProps } from \"./src/tableColumn\";\nimport TableColumnsSettingDialog from \"./src/tableColumnSettingDialog\";\nimport TablePagination from \"./src/tablePagination\";\nimport TableSearchForm from \"./src/tableSearchForm\";\nimport TableSearchFormItem from \"./src/tableSearchFormItem\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 集成查询、分页、列配置和枚举映射的业务表格组件。 */\nexport const FaTable: TSXWithInstall<typeof Table> & {\n\tTableColumn: typeof TableColumn;\n\tTableColumnsSettingDialog: typeof TableColumnsSettingDialog;\n\tTablePagination: typeof TablePagination;\n\tTableSearchForm: typeof TableSearchForm;\n\tTableSearchFormItem: typeof TableSearchFormItem;\n} = withInstall(Table, {\n\tTableColumn,\n\tTableColumnsSettingDialog,\n\tTablePagination,\n\tTableSearchForm,\n\tTableSearchFormItem,\n});\nexport default FaTable;\n\n/** 可独立注册的 FaTable 列组件。 */\nexport const FaTableColumn: TSXWithInstall<typeof TableColumn> = withNoopInstall(TableColumn);\n\nexport * from \"./src/page.type\";\nexport * from \"./src/table.state\";\nexport * from \"./src/table.type\";\n\nexport { faTableEmits, faTableProps, tableColumnProps, tableProps };\nexport type { FaTableSlots };\nexport type { FaTableColumnSlots, FaTableColumnSlotsResult } from \"./src/tableColumn\";\n\n/** FaTable 暴露的组件实例类型。 */\nexport type FaTableInstance = InstanceType<typeof Table>;\n\n/** FaTable 的完整 Props 类型。 */\nexport type FaTableProps = ExtractPropTypes<typeof faTableProps>;\n\n/** FaTable 的 Emits 类型。 */\nexport type FaTableEmits = typeof faTableEmits;\n\n/** FaTableColumn 暴露的组件实例类型。 */\nexport type FaTableColumnInstance = InstanceType<typeof TableColumn>;\n\nexport * from \"./utils/table\";\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,UAMT,YAAYA,eAAO;CACtB,aAAA;CACA,2BAAA;CACA,iBAAA;CACA,iBAAA;CACA,qBAAA;AACD,CAAC;;AAID,MAAa,gBAAoD,gBAAgBC,mBAAW"}
@@ -1,5 +1,5 @@
1
1
  /** FaTable 统一分页返回结果。 */
2
- export interface PagedResult<Output = Record<string, unknown>> {
2
+ export interface PagedResult<Output = Record<string, any>> {
3
3
  /**
4
4
  * 当前页
5
5
  */
@@ -142,4 +142,6 @@ export interface PagedInput {
142
142
  * @default true
143
143
  */
144
144
  enablePaged?: boolean;
145
+ /** 业务接口附加的查询字段。 */
146
+ [key: string]: any;
145
147
  }
@@ -1 +1 @@
1
- {"version":3,"file":"page.type.mjs","names":[],"sources":["../../../../src/components/table/src/page.type.ts"],"sourcesContent":["/** FaTable 统一分页返回结果。 */\nexport interface PagedResult<Output = Record<string, unknown>> {\n\t/**\n\t * 当前页\n\t */\n\tpageIndex?: number;\n\t/**\n\t * 当前页码\n\t */\n\tpageSize?: number;\n\t/**\n\t * 总页数\n\t */\n\ttotalPage?: number;\n\t/**\n\t * 总条数\n\t */\n\ttotalRows?: number;\n\t/**\n\t * Data\n\t */\n\trows?: Output[];\n\t/**\n\t * 是否有上一页\n\t */\n\thasPrevPages?: boolean;\n\t/**\n\t * 是否有下一页\n\t */\n\thasNextPages?: boolean;\n\t/**\n\t * 程序集名称\n\t */\n\tassemblyName?: string;\n\t/**\n\t * 完全限定名称\n\t */\n\tfullName?: string;\n}\n\n/** FaTable 分页搜索运算符。 */\nexport enum PagedSearchTypeEnum {\n\t/**\n\t * 模糊匹配\n\t */\n\tLike = 1,\n\t/**\n\t * 等于\n\t */\n\tEqual = 2,\n\t/**\n\t * 不等于\n\t */\n\tNotEqual = 3,\n\t/**\n\t * 大于\n\t */\n\tGreaterThan = 4,\n\t/**\n\t * 大于等于\n\t */\n\tGreaterThanOrEqual = 5,\n\t/**\n\t * 小于\n\t */\n\tLessThan = 6,\n\t/**\n\t * 小于等于\n\t */\n\tLessThanOrEqual = 7,\n\t/**\n\t * 包含\n\t */\n\tInclude = 8,\n\t/**\n\t * 排除\n\t */\n\tNotInclude = 9,\n}\n\n/** FaTable 单个分页搜索条件。 */\nexport interface PagedSearchInput {\n\t/**\n\t * 搜索字段英文\n\t */\n\tenField?: string;\n\t/**\n\t * 搜索字段中文\n\t */\n\tcnField?: string;\n\t/**\n\t * 搜索值\n\t */\n\tvalue?: string;\n\t/**\n\t * 搜索类型\n\t */\n\ttype?: PagedSearchTypeEnum;\n}\n\n/** FaTable 单个分页排序条件。 */\nexport interface PagedSortInput {\n\t/**\n\t * 排序字段英文\n\t */\n\tenField?: string;\n\t/**\n\t * 排序字段中文\n\t */\n\tcnField?: string;\n\t/**\n\t * 排序方法\n\t * 'ascending' | 'descending'\n\t */\n\tmode?: string;\n}\n\n/** FaTable 分页、搜索和排序请求参数。 */\nexport interface PagedInput {\n\t/**\n\t * 当前页面索引值,默认为1\n\t */\n\tpageIndex?: number;\n\t/**\n\t * 页码容量\n\t */\n\tpageSize?: number;\n\t/**\n\t * 搜索值\n\t */\n\tsearchValue?: string;\n\t/**\n\t * 搜索时间\n\t */\n\tsearchTimeList?: (Date | string)[];\n\t/**\n\t * 搜索集合\n\t */\n\tsearchList?: PagedSearchInput[];\n\t/**\n\t * 排序集合\n\t */\n\tsortList?: PagedSortInput[];\n\t/**\n\t * 启用分页\n\t * @default true\n\t */\n\tenablePaged?: boolean;\n}\n"],"mappings":";;AAyCA,IAAY,sBAAL,yBAAA,qBAAA;;;;CAIN,oBAAA,oBAAA,UAAA,KAAA;;;;CAIA,oBAAA,oBAAA,WAAA,KAAA;;;;CAIA,oBAAA,oBAAA,cAAA,KAAA;;;;CAIA,oBAAA,oBAAA,iBAAA,KAAA;;;;CAIA,oBAAA,oBAAA,wBAAA,KAAA;;;;CAIA,oBAAA,oBAAA,cAAA,KAAA;;;;CAIA,oBAAA,oBAAA,qBAAA,KAAA;;;;CAIA,oBAAA,oBAAA,aAAA,KAAA;;;;CAIA,oBAAA,oBAAA,gBAAA,KAAA;;AACD,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"page.type.mjs","names":[],"sources":["../../../../src/components/table/src/page.type.ts"],"sourcesContent":["/** FaTable 统一分页返回结果。 */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- 默认分页行字段由业务接口定义。\nexport interface PagedResult<Output = Record<string, any>> {\n\t/**\n\t * 当前页\n\t */\n\tpageIndex?: number;\n\t/**\n\t * 当前页码\n\t */\n\tpageSize?: number;\n\t/**\n\t * 总页数\n\t */\n\ttotalPage?: number;\n\t/**\n\t * 总条数\n\t */\n\ttotalRows?: number;\n\t/**\n\t * Data\n\t */\n\trows?: Output[];\n\t/**\n\t * 是否有上一页\n\t */\n\thasPrevPages?: boolean;\n\t/**\n\t * 是否有下一页\n\t */\n\thasNextPages?: boolean;\n\t/**\n\t * 程序集名称\n\t */\n\tassemblyName?: string;\n\t/**\n\t * 完全限定名称\n\t */\n\tfullName?: string;\n}\n\n/** FaTable 分页搜索运算符。 */\nexport enum PagedSearchTypeEnum {\n\t/**\n\t * 模糊匹配\n\t */\n\tLike = 1,\n\t/**\n\t * 等于\n\t */\n\tEqual = 2,\n\t/**\n\t * 不等于\n\t */\n\tNotEqual = 3,\n\t/**\n\t * 大于\n\t */\n\tGreaterThan = 4,\n\t/**\n\t * 大于等于\n\t */\n\tGreaterThanOrEqual = 5,\n\t/**\n\t * 小于\n\t */\n\tLessThan = 6,\n\t/**\n\t * 小于等于\n\t */\n\tLessThanOrEqual = 7,\n\t/**\n\t * 包含\n\t */\n\tInclude = 8,\n\t/**\n\t * 排除\n\t */\n\tNotInclude = 9,\n}\n\n/** FaTable 单个分页搜索条件。 */\nexport interface PagedSearchInput {\n\t/**\n\t * 搜索字段英文\n\t */\n\tenField?: string;\n\t/**\n\t * 搜索字段中文\n\t */\n\tcnField?: string;\n\t/**\n\t * 搜索值\n\t */\n\tvalue?: string;\n\t/**\n\t * 搜索类型\n\t */\n\ttype?: PagedSearchTypeEnum;\n}\n\n/** FaTable 单个分页排序条件。 */\nexport interface PagedSortInput {\n\t/**\n\t * 排序字段英文\n\t */\n\tenField?: string;\n\t/**\n\t * 排序字段中文\n\t */\n\tcnField?: string;\n\t/**\n\t * 排序方法\n\t * 'ascending' | 'descending'\n\t */\n\tmode?: string;\n}\n\n/** FaTable 分页、搜索和排序请求参数。 */\nexport interface PagedInput {\n\t/**\n\t * 当前页面索引值,默认为1\n\t */\n\tpageIndex?: number;\n\t/**\n\t * 页码容量\n\t */\n\tpageSize?: number;\n\t/**\n\t * 搜索值\n\t */\n\tsearchValue?: string;\n\t/**\n\t * 搜索时间\n\t */\n\tsearchTimeList?: (Date | string)[];\n\t/**\n\t * 搜索集合\n\t */\n\tsearchList?: PagedSearchInput[];\n\t/**\n\t * 排序集合\n\t */\n\tsortList?: PagedSortInput[];\n\t/**\n\t * 启用分页\n\t * @default true\n\t */\n\tenablePaged?: boolean;\n\t/** 业务接口附加的查询字段。 */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any -- 分页查询允许携带业务接口定义的扩展字段。\n\t[key: string]: any;\n}\n"],"mappings":";;AA0CA,IAAY,sBAAL,yBAAA,qBAAA;;;;CAIN,oBAAA,oBAAA,UAAA,KAAA;;;;CAIA,oBAAA,oBAAA,WAAA,KAAA;;;;CAIA,oBAAA,oBAAA,cAAA,KAAA;;;;CAIA,oBAAA,oBAAA,iBAAA,KAAA;;;;CAIA,oBAAA,oBAAA,wBAAA,KAAA;;;;CAIA,oBAAA,oBAAA,cAAA,KAAA;;;;CAIA,oBAAA,oBAAA,qBAAA,KAAA;;;;CAIA,oBAAA,oBAAA,aAAA,KAAA;;;;CAIA,oBAAA,oBAAA,gBAAA,KAAA;;AACD,EAAA,CAAA,CAAA"}
@@ -1,10 +1,9 @@
1
- import type { FaTableRow } from "./table.state";
2
- import type { FaTableColumnCtx, FaTableDataRange, FaTableDefaultSlotsResult } from "./table.type";
3
- import type { FaLayoutGridBreakPoint } from "../../layoutGrid";
4
- import type { PagedInput, PagedResult } from "../src/page.type";
5
1
  import type { TableColumnCtx, TableProps } from "element-plus";
6
2
  import type { CSSProperties, PropType } from "vue";
7
- type DefaultRow = FaTableRow;
3
+ import type { FaLayoutGridBreakPoint } from "../../layoutGrid";
4
+ import type { PagedInput, PagedResult } from "../src/page.type";
5
+ import type { DefaultRow } from "./table.state";
6
+ import type { FaTableColumnCtx, FaTableDataRange, FaTableDefaultSlotsResult } from "./table.type";
8
7
  type Layout = "fixed" | "auto";
9
8
  /** FaTable 树形数据的字段配置。 */
10
9
  export interface TreeProps {
@@ -250,7 +249,7 @@ export declare const faTableProps: {
250
249
  };
251
250
  /** @description 表格数据 */
252
251
  data: {
253
- type: PropType<FaTableRow[]>;
252
+ type: PropType<DefaultRow[]>;
254
253
  default: () => DefaultRow[];
255
254
  };
256
255
  /** @description 请求api */
@@ -259,10 +258,10 @@ export declare const faTableProps: {
259
258
  };
260
259
  /** @description 接口请求数据回调 */
261
260
  dataCallback: {
262
- type: PropType<(data: unknown) => void>;
261
+ type: PropType<(data: PagedResult<DefaultRow> | DefaultRow[]) => void>;
263
262
  };
264
263
  /** 初始化参数 */
265
- initParam: PropType<unknown>;
264
+ initParam: PropType<string | number | PagedInput>;
266
265
  /** @description 列配置 */
267
266
  columns: {
268
267
  type: PropType<false | FaTableColumnCtx[]>;
@@ -584,7 +583,7 @@ export declare const faTableEmits: {
584
583
  order: "" | "ascending" | "descending";
585
584
  }) => boolean;
586
585
  /** @description column 的 key, 如果需要使用 filter-change 事件,则需要此属性标识是哪个 column 的筛选条件 */
587
- filterChange: (newFilters: unknown) => boolean;
586
+ filterChange: (newFilters: Record<string, string[]>) => boolean;
588
587
  /** @description 当表格的当前行发生变化的时候会触发该事件,如果要高亮当前行,请打开表格的 highlight-current-row 属性 */
589
588
  currentChange: (currentRow: DefaultRow, oldCurrentRow: DefaultRow | null) => boolean;
590
589
  /** @description 当拖动表头改变了列的宽度的时候会触发该事件 */
@@ -648,7 +647,7 @@ export type FaTableSlots = Record<string, unknown> & {
648
647
  } & Record<string, FaTableDefaultSlotsResult & {
649
648
  /** @description slots为表格内容的时候才会返回 */
650
649
  row?: DefaultRow;
651
- /** @description slot为表头内容的时候返回 'TableColumnCtx<any>' 否则返回 'FaTableColumnCtx' */
650
+ /** @description slot为表头内容的时候返回 'TableColumnCtx<DefaultRow>' 否则返回 'FaTableColumnCtx' */
652
651
  column?: TableColumnCtx<DefaultRow> | FaTableColumnCtx;
653
652
  /** @description slot为非搜索项的时候才会返回 */
654
653
  $index?: number;
@@ -683,7 +682,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
683
682
  };
684
683
  /** @description 表格数据 */
685
684
  data: {
686
- type: PropType<FaTableRow[]>;
685
+ type: PropType<DefaultRow[]>;
687
686
  default: () => DefaultRow[];
688
687
  };
689
688
  /** @description 请求api */
@@ -692,10 +691,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
692
691
  };
693
692
  /** @description 接口请求数据回调 */
694
693
  dataCallback: {
695
- type: PropType<(data: unknown) => void>;
694
+ type: PropType<(data: PagedResult<DefaultRow> | DefaultRow[]) => void>;
696
695
  };
697
696
  /** 初始化参数 */
698
- initParam: PropType<unknown>;
697
+ initParam: PropType<string | number | PagedInput>;
699
698
  /** @description 列配置 */
700
699
  columns: {
701
700
  type: PropType<false | FaTableColumnCtx[]>;
@@ -1017,7 +1016,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1017
1016
  /** @description 加载状态 */
1018
1017
  loading: import("vue").ComputedRef<boolean>;
1019
1018
  /** @description 表格数据 */
1020
- tableData: import("vue").ComputedRef<FaTableRow[]>;
1019
+ tableData: import("vue").ComputedRef<DefaultRow[]>;
1021
1020
  /** @description 分页数据 */
1022
1021
  tablePagination: import("vue").ComputedRef<{
1023
1022
  pageIndex: number;
@@ -1025,11 +1024,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1025
1024
  totalRows: number;
1026
1025
  }>;
1027
1026
  /** @description 搜索参数 */
1028
- searchParam: import("vue").ComputedRef<PagedInput & Record<string, unknown>>;
1027
+ searchParam: import("vue").ComputedRef<PagedInput>;
1029
1028
  /** @description 选中状态 */
1030
1029
  selected: import("vue").ComputedRef<boolean>;
1031
1030
  /** @description 选中数据列表 */
1032
- selectedList: import("vue").ComputedRef<FaTableRow[]>;
1031
+ selectedList: import("vue").ComputedRef<DefaultRow[]>;
1033
1032
  /** @description 选中数据 rowKey 列表 */
1034
1033
  selectedListIds: import("vue").ComputedRef<(string | number)[]>;
1035
1034
  /** @description 部分选中数据 rowKey 列表 */
@@ -1082,7 +1081,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1082
1081
  order: "" | "ascending" | "descending";
1083
1082
  }) => boolean;
1084
1083
  /** @description column 的 key, 如果需要使用 filter-change 事件,则需要此属性标识是哪个 column 的筛选条件 */
1085
- filterChange: (newFilters: unknown) => boolean;
1084
+ filterChange: (newFilters: Record<string, string[]>) => boolean;
1086
1085
  /** @description 当表格的当前行发生变化的时候会触发该事件,如果要高亮当前行,请打开表格的 highlight-current-row 属性 */
1087
1086
  currentChange: (currentRow: DefaultRow, oldCurrentRow: DefaultRow | null) => boolean;
1088
1087
  /** @description 当拖动表头改变了列的宽度的时候会触发该事件 */
@@ -1136,7 +1135,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1136
1135
  };
1137
1136
  /** @description 表格数据 */
1138
1137
  data: {
1139
- type: PropType<FaTableRow[]>;
1138
+ type: PropType<DefaultRow[]>;
1140
1139
  default: () => DefaultRow[];
1141
1140
  };
1142
1141
  /** @description 请求api */
@@ -1145,10 +1144,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1145
1144
  };
1146
1145
  /** @description 接口请求数据回调 */
1147
1146
  dataCallback: {
1148
- type: PropType<(data: unknown) => void>;
1147
+ type: PropType<(data: PagedResult<DefaultRow> | DefaultRow[]) => void>;
1149
1148
  };
1150
1149
  /** 初始化参数 */
1151
- initParam: PropType<unknown>;
1150
+ initParam: PropType<string | number | PagedInput>;
1152
1151
  /** @description 列配置 */
1153
1152
  columns: {
1154
1153
  type: PropType<false | FaTableColumnCtx[]>;
@@ -1439,30 +1438,30 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1439
1438
  scrollLeft: number;
1440
1439
  scrollTop: number;
1441
1440
  }) => any) | undefined;
1442
- onSelect?: ((selection: FaTableRow[], row: FaTableRow) => any) | undefined;
1441
+ onSelect?: ((selection: DefaultRow[], row: DefaultRow) => any) | undefined;
1443
1442
  onReset?: ((params: PagedInput) => any) | undefined;
1444
1443
  onRefresh?: ((params: PagedInput) => any) | undefined;
1445
- onFilterChange?: ((newFilters: unknown) => any) | undefined;
1446
- onSelectAll?: ((selection: FaTableRow[]) => any) | undefined;
1447
- onSelectionChange?: ((newSelection: FaTableRow[]) => any) | undefined;
1448
- onCellMouseEnter?: ((row: FaTableRow, column: TableColumnCtx<FaTableRow>, cell: HTMLTableCellElement, event: Event) => any) | undefined;
1449
- onCellMouseLeave?: ((row: FaTableRow, column: TableColumnCtx<FaTableRow>, cell: HTMLTableCellElement, event: Event) => any) | undefined;
1450
- onCellClick?: ((row: FaTableRow, column: TableColumnCtx<FaTableRow>, cell: HTMLTableCellElement, event: Event) => any) | undefined;
1451
- onCellDblclick?: ((row: FaTableRow, column: TableColumnCtx<FaTableRow>, cell: HTMLTableCellElement, event: Event) => any) | undefined;
1452
- onCellContextmenu?: ((row: FaTableRow, column: TableColumnCtx<FaTableRow>, cell: HTMLTableCellElement, event: Event) => any) | undefined;
1453
- onRowClick?: ((row: FaTableRow, column: TableColumnCtx<FaTableRow>, event: Event) => any) | undefined;
1454
- onRowContextmenu?: ((row: FaTableRow, column: TableColumnCtx<FaTableRow>, event: Event) => any) | undefined;
1455
- onRowDblclick?: ((row: FaTableRow, column: TableColumnCtx<FaTableRow>, event: Event) => any) | undefined;
1456
- onHeaderClick?: ((column: TableColumnCtx<FaTableRow>, event: Event) => any) | undefined;
1457
- onHeaderContextmenu?: ((column: TableColumnCtx<FaTableRow>, event: Event) => any) | undefined;
1444
+ onFilterChange?: ((newFilters: Record<string, string[]>) => any) | undefined;
1445
+ onSelectAll?: ((selection: DefaultRow[]) => any) | undefined;
1446
+ onSelectionChange?: ((newSelection: DefaultRow[]) => any) | undefined;
1447
+ onCellMouseEnter?: ((row: DefaultRow, column: TableColumnCtx<DefaultRow>, cell: HTMLTableCellElement, event: Event) => any) | undefined;
1448
+ onCellMouseLeave?: ((row: DefaultRow, column: TableColumnCtx<DefaultRow>, cell: HTMLTableCellElement, event: Event) => any) | undefined;
1449
+ onCellClick?: ((row: DefaultRow, column: TableColumnCtx<DefaultRow>, cell: HTMLTableCellElement, event: Event) => any) | undefined;
1450
+ onCellDblclick?: ((row: DefaultRow, column: TableColumnCtx<DefaultRow>, cell: HTMLTableCellElement, event: Event) => any) | undefined;
1451
+ onCellContextmenu?: ((row: DefaultRow, column: TableColumnCtx<DefaultRow>, cell: HTMLTableCellElement, event: Event) => any) | undefined;
1452
+ onRowClick?: ((row: DefaultRow, column: TableColumnCtx<DefaultRow>, event: Event) => any) | undefined;
1453
+ onRowContextmenu?: ((row: DefaultRow, column: TableColumnCtx<DefaultRow>, event: Event) => any) | undefined;
1454
+ onRowDblclick?: ((row: DefaultRow, column: TableColumnCtx<DefaultRow>, event: Event) => any) | undefined;
1455
+ onHeaderClick?: ((column: TableColumnCtx<DefaultRow>, event: Event) => any) | undefined;
1456
+ onHeaderContextmenu?: ((column: TableColumnCtx<DefaultRow>, event: Event) => any) | undefined;
1458
1457
  onSortChange?: ((data: {
1459
1458
  column: TableColumnCtx<DefaultRow>;
1460
1459
  prop: string;
1461
1460
  order: "" | "ascending" | "descending";
1462
1461
  }) => any) | undefined;
1463
- onCurrentChange?: ((currentRow: FaTableRow, oldCurrentRow: FaTableRow | null) => any) | undefined;
1464
- onHeaderDragend?: ((newWidth: number, oldWidth: number, column: TableColumnCtx<FaTableRow>, event: MouseEvent) => any) | undefined;
1465
- onExpandChange?: ((row: FaTableRow, expanded: boolean | FaTableRow[]) => any) | undefined;
1462
+ onCurrentChange?: ((currentRow: DefaultRow, oldCurrentRow: DefaultRow | null) => any) | undefined;
1463
+ onHeaderDragend?: ((newWidth: number, oldWidth: number, column: TableColumnCtx<DefaultRow>, event: MouseEvent) => any) | undefined;
1464
+ onExpandChange?: ((row: DefaultRow, expanded: boolean | DefaultRow[]) => any) | undefined;
1466
1465
  onSizeChange?: ((pageSize: number) => any) | undefined;
1467
1466
  onPaginationChange?: ((pageIndex: number, pageSize: number) => any) | undefined;
1468
1467
  onCustomCellClick?: ((emitName: string, args_1: {
@@ -1471,7 +1470,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1471
1470
  $index: number;
1472
1471
  } & FaTableDefaultSlotsResult) => any) | undefined;
1473
1472
  }>, {
1474
- data: FaTableRow[];
1473
+ data: DefaultRow[];
1475
1474
  style: CSSProperties;
1476
1475
  props: {
1477
1476
  span?: string;
@@ -1484,7 +1483,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1484
1483
  columns: false | FaTableColumnCtx[];
1485
1484
  pagination: boolean;
1486
1485
  stripe: boolean;
1487
- rowKey: string | ((row: FaTableRow) => string) | undefined;
1486
+ rowKey: string | ((row: DefaultRow) => string) | undefined;
1488
1487
  showHeader: boolean;
1489
1488
  showSummary: boolean;
1490
1489
  highlightCurrentRow: boolean;
@@ -416,7 +416,7 @@ const faTableEmits = {
416
416
  /** @description 当表格的排序条件发生变化的时候会触发该事件 */
417
417
  sortChange: (data) => isObject(data),
418
418
  /** @description column 的 key, 如果需要使用 filter-change 事件,则需要此属性标识是哪个 column 的筛选条件 */
419
- filterChange: (newFilters) => isString(newFilters) || isNumber(newFilters) || isBoolean(newFilters) || isObject(newFilters),
419
+ filterChange: (newFilters) => isObject(newFilters),
420
420
  /** @description 当表格的当前行发生变化的时候会触发该事件,如果要高亮当前行,请打开表格的 highlight-current-row 属性 */
421
421
  currentChange: (currentRow, oldCurrentRow) => isObject(currentRow) && (isNull(oldCurrentRow) || isObject(oldCurrentRow)),
422
422
  /** @description 当拖动表头改变了列的宽度的时候会触发该事件 */
@@ -447,7 +447,9 @@ var table_default = defineComponent({
447
447
  const resizeTableColumns = debounce(handleTableColumnAutoWidth, 100);
448
448
  const columnSettingRef = ref();
449
449
  let lastRowIndex = 0;
450
- const getInitParam = () => typeof props.initParam === "object" && props.initParam !== null ? props.initParam : {};
450
+ const getInitParam = () => {
451
+ return typeof props.initParam === "object" && props.initParam !== null ? props.initParam : {};
452
+ };
451
453
  const getRowKey = (row) => {
452
454
  const value = isFunction(props.rowKey) ? props.rowKey(row) : tableUtil.handleRowAccordingToProp(row, props.rowKey);
453
455
  return typeof value === "string" || typeof value === "number" ? value : void 0;