fast-element-plus 1.0.9 → 1.0.11

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 (119) hide show
  1. package/dist/index.full.js +1796 -12281
  2. package/dist/index.full.js.map +1 -1
  3. package/dist/index.full.min.js +1 -1
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +1 -1
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +1796 -12281
  8. package/dist/index.full.mjs.map +1 -1
  9. package/es/components/selectV2/src/selectV2.d.ts +12 -13
  10. package/es/components/selectV2/src/selectV2.mjs +1 -1
  11. package/es/components/selectV2/src/selectV2.mjs.map +1 -1
  12. package/es/components/table/src/table.mjs +1 -1
  13. package/es/components/table/src/table.mjs.map +1 -1
  14. package/es/components/table/src/tableColumn.mjs +1 -1
  15. package/es/components/table/src/tableColumn.mjs.map +1 -1
  16. package/es/components/table/utils/table.mjs +1 -1
  17. package/es/components/table/utils/table.mjs.map +1 -1
  18. package/es/components/treeSelect/src/treeSelect.d.ts +48 -48
  19. package/es/components/treeSelect/src/treeSelect.mjs +1 -1
  20. package/es/components/treeSelect/src/treeSelect.mjs.map +1 -1
  21. package/es/version.d.ts +1 -1
  22. package/es/version.mjs +1 -1
  23. package/es/version.mjs.map +1 -1
  24. package/lib/components/selectV2/src/selectV2.d.ts +12 -13
  25. package/lib/components/selectV2/src/selectV2.js +1 -1
  26. package/lib/components/selectV2/src/selectV2.js.map +1 -1
  27. package/lib/components/table/src/table.js +1 -1
  28. package/lib/components/table/src/table.js.map +1 -1
  29. package/lib/components/table/src/tableColumn.js +1 -1
  30. package/lib/components/table/src/tableColumn.js.map +1 -1
  31. package/lib/components/table/utils/table.js +1 -1
  32. package/lib/components/table/utils/table.js.map +1 -1
  33. package/lib/components/treeSelect/src/treeSelect.d.ts +48 -48
  34. package/lib/components/treeSelect/src/treeSelect.js +1 -1
  35. package/lib/components/treeSelect/src/treeSelect.js.map +1 -1
  36. package/lib/version.d.ts +1 -1
  37. package/lib/version.js +1 -1
  38. package/lib/version.js.map +1 -1
  39. package/package.json +1 -1
  40. package/es/node_modules/.pnpm/@sxzz_popperjs-es@2.11.7/node_modules/@sxzz/popperjs-es/dist/index.mjs +0 -2
  41. package/es/node_modules/.pnpm/@sxzz_popperjs-es@2.11.7/node_modules/@sxzz/popperjs-es/dist/index.mjs.map +0 -1
  42. package/es/node_modules/.pnpm/@vue_shared@3.5.26/node_modules/@vue/shared/dist/shared.esm-bundler.mjs +0 -2
  43. package/es/node_modules/.pnpm/@vue_shared@3.5.26/node_modules/@vue/shared/dist/shared.esm-bundler.mjs.map +0 -1
  44. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/popper/src/arrow.mjs +0 -2
  45. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/popper/src/arrow.mjs.map +0 -1
  46. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/popper/src/content.mjs +0 -2
  47. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/popper/src/content.mjs.map +0 -1
  48. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/select-v2/src/defaults.mjs +0 -2
  49. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/select-v2/src/defaults.mjs.map +0 -1
  50. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/select-v2/src/useProps.mjs +0 -2
  51. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/select-v2/src/useProps.mjs.map +0 -1
  52. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/tag/src/tag.mjs +0 -2
  53. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/tag/src/tag.mjs.map +0 -1
  54. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/teleport/src/teleport.mjs +0 -2
  55. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/teleport/src/teleport.mjs.map +0 -1
  56. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/tooltip/src/content.mjs +0 -2
  57. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/tooltip/src/content.mjs.map +0 -1
  58. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/constants/event.mjs +0 -2
  59. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/constants/event.mjs.map +0 -1
  60. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/constants/size.mjs +0 -2
  61. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/constants/size.mjs.map +0 -1
  62. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-aria/index.mjs +0 -2
  63. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-aria/index.mjs.map +0 -1
  64. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-delayed-toggle/index.mjs +0 -2
  65. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-delayed-toggle/index.mjs.map +0 -1
  66. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-empty-values/index.mjs +0 -2
  67. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-empty-values/index.mjs.map +0 -1
  68. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-size/index.mjs +0 -2
  69. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-size/index.mjs.map +0 -1
  70. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-timeout/index.mjs +0 -2
  71. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-timeout/index.mjs.map +0 -1
  72. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/utils/error.mjs +0 -2
  73. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/utils/error.mjs.map +0 -1
  74. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/utils/types.mjs +0 -2
  75. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/utils/types.mjs.map +0 -1
  76. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/utils/vue/icon.mjs +0 -2
  77. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/utils/vue/icon.mjs.map +0 -1
  78. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/utils/vue/props/runtime.mjs +0 -2
  79. package/es/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/utils/vue/props/runtime.mjs.map +0 -1
  80. package/lib/node_modules/.pnpm/@sxzz_popperjs-es@2.11.7/node_modules/@sxzz/popperjs-es/dist/index.js +0 -2
  81. package/lib/node_modules/.pnpm/@sxzz_popperjs-es@2.11.7/node_modules/@sxzz/popperjs-es/dist/index.js.map +0 -1
  82. package/lib/node_modules/.pnpm/@vue_shared@3.5.26/node_modules/@vue/shared/dist/shared.esm-bundler.js +0 -2
  83. package/lib/node_modules/.pnpm/@vue_shared@3.5.26/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +0 -1
  84. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/popper/src/arrow.js +0 -2
  85. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/popper/src/arrow.js.map +0 -1
  86. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/popper/src/content.js +0 -2
  87. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/popper/src/content.js.map +0 -1
  88. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/select-v2/src/defaults.js +0 -2
  89. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/select-v2/src/defaults.js.map +0 -1
  90. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/select-v2/src/useProps.js +0 -2
  91. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/select-v2/src/useProps.js.map +0 -1
  92. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/tag/src/tag.js +0 -2
  93. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/tag/src/tag.js.map +0 -1
  94. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/teleport/src/teleport.js +0 -2
  95. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/teleport/src/teleport.js.map +0 -1
  96. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/tooltip/src/content.js +0 -2
  97. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/tooltip/src/content.js.map +0 -1
  98. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/constants/event.js +0 -2
  99. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/constants/event.js.map +0 -1
  100. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/constants/size.js +0 -2
  101. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/constants/size.js.map +0 -1
  102. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-aria/index.js +0 -2
  103. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-aria/index.js.map +0 -1
  104. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-delayed-toggle/index.js +0 -2
  105. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-delayed-toggle/index.js.map +0 -1
  106. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-empty-values/index.js +0 -2
  107. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-empty-values/index.js.map +0 -1
  108. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-size/index.js +0 -2
  109. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-size/index.js.map +0 -1
  110. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-timeout/index.js +0 -2
  111. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/hooks/use-timeout/index.js.map +0 -1
  112. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/utils/error.js +0 -2
  113. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/utils/error.js.map +0 -1
  114. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/utils/types.js +0 -2
  115. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/utils/types.js.map +0 -1
  116. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/utils/vue/icon.js +0 -2
  117. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/utils/vue/icon.js.map +0 -1
  118. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/utils/vue/props/runtime.js +0 -2
  119. package/lib/node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/utils/vue/props/runtime.js.map +0 -1
@@ -286,15 +286,14 @@ export declare const SelectV2Props: {
286
286
  */
287
287
  appendTo: StringConstructor;
288
288
  };
289
- export type SelectComponentProps = {
290
- /** @description 指定标签为节点的某个属性值 */
291
- label?: string | ((data: any) => string);
292
- /** @description 指定是否隐藏为节点的某个属性值 */
293
- hide?: string | ((data: any) => boolean);
294
- /** @description 指定是否禁用为节点的某个属性值 */
295
- disabled?: string | ((data: any) => boolean);
296
- /** @description 指定子节点对象为节点的某个属性值 */
297
- children?: string;
289
+ export declare const selectV2Emits: {
290
+ "update:modelValue": (value: string | number | boolean | object | (string | number | boolean | object)[]) => boolean;
291
+ change: (val: string | number | boolean | object | (string | number | boolean | object)[]) => boolean;
292
+ "remove-tag": (val: unknown) => boolean;
293
+ "visible-change": (visible: boolean) => boolean;
294
+ focus: (evt: FocusEvent) => boolean;
295
+ blur: (evt: FocusEvent) => boolean;
296
+ clear: () => boolean;
298
297
  };
299
298
  export declare const faSelectV2Props: {
300
299
  /** @description whether Select is disabled 重载使其支持 ElForm*/
@@ -625,8 +624,8 @@ export declare const faSelectV2Emits: {
625
624
  dataChangeCallBack: (data: ElSelectorOutput[] | any[]) => boolean;
626
625
  /** @description 改变 */
627
626
  change: (data: ElSelectorOutput | ElSelectorOutput[] | any | any[], value?: string | number | boolean | object | (string | number | boolean | object)[]) => boolean;
628
- 'remove-tag': (val: unknown) => boolean;
629
- 'visible-change': (visible: boolean) => boolean;
627
+ "remove-tag": (val: unknown) => boolean;
628
+ "visible-change": (visible: boolean) => boolean;
630
629
  focus: (evt: FocusEvent) => boolean;
631
630
  blur: (evt: FocusEvent) => boolean;
632
631
  clear: () => boolean;
@@ -999,8 +998,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
999
998
  dataChangeCallBack: (data: ElSelectorOutput[] | any[]) => boolean;
1000
999
  /** @description 改变 */
1001
1000
  change: (data: ElSelectorOutput | ElSelectorOutput[] | any | any[], value?: string | number | boolean | object | (string | number | boolean | object)[]) => boolean;
1002
- 'remove-tag': (val: unknown) => boolean;
1003
- 'visible-change': (visible: boolean) => boolean;
1001
+ "remove-tag": (val: unknown) => boolean;
1002
+ "visible-change": (visible: boolean) => boolean;
1004
1003
  focus: (evt: FocusEvent) => boolean;
1005
1004
  blur: (evt: FocusEvent) => boolean;
1006
1005
  clear: () => boolean;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("element-plus"),t=require("@element-plus/icons-vue"),a=require("@fast-china/utils"),o=require("@vueuse/core"),r=require("lodash-unified"),i=require("../../../node_modules/.pnpm/element-plus@2.13.0_vue@3.5.26_typescript@5.9.3_/node_modules/element-plus/es/components/select-v2/src/defaults.js"),n={allowCreate:Boolean,autocomplete:{type:a.definePropType(String),default:"none"},automaticDropdown:Boolean,clearable:Boolean,clearIcon:{type:a.definePropType([String,Object,Function]),default:t.CircleClose},effect:{type:a.definePropType(String),default:"light"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},defaultFirstOption:Boolean,disabled:Boolean,estimatedOptionHeight:{type:Number,default:void 0},filterable:Boolean,filterMethod:Function,height:{type:Number,default:274},itemHeight:{type:Number,default:34},id:String,loading:Boolean,loadingText:String,modelValue:{type:a.definePropType([Array,String,Number,Boolean,Object])},multiple:Boolean,multipleLimit:{type:Number,default:0},name:String,noDataText:String,noMatchText:String,remoteMethod:Function,reserveKeyword:{type:Boolean,default:!0},options:{type:a.definePropType(Array)},placeholder:{type:String},teleported:l.useTooltipContentProps.teleported,persistent:{type:Boolean,default:!0},popperClass:{type:String,default:""},popperOptions:{type:a.definePropType(Object),default:()=>({})},remote:Boolean,size:l.useSizeProp,props:{type:a.definePropType(Object),default:()=>({label:"label",value:"value",disabled:"disabled",options:"options"})},valueKey:{type:String,default:"value"},scrollbarAlwaysOn:Boolean,validateEvent:{type:Boolean,default:!0},offset:{type:Number,default:12},showArrow:{type:Boolean,default:!0},placement:{type:a.definePropType(String),default:"bottom-start"},fallbackPlacements:{type:a.definePropType(Array),default:["bottom-start","top-start","right","left"]},tagType:{...l.tagProps.type,default:"info"},tagEffect:{...l.tagProps.effect,default:"light"},tabindex:{type:[String,Number],default:0},appendTo:String,...l.useEmptyValuesProps,...l.useAriaProps(["ariaLabel"])},u={...n,disabled:{type:Boolean,default:void 0},loadingText:{type:String,default:"加载中..."},noMatchText:{type:String,default:"暂无匹配的数据"},noDataText:{type:String,default:"暂无数据"},collapseTags:{type:Boolean,default:!0},collapseTagsTooltip:{type:Boolean,default:!0},modelValue:{type:a.definePropType([String,Number,Boolean,Object,Array]),default:void 0},label:a.definePropType([String,Array]),width:{type:[String,Number],default:"100%"},moreDetail:Boolean,lazy:{type:Boolean,default:!0},defaultSelected:Boolean,data:{type:a.definePropType(Array),default:()=>[]},pageResult:Boolean,requestApi:{type:a.definePropType(Function)},initParam:a.definePropType([String,Number,Object])},s={...i.selectV2Emits,"update:modelValue":e=>r.isString(e)||r.isNumber(e)||r.isBoolean(e)||r.isObject(e)||r.isArray(e)||r.isNull(e),"update:label":e=>r.isString(e)||r.isArray(e)||r.isNull(e),dataChangeCallBack:e=>r.isArray(e),change:(e,l)=>!0},d=e.defineComponent({name:"FaSelectV2",props:u,emits:s,slots:a.makeSlots(),setup(t,{attrs:i,slots:u,emit:d,expose:p}){const c=o.useVModel(t,"label",d),f=l.useGlobalSize(),m=e.reactive({value:a.withDefineType(),loading:!1,selectorData:a.withDefineType([]),debut:!0,echo:!(t.data?.length>0),nextRefresh:!1}),y=e.ref(),g=async()=>{if(t.requestApi){m.loading=!0;const l=t.initParam??{};try{const e=await t.requestApi(l);m.echo=!1,t.pageResult?m.selectorData=e.rows:m.selectorData=e,d("dataChangeCallBack",m.selectorData)}catch(e){a.consoleError("FaSelect",e),m.selectorData=[]}finally{m.loading=!1}}else m.echo=!1,m.selectorData=t.data},b=e=>{if(t.multiple){const l=e;if(0===l?.length)return m.value=null,c.value=null,d("update:modelValue",null),void d("change",null,null);const t=m.selectorData.filter(e=>l.includes(e.value));m.value=e,c.value=t.map(e=>e.label),d("update:modelValue",e),d("change",t,e)}else{if(r.isNil(e))return m.value=null,c.value=null,d("update:modelValue",null),void d("change",null,null);const l=m.selectorData.find(l=>l.value===e);m.value=e,c.value=l.label,d("update:modelValue",e),d("change",l,e)}},v=()=>{m.value=null,c.value=null,d("update:modelValue",null),d("clear")},h=async e=>{e&&(m.debut?(m.debut=!1,!t.defaultSelected&&t.lazy&&await g()):m.nextRefresh&&(m.nextRefresh=!1,await g())),d("visible-change",e)};e.watch(()=>t.modelValue,e=>{if(m.echo&&!r.isNil(e)){const l=!r.isNil(t.label);if(t.multiple){if(!r.isArray(e))return void a.consoleError("FaSelectV2","当启用 multiple 时,传入的 modelValue 必须是Array。");if(l&&!r.isArray(t.label))return void a.consoleError("FaSelectV2","当启用 multiple 时,传入的 modelValue:label 必须是Array。");m.selectorData=e.slice(0,t.multipleLimit>0?t.multipleLimit:e.length).map((e,a)=>({value:e,label:l?t.label[a]:void 0}))}else{if(r.isArray(e))return void a.consoleError("FaSelectV2","当禁用 multiple 时,传入的 modelValue 不能是Array。");if(l&&r.isArray(t.label))return void a.consoleError("FaSelectV2","当禁用 multiple 时,传入的 modelValue:label 不能是Array。");m.selectorData=[{value:e,label:t.label}]}}m.value=e},{immediate:!0}),e.onMounted(async()=>{t.defaultSelected?(await g(),m.selectorData.length>0&&b(t.multiple?[m.selectorData[0].value]:m.selectorData[0].value)):!t.requestApi&&t.data?.length>0?(m.debut=!1,await g()):t.lazy||await g(),e.watch(()=>t.initParam,(e,l)=>{r.isEqual(e,l)||(m.nextRefresh=!0,r.isNil(m.value)||b())}),e.watch(()=>t.data,async()=>{t.requestApi||await g()},{deep:!0})});const S=a.useProps(t,n,["modelValue","popperClass","loading","options","itemHeight"]),T=a.useEmits(s,d,["update:modelValue","change","clear","visible-change"]),V=e.computed(()=>{let e=`fa-select-v2-dropdown ${t.popperClass}`;return t.moreDetail&&(e+=` fa-select-dropdown__more-detail fa-select-dropdown__more-detail-${f.value}`),e});return a.useRender(()=>e.createVNode(l.ElSelectV2,e.mergeProps(S.value,T.value,{ref:y,class:"fa-select-v2",popperClass:V.value,style:{width:a.addUnit(t.width)},modelValue:m.value,"onUpdate:modelValue":e=>m.value=e,loading:m.loading,options:m.selectorData,itemHeight:t.itemHeight+("small"===f.value?0:8),onChange:b,onClear:v,onVisibleChange:h}),{...u.default&&{default:({item:e,index:l,disabled:t})=>u.default({item:e,index:l,disabled:t})},...u.header&&{header:()=>u.header()},...u.footer&&{footer:()=>u.footer()},...u.prefix&&{prefix:()=>u.prefix()},...u.empty&&{empty:()=>u.empty()},...u.tag&&{tag:()=>u.tag()},...u.loading&&{loading:()=>u.loading()},...u.label&&{label:({label:e,value:l})=>u.label({label:e,value:l})}})),a.useExpose(p,{focus:e.computed(()=>y.value?.focus),blur:e.computed(()=>y.value?.blur),selectedLabel:e.computed(()=>y.value?.selectedLabel),loading:e.computed(()=>m.loading),refresh:g,setSelection:e=>b(e),clearSelection:()=>b(null)})}});exports.SelectV2Props=n,exports.default=d,exports.faSelectV2Emits=s,exports.faSelectV2Props=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("element-plus"),t=require("@element-plus/icons-vue"),a=require("@fast-china/utils"),o=require("@vueuse/core"),r=require("lodash-unified"),i={allowCreate:Boolean,autocomplete:{type:a.definePropType(String),default:"none"},automaticDropdown:Boolean,clearable:Boolean,clearIcon:{type:a.definePropType([String,Object,Function]),default:t.CircleClose},effect:{type:a.definePropType(String),default:"light"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},defaultFirstOption:Boolean,disabled:Boolean,estimatedOptionHeight:{type:Number,default:void 0},filterable:Boolean,filterMethod:Function,height:{type:Number,default:274},itemHeight:{type:Number,default:34},id:String,loading:Boolean,loadingText:String,modelValue:{type:a.definePropType([Array,String,Number,Boolean,Object])},multiple:Boolean,multipleLimit:{type:Number,default:0},name:String,noDataText:String,noMatchText:String,remoteMethod:Function,reserveKeyword:{type:Boolean,default:!0},options:{type:a.definePropType(Array)},placeholder:{type:String},teleported:l.useTooltipContentProps.teleported,persistent:{type:Boolean,default:!0},popperClass:{type:String,default:""},popperOptions:{type:a.definePropType(Object),default:()=>({})},remote:Boolean,size:l.useSizeProp,props:{type:a.definePropType(Object),default:()=>({label:"label",value:"value",disabled:"disabled",options:"options"})},valueKey:{type:String,default:"value"},scrollbarAlwaysOn:Boolean,validateEvent:{type:Boolean,default:!0},offset:{type:Number,default:12},showArrow:{type:Boolean,default:!0},placement:{type:a.definePropType(String),default:"bottom-start"},fallbackPlacements:{type:a.definePropType(Array),default:["bottom-start","top-start","right","left"]},tagType:{...l.tagProps.type,default:"info"},tagEffect:{...l.tagProps.effect,default:"light"},tabindex:{type:[String,Number],default:0},appendTo:String,...l.useEmptyValuesProps,...l.useAriaProps(["ariaLabel"])},u={"update:modelValue":e=>!0,change:e=>!0,"remove-tag":e=>!0,"visible-change":e=>!0,focus:e=>!0,blur:e=>!0,clear:()=>!0},n={...i,disabled:{type:Boolean,default:void 0},loadingText:{type:String,default:"加载中..."},noMatchText:{type:String,default:"暂无匹配的数据"},noDataText:{type:String,default:"暂无数据"},collapseTags:{type:Boolean,default:!0},collapseTagsTooltip:{type:Boolean,default:!0},modelValue:{type:a.definePropType([String,Number,Boolean,Object,Array]),default:void 0},label:a.definePropType([String,Array]),width:{type:[String,Number],default:"100%"},moreDetail:Boolean,lazy:{type:Boolean,default:!0},defaultSelected:Boolean,data:{type:a.definePropType(Array),default:()=>[]},pageResult:Boolean,requestApi:{type:a.definePropType(Function)},initParam:a.definePropType([String,Number,Object])},s={...u,"update:modelValue":e=>r.isString(e)||r.isNumber(e)||r.isBoolean(e)||r.isObject(e)||r.isArray(e)||r.isNull(e),"update:label":e=>r.isString(e)||r.isArray(e)||r.isNull(e),dataChangeCallBack:e=>r.isArray(e),change:(e,l)=>!0},d=e.defineComponent({name:"FaSelectV2",props:n,emits:s,slots:a.makeSlots(),setup(t,{attrs:u,slots:n,emit:d,expose:p}){const c=o.useVModel(t,"label",d),f=l.useGlobalSize(),m=e.reactive({value:a.withDefineType(),loading:!1,selectorData:a.withDefineType([]),debut:!0,echo:!(t.data?.length>0),nextRefresh:!1}),y=e.ref(),g=async()=>{if(t.requestApi){m.loading=!0;const l=t.initParam??{};try{const e=await t.requestApi(l);m.echo=!1,t.pageResult?m.selectorData=e.rows:m.selectorData=e,d("dataChangeCallBack",m.selectorData)}catch(e){a.consoleError("FaSelect",e),m.selectorData=[]}finally{m.loading=!1}}else m.echo=!1,m.selectorData=t.data},b=e=>{if(t.multiple){const l=e;if(0===l?.length)return m.value=null,c.value=null,d("update:modelValue",null),void d("change",null,null);const t=m.selectorData.filter(e=>l.includes(e.value));m.value=e,c.value=t.map(e=>e.label),d("update:modelValue",e),d("change",t,e)}else{if(r.isNil(e))return m.value=null,c.value=null,d("update:modelValue",null),void d("change",null,null);const l=m.selectorData.find(l=>l.value===e);m.value=e,c.value=l.label,d("update:modelValue",e),d("change",l,e)}},v=()=>{m.value=null,c.value=null,d("update:modelValue",null),d("clear")},h=async e=>{e&&(m.debut?(m.debut=!1,!t.defaultSelected&&t.lazy&&await g()):m.nextRefresh&&(m.nextRefresh=!1,await g())),d("visible-change",e)};e.watch(()=>t.modelValue,e=>{if(m.echo&&!r.isNil(e)){const l=!r.isNil(t.label);if(t.multiple){if(!r.isArray(e))return void a.consoleError("FaSelectV2","当启用 multiple 时,传入的 modelValue 必须是Array。");if(l&&!r.isArray(t.label))return void a.consoleError("FaSelectV2","当启用 multiple 时,传入的 modelValue:label 必须是Array。");m.selectorData=e.slice(0,t.multipleLimit>0?t.multipleLimit:e.length).map((e,a)=>({value:e,label:l?t.label[a]:void 0}))}else{if(r.isArray(e))return void a.consoleError("FaSelectV2","当禁用 multiple 时,传入的 modelValue 不能是Array。");if(l&&r.isArray(t.label))return void a.consoleError("FaSelectV2","当禁用 multiple 时,传入的 modelValue:label 不能是Array。");m.selectorData=[{value:e,label:t.label}]}}m.value=e},{immediate:!0}),e.onMounted(async()=>{t.defaultSelected?(await g(),m.selectorData.length>0&&b(t.multiple?[m.selectorData[0].value]:m.selectorData[0].value)):!t.requestApi&&t.data?.length>0?(m.debut=!1,await g()):t.lazy||await g(),e.watch(()=>t.initParam,(e,l)=>{r.isEqual(e,l)||(m.nextRefresh=!0,r.isNil(m.value)||b())}),e.watch(()=>t.data,async()=>{t.requestApi||await g()},{deep:!0})});const S=a.useProps(t,i,["modelValue","popperClass","loading","options","itemHeight"]),T=a.useEmits(s,d,["update:modelValue","change","clear","visible-change"]),V=e.computed(()=>{let e=`fa-select-v2-dropdown ${t.popperClass}`;return t.moreDetail&&(e+=` fa-select-dropdown__more-detail fa-select-dropdown__more-detail-${f.value}`),e});return a.useRender(()=>e.createVNode(l.ElSelectV2,e.mergeProps(S.value,T.value,{ref:y,class:"fa-select-v2",popperClass:V.value,style:{width:a.addUnit(t.width)},modelValue:m.value,"onUpdate:modelValue":e=>m.value=e,loading:m.loading,options:m.selectorData,itemHeight:t.itemHeight+("small"===f.value?0:8),onChange:b,onClear:v,onVisibleChange:h}),{...n.default&&{default:({item:e,index:l,disabled:t})=>n.default({item:e,index:l,disabled:t})},...n.header&&{header:()=>n.header()},...n.footer&&{footer:()=>n.footer()},...n.prefix&&{prefix:()=>n.prefix()},...n.empty&&{empty:()=>n.empty()},...n.tag&&{tag:()=>n.tag()},...n.loading&&{loading:()=>n.loading()},...n.label&&{label:({label:e,value:l})=>n.label({label:e,value:l})}})),a.useExpose(p,{focus:e.computed(()=>y.value?.focus),blur:e.computed(()=>y.value?.blur),selectedLabel:e.computed(()=>y.value?.selectedLabel),loading:e.computed(()=>m.loading),refresh:g,setSelection:e=>b(e),clearSelection:()=>b(null)})}});exports.SelectV2Props=i,exports.default=d,exports.faSelectV2Emits=s,exports.faSelectV2Props=n,exports.selectV2Emits=u;
2
2
  //# sourceMappingURL=selectV2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"selectV2.js","sources":["../../../../../packages/components/selectV2/src/selectV2.tsx"],"sourcesContent":["import { computed, defineComponent, onMounted, reactive, ref, watch } from \"vue\";\nimport { ElSelectV2, tagProps, useAriaProps, useEmptyValuesProps, useGlobalSize, useSizeProp, useTooltipContentProps } from \"element-plus\";\nimport { CircleClose } from \"@element-plus/icons-vue\";\nimport { addUnit, consoleError, definePropType, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"@fast-china/utils\";\nimport { useVModel } from \"@vueuse/core\";\nimport { isArray, isBoolean, isEqual, isNil, isNull, isNumber, isObject, isString } from \"lodash-unified\";\nimport type { ElSelectorOutput } from \"@fast-element-plus/components/select/src/select.type\";\nimport type { PagedInput, PagedResult } from \"@fast-element-plus/components/table\";\nimport type { Options, Placement, PopperEffect } from \"element-plus\";\nimport type { Component, VNode } from \"vue\";\nimport { selectV2Emits } from \"element-plus/es/components/select-v2/src/defaults.mjs\";\n\ntype Props = {\n\tlabel?: string;\n\tvalue?: string;\n\tdisabled?: string;\n\toptions?: string;\n};\n\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<PopperEffect | 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/**\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,\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<any[] | string | number | boolean | Record<string, any> | any>([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,\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, any>\n\t\t\t\t| (Record<string, any> & {\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/**\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/**\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/**\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...useEmptyValuesProps,\n\t...useAriaProps([\"ariaLabel\"]),\n};\n\nexport type SelectComponentProps = {\n\t/** @description 指定标签为节点的某个属性值 */\n\tlabel?: string | ((data: any) => string);\n\t/** @description 指定是否隐藏为节点的某个属性值 */\n\thide?: string | ((data: any) => boolean);\n\t/** @description 指定是否禁用为节点的某个属性值 */\n\tdisabled?: string | ((data: any) => boolean);\n\t/** @description 指定子节点对象为节点的某个属性值 */\n\tchildren?: string;\n};\n\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<string | number | boolean | object | (string | number | boolean | object)[]>([String, Number, Boolean, Object, Array]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: definePropType<string | string[]>([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?: any) => Promise<ElSelectorOutput[]>) | ((params?: PagedInput) => Promise<PagedResult<ElSelectorOutput>>)>(\n\t\t\tFunction\n\t\t),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | any>([String, Number, Object]),\n};\n\nexport const faSelectV2Emits = {\n\t...selectV2Emits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string | number | boolean | object | (string | number | boolean | object)[]): 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[]): boolean => isString(value) || isArray(value) || isNull(value),\n\t/** @description 数据改变 */\n\tdataChangeCallBack: (data: ElSelectorOutput[] | any[]): boolean => isArray(data),\n\t/** @description 改变 */\n\tchange: (\n\t\tdata: ElSelectorOutput | ElSelectorOutput[] | any | any[],\n\t\tvalue?: string | number | boolean | object | (string | number | boolean | object)[]\n\t): boolean => true,\n};\n\ntype FaSelectV2Slots = {\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, { attrs, slots, emit, expose }) {\n\t\tconst selectedLabel = useVModel(props, \"label\", emit);\n\t\tconst _globalSize = useGlobalSize();\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<string | number | boolean | object | (string | number | boolean | object)[]>(),\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\n\t\tconst loadData = async (): Promise<void> => {\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\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\tconsoleError(\"FaSelect\", error);\n\t\t\t\t\tstate.selectorData = [];\n\t\t\t\t} finally {\n\t\t\t\t\tstate.loading = false;\n\t\t\t\t}\n\t\t\t} else {\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?: string | number | boolean | object | (string | number | boolean | object)[]): void => {\n\t\t\t// 判断是否为多选\n\t\t\tif (props.multiple) {\n\t\t\t\t// value 必然是数组\n\t\t\t\tconst valueArr = value as (string | number | boolean | object)[];\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((f) => valueArr.includes(f.value));\n\t\t\t\tstate.value = value;\n\t\t\t\tselectedLabel.value = dataList.map((m) => m.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;\n\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\temit(\"change\", data, 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 (!isArray(newValue)) {\n\t\t\t\t\t\t\tconsoleError(\"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\tconsoleError(\"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\tvalue: item,\n\t\t\t\t\t\t\t\tlabel: hasLabel ? props.label[index] : undefined,\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (isArray(newValue)) {\n\t\t\t\t\t\t\tconsoleError(\"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\tconsoleError(\"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: props.label,\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\tif (state.selectorData.length > 0) {\n\t\t\t\t\thandleChange(props.multiple ? [state.selectorData[0].value] : state.selectorData[0].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\tasync () => {\n\t\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\t\tawait 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-dropdown__more-detail fa-select-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: addUnit(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\tonVisibleChange={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\tloading: computed(() => state.loading),\n\t\t\t/** @description 刷新 */\n\t\t\trefresh: loadData,\n\t\t\t/** @description 设置选择 */\n\t\t\tsetSelection: (value: string | number | boolean | object | (string | number | boolean | object)[]) => handleChange(value),\n\t\t\t/** @description 清除选择 */\n\t\t\tclearSelection: () => handleChange(null),\n\t\t});\n\t},\n});\n"],"names":["SelectV2Props","allowCreate","Boolean","autocomplete","type","definePropType","String","default","automaticDropdown","clearable","clearIcon","Object","Function","CircleClose","effect","collapseTags","collapseTagsTooltip","maxCollapseTags","Number","defaultFirstOption","disabled","estimatedOptionHeight","undefined","filterable","filterMethod","height","itemHeight","id","loading","loadingText","modelValue","Array","multiple","multipleLimit","name","noDataText","noMatchText","remoteMethod","reserveKeyword","options","placeholder","teleported","useTooltipContentProps","persistent","popperClass","popperOptions","remote","size","useSizeProp","props","label","value","valueKey","scrollbarAlwaysOn","validateEvent","offset","showArrow","placement","fallbackPlacements","tagType","tagProps","tagEffect","tabindex","appendTo","useEmptyValuesProps","useAriaProps","faSelectV2Props","width","moreDetail","lazy","defaultSelected","data","pageResult","requestApi","initParam","faSelectV2Emits","selectV2Emits","isString","isNumber","isBoolean","isObject","isArray","isNull","dataChangeCallBack","change","SelectV2","emits","slots","makeSlots","setup","attrs","emit","expose","selectedLabel","useVModel","_globalSize","useGlobalSize","state","reactive","withDefineType","selectorData","debut","echo","length","nextRefresh","selectV2Ref","ref","loadData","async","params","resData","rows","error","consoleError","handleChange","valueArr","dataList","filter","includes","f","map","m","isNil","find","handleClear","handleVisibleChange","visible","watch","newValue","hasLabel","slice","item","index","immediate","onMounted","oldValue","isEqual","deep","elSelectV2Props","useProps","elSelectV2Emits","useEmits","elPopperClass","computed","localClass","useRender","_createVNode","ElSelectV2","_mergeProps","class","style","addUnit","$event","onChange","onClear","onVisibleChange","header","footer","prefix","empty","tag","useExpose","focus","blur","refresh","setSelection","clearSelection"],"mappings":"mbAmBaA,EAAgB,CAI5BC,YAAaC,QAIbC,aAAc,CACbC,KAAMC,EAAAA,eAAoDC,QAC1DC,QAAS,QAKVC,kBAAmBN,QAInBO,UAAWP,QAIXQ,UAAW,CACVN,KAAMC,EAAAA,eAAmC,CAACC,OAAQK,OAAQC,WAC1DL,QAASM,EAAAA,aAKVC,OAAQ,CACPV,KAAMC,EAAAA,eAAsCC,QAC5CC,QAAS,SAKVQ,aAAcb,QAIdc,oBAAqBd,QAIrBe,gBAAiB,CAChBb,KAAMc,OACNX,QAAS,GAKVY,mBAAoBjB,QAIpBkB,SAAUlB,QAIVmB,sBAAuB,CACtBjB,KAAMc,OACNX,aAASe,GAKVC,WAAYrB,QAIZsB,aAAcZ,SAIda,OAAQ,CACPrB,KAAMc,OACNX,QAAS,KAKVmB,WAAY,CACXtB,KAAMc,OACNX,QAAS,IAKVoB,GAAIrB,OAIJsB,QAAS1B,QAIT2B,YAAavB,OAIbwB,WAAY,CACX1B,KAAMC,EAAAA,eAA8E,CAAC0B,MAAOzB,OAAQY,OAAQhB,QAASS,UAKtHqB,SAAU9B,QAIV+B,cAAe,CACd7B,KAAMc,OACNX,QAAS,GAKV2B,KAAM5B,OAIN6B,WAAY7B,OAIZ8B,YAAa9B,OAIb+B,aAAczB,SAId0B,eAAgB,CACflC,KAAMF,QACNK,SAAS,GAKVgC,QAAS,CACRnC,KAAMC,EAAAA,eAOJ0B,QAMHS,YAAa,CACZpC,KAAME,QAKPmC,WAAYC,EAAAA,uBAAuBD,WAInCE,WAAY,CACXvC,KAAMF,QACNK,SAAS,GAKVqC,YAAa,CACZxC,KAAME,OACNC,QAAS,IAKVsC,cAAe,CACdzC,KAAMC,EAAAA,eA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EAAMrC,MAAM,CAAEA,QAAOC,cAMnB8G,EAAAA,UAAUrE,EAAQ,CAExBsE,MAAOnB,EAAAA,SAAS,IAAMtC,EAAYtD,OAAO+G,OAEzCC,KAAMpB,EAAAA,SAAS,IAAMtC,EAAYtD,OAAOgH,MAExCtE,cAAekD,EAAAA,SAAS,IAAMtC,EAAYtD,OAAO0C,eAEjDjE,QAASmH,EAAAA,SAAS,IAAM9C,EAAMrE,SAE9BwI,QAASzD,EAET0D,aAAelH,GAAuF+D,EAAa/D,GAEnHmH,eAAgBA,IAAMpD,EAAa,OAErC"}
1
+ {"version":3,"file":"selectV2.js","sources":["../../../../../packages/components/selectV2/src/selectV2.tsx"],"sourcesContent":["import { computed, defineComponent, onMounted, reactive, ref, watch } from \"vue\";\nimport { ElSelectV2, tagProps, useAriaProps, useEmptyValuesProps, useGlobalSize, useSizeProp, useTooltipContentProps } from \"element-plus\";\nimport { CircleClose } from \"@element-plus/icons-vue\";\nimport { addUnit, consoleError, definePropType, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"@fast-china/utils\";\nimport { useVModel } from \"@vueuse/core\";\nimport { isArray, isBoolean, isEqual, isNil, isNull, isNumber, isObject, isString } from \"lodash-unified\";\nimport type { ElSelectorOutput } from \"@fast-element-plus/components/select/src/select.type\";\nimport type { PagedInput, PagedResult } from \"@fast-element-plus/components/table\";\nimport type { Options, Placement, PopperEffect } from \"element-plus\";\nimport type { Component, VNode } from \"vue\";\n\ntype Props = {\n\tlabel?: string;\n\tvalue?: string;\n\tdisabled?: string;\n\toptions?: string;\n};\n\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<PopperEffect | 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/**\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,\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<any[] | string | number | boolean | Record<string, any> | any>([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,\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, any>\n\t\t\t\t| (Record<string, any> & {\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/**\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/**\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/**\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...useEmptyValuesProps,\n\t...useAriaProps([\"ariaLabel\"]),\n};\n\nexport const selectV2Emits = {\n\t\"update:modelValue\": (value: string | number | boolean | object | (string | number | boolean | object)[]): boolean => true,\n\tchange: (val: string | number | boolean | object | (string | number | boolean | object)[]): boolean => true,\n\t\"remove-tag\": (val: unknown): boolean => true,\n\t\"visible-change\": (visible: boolean): boolean => true,\n\tfocus: (evt: FocusEvent): boolean => true,\n\tblur: (evt: FocusEvent): boolean => true,\n\tclear: (): boolean => true,\n};\n\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<string | number | boolean | object | (string | number | boolean | object)[]>([String, Number, Boolean, Object, Array]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: definePropType<string | string[]>([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?: any) => Promise<ElSelectorOutput[]>) | ((params?: PagedInput) => Promise<PagedResult<ElSelectorOutput>>)>(\n\t\t\tFunction\n\t\t),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | any>([String, Number, Object]),\n};\n\nexport const faSelectV2Emits = {\n\t...selectV2Emits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string | number | boolean | object | (string | number | boolean | object)[]): 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[]): boolean => isString(value) || isArray(value) || isNull(value),\n\t/** @description 数据改变 */\n\tdataChangeCallBack: (data: ElSelectorOutput[] | any[]): boolean => isArray(data),\n\t/** @description 改变 */\n\tchange: (\n\t\tdata: ElSelectorOutput | ElSelectorOutput[] | any | any[],\n\t\tvalue?: string | number | boolean | object | (string | number | boolean | object)[]\n\t): boolean => true,\n};\n\ntype FaSelectV2Slots = {\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, { attrs, slots, emit, expose }) {\n\t\tconst selectedLabel = useVModel(props, \"label\", emit);\n\t\tconst _globalSize = useGlobalSize();\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<string | number | boolean | object | (string | number | boolean | object)[]>(),\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\n\t\tconst loadData = async (): Promise<void> => {\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\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\tconsoleError(\"FaSelect\", error);\n\t\t\t\t\tstate.selectorData = [];\n\t\t\t\t} finally {\n\t\t\t\t\tstate.loading = false;\n\t\t\t\t}\n\t\t\t} else {\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?: string | number | boolean | object | (string | number | boolean | object)[]): void => {\n\t\t\t// 判断是否为多选\n\t\t\tif (props.multiple) {\n\t\t\t\t// value 必然是数组\n\t\t\t\tconst valueArr = value as (string | number | boolean | object)[];\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((f) => valueArr.includes(f.value));\n\t\t\t\tstate.value = value;\n\t\t\t\tselectedLabel.value = dataList.map((m) => m.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;\n\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\temit(\"change\", data, 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 (!isArray(newValue)) {\n\t\t\t\t\t\t\tconsoleError(\"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\tconsoleError(\"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\tvalue: item,\n\t\t\t\t\t\t\t\tlabel: hasLabel ? props.label[index] : undefined,\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (isArray(newValue)) {\n\t\t\t\t\t\t\tconsoleError(\"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\tconsoleError(\"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: props.label,\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\tif (state.selectorData.length > 0) {\n\t\t\t\t\thandleChange(props.multiple ? [state.selectorData[0].value] : state.selectorData[0].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\tasync () => {\n\t\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\t\tawait 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-dropdown__more-detail fa-select-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: addUnit(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\tonVisibleChange={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\tloading: computed(() => state.loading),\n\t\t\t/** @description 刷新 */\n\t\t\trefresh: loadData,\n\t\t\t/** @description 设置选择 */\n\t\t\tsetSelection: (value: string | number | boolean | object | (string | number | boolean | object)[]) => handleChange(value),\n\t\t\t/** @description 清除选择 */\n\t\t\tclearSelection: () => handleChange(null),\n\t\t});\n\t},\n});\n"],"names":["SelectV2Props","allowCreate","Boolean","autocomplete","type","definePropType","String","default","automaticDropdown","clearable","clearIcon","Object","Function","CircleClose","effect","collapseTags","collapseTagsTooltip","maxCollapseTags","Number","defaultFirstOption","disabled","estimatedOptionHeight","undefined","filterable","filterMethod","height","itemHeight","id","loading","loadingText","modelValue","Array","multiple","multipleLimit","name","noDataText","noMatchText","remoteMethod","reserveKeyword","options","placeholder","teleported","useTooltipContentProps","persistent","popperClass","popperOptions","remote","size","useSizeProp","props","label","value","valueKey","scrollbarAlwaysOn","validateEvent","offset","showArrow","placement","fallbackPlacements","tagType","tagProps","tagEffect","tabindex","appendTo","useEmptyValuesProps","useAriaProps","selectV2Emits","change","val","visible","focus","evt","blur","clear","faSelectV2Props","width","moreDetail","lazy","defaultSelected","data","pageResult","requestApi","initParam","faSelectV2Emits","isString","isNumber","isBoolean","isObject","isArray","isNull","dataChangeCallBack","SelectV2","emits","slots","makeSlots","setup","attrs","emit","expose","selectedLabel","useVModel","_globalSize","useGlobalSize","state","reactive","withDefineType","selectorData","debut","echo","length","nextRefresh","selectV2Ref","ref","loadData","async","params","resData","rows","error","consoleError","handleChange","valueArr","dataList","filter","includes","f","map","m","isNil","find","handleClear","handleVisibleChange","watch","newValue","hasLabel","slice","item","index","immediate","onMounted","oldValue","isEqual","deep","elSelectV2Props","useProps","elSelectV2Emits","useEmits","elPopperClass","computed","localClass","useRender","_createVNode","ElSelectV2","_mergeProps","class","style","addUnit","$event","onChange","onClear","onVisibleChange","header","footer","prefix","empty","tag","useExpose","refresh","setSelection","clearSelection"],"mappings":"uRAkBaA,EAAgB,CAI5BC,YAAaC,QAIbC,aAAc,CACbC,KAAMC,EAAAA,eAAoDC,QAC1DC,QAAS,QAKVC,kBAAmBN,QAInBO,UAAWP,QAIXQ,UAAW,CACVN,KAAMC,EAAAA,eAAmC,CAACC,OAAQK,OAAQC,WAC1DL,QAASM,EAAAA,aAKVC,OAAQ,CACPV,KAAMC,EAAAA,eAAsCC,QAC5CC,QAAS,SAKVQ,aAAcb,QAIdc,oBAAqBd,QAIrBe,gBAAiB,CAChBb,KAAMc,OACNX,QAAS,GAKVY,mBAAoBjB,QAIpBkB,SAAUlB,QAIVmB,sBAAuB,CACtBjB,KAAMc,OACNX,aAASe,GAKVC,WAAYrB,QAIZsB,aAAcZ,SAIda,OAAQ,CACPrB,KAAMc,OACNX,QAAS,KAKVmB,WAAY,CACXtB,KAAMc,OACNX,QAAS,IAKVoB,GAAIrB,OAIJsB,QAAS1B,QAIT2B,YAAavB,OAIbwB,WAAY,CACX1B,KAAMC,EAAAA,eAA8E,CAAC0B,MAAOzB,OAAQY,OAAQhB,QAASS,UAKtHqB,SAAU9B,QAIV+B,cAAe,CACd7B,KAAMc,OACNX,QAAS,GAKV2B,KAAM5B,OAIN6B,WAAY7B,OAIZ8B,YAAa9B,OAIb+B,aAAczB,SAId0B,eAAgB,CACflC,KAAMF,QACNK,SAAS,GAKVgC,QAAS,CACRnC,KAAMC,EAAAA,eAOJ0B,QAMHS,YAAa,CACZpC,KAAME,QAKPmC,WAAYC,EAAAA,uBAAuBD,WAInCE,WAAY,CACXvC,KAAMF,QACNK,SAAS,GAKVqC,YAAa,CACZxC,KAAME,OACNC,QAAS,IAKVsC,cAAe,CACdzC,KAAMC,EAAAA,eAAiCM,QACvCJ,QAASA,M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E,EAAMwE,UACzCxE,EAAMjE,SAAW,CAAEA,QAASA,IAAeiE,EAAMjE,cACjDiE,EAAM3C,OAAS,CAClBA,MAAOA,EAAGA,QAAOC,WAChB0C,EAAM3C,MAAM,CAAEA,QAAOC,cAMnBmH,EAAAA,UAAUpE,EAAQ,CAExB5B,MAAO8E,EAAAA,SAAS,IAAMrC,EAAY5D,OAAOmB,OAEzCE,KAAM4E,EAAAA,SAAS,IAAMrC,EAAY5D,OAAOqB,MAExC2B,cAAeiD,EAAAA,SAAS,IAAMrC,EAAY5D,OAAOgD,eAEjDvE,QAASwH,EAAAA,SAAS,IAAM7C,EAAM3E,SAE9B2I,QAAStD,EAETuD,aAAerH,GAAuFqE,EAAarE,GAEnHsH,eAAgBA,IAAMjD,EAAa,OAErC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("element-plus"),a=require("@element-plus/icons-vue"),l=require("@fast-element-plus/icons-vue"),o=require("@fast-china/utils"),n=require("lodash-unified"),i=require("./table.type.js"),r=require("./tableColumn.js"),c=require("./tableColumnSettingDialog.js"),s=require("./tablePagination.js"),d=require("./tableSearchForm.js"),u=require("./useTable.js");const m={data:{type:Array,default:()=>[]},size:t.useSizeProp,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children",checkStrictly:!1})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:[Boolean,Object],scrollbarTabindex:{type:[Number,String],default:void 0}},p={...m,border:{type:Boolean,default:!0},highlightCurrentRow:{type:Boolean,default:!0},rowKey:{type:[String,Function],default:"id"},spanMethod:{type:Function,validator:()=>(o.consoleWarn("FaTable","'spanMethod' 属性,组件已经封装,外部使用会失效。"),!1)},tableKey:{type:String,default:()=>o.stringUtil.generateRandomString(8)},data:{type:o.definePropType(Array),default:()=>[]},requestApi:{type:o.definePropType(Function)},dataCallback:{type:o.definePropType(Function)},initParam:o.definePropType([String,Number,Object]),columns:{type:o.definePropType([Array,Boolean]),default:()=>!1},columnsChange:{type:o.definePropType(Function)},searchFormCols:{type:o.definePropType([String,Number,Object]),default:()=>({xs:3,sm:3,md:4,lg:5,xl:6})},collapsedSearch:{type:Boolean,default:!0},advancedSearchDrawer:{type:Boolean,default:!1},searchForm:{type:Boolean,default:!0},headerCard:{type:Boolean,default:!0},refreshBtn:{type:Boolean,default:!0},searchBtn:{type:Boolean,default:!0},columnSettingBtn:{type:Boolean,default:!1},toolBtn:{type:Boolean,default:!0},hideSearchTime:Boolean,dataSearchRange:{type:o.definePropType(String),default:"Past3D"},pagination:{type:Boolean,default:!0},hideImage:Boolean,single:Boolean,rowClickSelection:Boolean,treeData:Boolean,props:{type:o.definePropType(Object),default:()=>({span:void 0,children:"children"})},autoRefresh:{type:Boolean,default:!0},rowSelectable:Function},h={select:(e,t)=>n.isArray(e)&&n.isObject(t),selectAll:e=>n.isArray(e),selectionChange:e=>n.isArray(e),cellMouseEnter:(e,t,a,l)=>n.isObject(e)&&n.isObject(t)&&a instanceof HTMLTableCellElement&&l instanceof Event,cellMouseLeave:(e,t,a,l)=>n.isObject(e)&&n.isObject(t)&&a instanceof HTMLTableCellElement&&l instanceof Event,cellClick:(e,t,a,l)=>n.isObject(e)&&n.isObject(t)&&a instanceof HTMLTableCellElement&&l instanceof Event,cellDblclick:(e,t,a,l)=>n.isObject(e)&&n.isObject(t)&&a instanceof HTMLTableCellElement&&l instanceof Event,cellContextmenu:(e,t,a,l)=>n.isObject(e)&&n.isObject(t)&&a instanceof HTMLTableCellElement&&l instanceof Event,rowClick:(e,t,a)=>n.isObject(e)&&n.isObject(t)&&a instanceof Event,rowContextmenu:(e,t,a)=>n.isObject(e)&&n.isObject(t)&&a instanceof Event,rowDblclick:(e,t,a)=>n.isObject(e)&&n.isObject(t)&&a instanceof Event,headerClick:(e,t)=>n.isObject(e)&&t instanceof Event,headerContextmenu:(e,t)=>n.isObject(e)&&t instanceof Event,sortChange:e=>n.isObject(e),filterChange:e=>n.isString(e)||n.isNumber(e)||n.isBoolean(e)||n.isObject(e),currentChange:(e,t)=>n.isObject(e)&&(n.isNull(t)||n.isObject(t)),headerDragend:(e,t,a,l)=>n.isNumber(e)&&n.isNumber(t)&&n.isObject(a)&&l instanceof MouseEvent,expandChange:(e,t)=>n.isObject(e)&&(n.isBoolean(t)||n.isArray(t)),refresh:e=>n.isObject(e),reset:e=>n.isObject(e),sizeChange:e=>n.isNumber(e),paginationChange:(e,t)=>n.isNumber(e)&&n.isNumber(t),customCellClick:(e,{row:t,column:a,$index:l})=>(n.isNil(e)||n.isString(e))&&n.isObject(t)&&n.isObject(a)&&n.isNumber(l)},g=e.defineComponent({name:"FaTable",props:p,emits:h,slots:o.makeSlots(),setup(p,{attrs:h,slots:g,emit:b,expose:f}){const{_globalSize:C,state:S,elementRef:w,tableRef:y,handleTableColumnAutoWidth:_,loadTableColumns:v,handleSizeChange:N,handlePaginationChange:x,defaultSearchTime:P,tableSearch:O,tableReset:T,doRender:V,doLoading:E,handleCustomCellClick:j}=u.useTable(p,g,b),I=e.ref();let F=0;const B=e=>{if(0===e&&(F=0),S.spanColumns?.length>0){return 0===Number(S.tableSpanData["__table-index"][e])?F+(S.tablePagination.pageIndex-1)*S.tablePagination.pageSize+1:(F++,F+(S.tablePagination.pageIndex-1)*S.tablePagination.pageSize)}return e+(S.tablePagination.pageIndex-1)*S.tablePagination.pageSize+1},D=(e,t)=>{p.single&&(y.value.clearSelection(),e.length>0&&t&&y.value.toggleRowSelection(t)),b("select",e,t)},L=e=>{p.single&&(S.selected?S.tableData.length>0&&(y.value.clearSelection(),y.value.toggleRowSelection(S.tableData[0])):y.value.clearSelection()),b("selectAll",e)},R=e=>{0===e.length?S.selected=!1:S.selected=!0,p.single&&e.length>0?S.selectedList=[e[e.length-1]]:S.selectedList=e,S.indeterminateSelectedListIds=S.indeterminateSelectedListIds.filter(e=>S.selectedListIds.some(t=>t===e)),b("selectionChange",S.selectedList)},k=({column:e,prop:t,order:a})=>{e.multiOrder?"descending"===e.multiOrder?e.multiOrder="ascending":e.multiOrder=null:e.multiOrder="descending",S.searchParam.sortList=[...new Set([...p.initParam?.sortList??[],...S.searchParam?.sortList??[]])];const l=S.orgColumns.find(e=>e.prop===t),o=l?.sortableField??l?.prop??e.property,n=S.searchParam.sortList.findIndex(e=>e.enField===o);e.multiOrder?-1===n?S.searchParam.sortList.push({enField:o,cnField:e.label,mode:e.multiOrder}):S.searchParam.sortList[n].mode=e.multiOrder:S.searchParam.sortList.splice(n,1),0===S.searchParam.sortList.length&&delete S.searchParam.sortList,b("sortChange",{column:e,prop:t,order:e.multiOrder}),O()},M=(e,t)=>{e&&(p.rowClickSelection&&(p.single&&t&&y.value.toggleRowSelection(t),y.value.toggleRowSelection(e)),b("currentChange",e,t))},A=({row:e,column:t,rowIndex:a,columnIndex:l})=>{let o=null;if("selection"===t.type){const t=n.isFunction(p.rowKey)?p.rowKey(e):e[p.rowKey];S.indeterminateSelectedListIds.some(e=>e===t)&&(o="fa-table__selection-column__indeterminate")}const i=S.tableColumns.find(e=>e.prop===t.property);if(i?.dataDeleteField&&e&&!0===e[i.dataDeleteField]&&(o?o+=" fa-table__data-delete-column":o="fa-table__data-delete-column"),p.cellClassName){let i=null;return i=n.isString(p.cellClassName)?p.cellClassName:p.cellClassName({row:e,column:t,rowIndex:a,columnIndex:l}),i?o?`${o} ${i}`:i:o}return o},z=({row:e,column:t,rowIndex:a,columnIndex:l})=>(t.order=t.multiOrder,p.headerCellClassName?n.isFunction(p.headerCellClassName)?p.headerCellClassName({row:e,column:t,rowIndex:a,columnIndex:l}):p.headerCellClassName:null),K=({row:e,column:t,rowIndex:a,columnIndex:l})=>{const o=t.property??t.columnKey;if(-1!==S.spanColumns.findIndex(e=>e.prop===o)){const e=Number(S.tableSpanData[o][a]);return e>0?{rowspan:e,colspan:1}:{rowspan:0,colspan:0}}return{rowspan:1,colspan:1}},H=async(e,t,a,l)=>{S.orgColumns.forEach(t=>{a.property===t.prop&&(t.width=e,t.smallWidth=e)}),b("headerDragend",e,t,a,l),p.columnsChange&&await o.clickUtil.debounceAsync(()=>p.columnsChange(S.orgColumns),500)},q=e=>{S.previewList=[e],S.imagePreview=!0};e.onMounted(async()=>{S.initParam=p.initParam,P(),Object.keys(p.initParam??{}).forEach(e=>{S.searchParam[e]=p.initParam[e]}),await O(),e.watch(()=>p.columns,async()=>{v()},{deep:!0,immediate:!0}),e.watch(()=>p.initParam,()=>{Object.keys(p.initParam??{}).forEach(e=>{S.searchParam[e]=p.initParam[e]})},{deep:!0}),e.watch(()=>p.data,async()=>{!p.requestApi&&p.autoRefresh&&await O()},{deep:!0,immediate:!0}),e.watchEffect(async()=>{const e=w.value;if(e){const t=new ResizeObserver(e=>{for(const t of e){const{width:e,height:a}=t.contentRect;S.tableWidth=e,S.tableHeight=a}o.clickUtil.debounceAsync(async()=>{await _()},100)});return t.observe(e),()=>{t.disconnect()}}})}),e.onActivated(async()=>{await _()});const $=e.computed(()=>S.searchColumns.filter(e=>e.search.slot).map(e=>e.search.slot)),U=e.computed(()=>S.tableColumns.filter(e=>e.slot).map(e=>e.slot)),W=["multiOrder","columnId","order","sortableField","disabledSortable","spanProp","pureSearch","search"],Y=o.useProps(p,m,["data","spanMethod","headerCellClassName","cellClassName"]);return o.useRender(()=>e.createVNode("div",{ref:w,class:["fa-table",`fa-table-${C.value}`,`fa-table__${p.tableKey??"notFound"}`,{fa__click__disabled:S.loading}],style:{"--fa-table-width":""+(S.tableWidth?`${S.tableWidth}px`:""),"--fa-table-height":""+(S.tableHeight?`${S.tableHeight}px`:"")}},[e.createVNode(d.default,{show:p.searchForm&&S.searchForm,collapsedSearch:p.collapsedSearch,advancedSearchDrawer:p.advancedSearchDrawer,cols:p.searchFormCols,search:O,reset:T},n.pick(g,$.value)),g.topHeader&&e.createVNode("div",{class:"el-card fa-table__header"},[g.topHeader({search:O,...i.getTableDefaultSlots(S)})]),e.createVNode("div",{class:"el-card fa-table__main"},[p.headerCard&&e.createVNode("div",{class:"fa-table__main-header"},[e.createVNode("div",{class:"fa-table__main-header-left"},[g.header&&g.header({search:O,...i.getTableDefaultSlots(S)})]),e.createVNode("div",{class:"fa-table__main-header-right"},[p.toolBtn&&e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"fa-table__main-header-right__div-search"},[e.createVNode(t.ElInput,{class:"fa-table__main-header-right__input-search",disabled:S.loading,prefixIcon:a.Search,placeholder:"关键字搜索",modelValue:S.searchParam.searchValue,modelModifiers:{trim:!0},"onUpdate:modelValue":e=>S.searchParam.searchValue=e,clearable:!0,onCompositionupdate:e=>{S.searchValueUpdate=e.data},onCompositionend:e=>{S.searchValueUpdate=""},onChange:()=>O()},null),e.createVNode("div",{class:"fa-table__main-header-right__div-search__hidden"},[S.searchParam.searchValue,S.searchValueUpdate])]),p.requestApi&&!p.hideSearchTime&&e.createVNode(t.ElDatePicker,{class:"fa-table__main-header-right__data-search",popperClass:"fa-table__main-header-right__data-search__popper",disabled:S.loading,type:"daterange",modelValue:S.searchParam.searchTimeList,"onUpdate:modelValue":e=>S.searchParam.searchTimeList=e,defaultTime:o.dateUtil.getDefaultTime(),shortcuts:o.dateUtil.getShortcuts(),valueFormat:"YYYY-MM-DD HH:mm:ss",disabledDate:o.dateUtil.getDisabledDate,clearable:!1,teleported:!1,unlinkPanels:!0,onChange:()=>O()},null),p.refreshBtn&&e.createVNode(t.ElButton,{loading:S.loading,loadingIcon:a.Eleme,title:"刷新",circle:!0,icon:a.Refresh,onClick:()=>O()},null),p.searchBtn&&S.searchColumns.length>0&&e.createVNode(t.ElButton,{loading:S.loading,loadingIcon:a.Eleme,title:S.searchForm?"隐藏搜索栏":"显示搜索栏",circle:!0,icon:a.Search,onClick:()=>S.searchForm=!S.searchForm},null),p.columnSettingBtn&&p.columns&&e.createVNode(t.ElDropdown,{title:"表格列配置",trigger:"click"},{default:()=>e.createVNode(t.ElButton,{loading:S.loading,loadingIcon:a.Eleme,circle:!0,icon:a.Setting},null),dropdown:()=>e.createVNode(t.ElDropdownMenu,null,{default:()=>[g.columnSetting&&g.columnSetting(),e.createVNode(t.ElDropdownItem,{title:"表格列配置",divided:!0,onClick:()=>I.value.open()},{default:()=>[e.createTextVNode("表格列配置")]})]})}),g.toolButton&&g.toolButton({search:O,...i.getTableDefaultSlots(S)}),g.toolButtonAdv&&e.createVNode(t.ElDropdown,{title:"高级操作",trigger:"click"},{default:()=>e.createVNode(t.ElButton,{loading:S.loading,loadingIcon:a.Eleme,circle:!0,icon:a.More},null),dropdown:()=>{let a;return e.createVNode(t.ElDropdownMenu,null,"function"==typeof(l=a=g.toolButtonAdv({search:O,...i.getTableDefaultSlots(S)}))||"[object Object]"===Object.prototype.toString.call(l)&&!e.isVNode(l)?a:{default:()=>[a]});var l}})])])]),e.withDirectives(e.createVNode(t.ElTable,e.mergeProps(Y.value,{ref:y,"element-loading-text":S.loadingText,data:S.tableData,spanMethod:K,headerCellClassName:z,cellClassName:A,onSelectionChange:R,onSortChange:k,onSelect:D,onSelectAll:L,onCurrentChange:M,onHeaderDragend:H,onCellMouseEnter:(e,t,a,l)=>b("cellMouseEnter",e,t,a,l),onCellMouseLeave:(e,t,a,l)=>b("cellMouseLeave",e,t,a,l),onCellClick:(e,t,a,l)=>b("cellClick",e,t,a,l),onCellDblclick:(e,t,a,l)=>b("cellDblclick",e,t,a,l),onCellContextmenu:(e,t,a,l)=>b("cellContextmenu",e,t,a,l),onRowClick:(e,t,a)=>b("rowClick",e,t,a),onRowContextmenu:(e,t,a)=>b("rowContextmenu",e,t,a),onRowDblclick:(e,t,a)=>b("rowDblclick",e,t,a),onHeaderClick:(e,t)=>b("headerClick",e,t),onHeaderContextmenu:(e,t)=>b("headerContextmenu",e,t),onFilterChange:e=>b("filterChange",e),onExpandChange:(e,t)=>b("expandChange",e,t)}),{append:()=>g.append&&g.append(),empty:()=>e.createVNode("div",{class:"fa-table__empty"},[g.empty?g.empty():e.createVNode(e.Fragment,null,[e.createVNode(t.ElIcon,null,{default:()=>[e.createVNode(l.NotData,null,null)]}),e.createVNode("div",null,[e.createTextVNode("暂无数据")])])]),default:()=>e.createVNode(e.Fragment,null,[e.createVNode(t.ElTableColumn,{className:"fa-table__index-column",type:"index",fixed:"left",width:S.tablePagination.pageIndex*S.tablePagination.pageSize>=100?S.tablePagination.pageIndex*S.tablePagination.pageSize>=1e3?50:40:30,align:"center",index:B,showOverflowTooltip:!1,resizable:!1,columnKey:"__table-index"},null),e.createVNode(t.ElTableColumn,{className:"fa-table__selection-column",type:"selection",fixed:"left",width:35,align:"center",reserveSelection:!0,showOverflowTooltip:!1,resizable:!1,columnKey:"__table-selection",selectable:p.rowSelectable},null),g.operation&&e.createVNode(t.ElTableColumn,{fixed:"right",width:S.operationColumnWidth,headerAlign:"center",align:"left",showOverflowTooltip:!1,className:"fa-table__operation-column",resizable:!1,columnKey:"__table-operation"},{header:()=>e.createVNode("div",{class:"fa-table__auto-width-column__cell-header __fa-table__auto-width-column__cell-header____table-operation"},[e.createVNode("span",null,[e.createTextVNode("操作")])]),default:({row:t,column:a,$index:l})=>e.createVNode("div",{class:"fa-table__auto-width-column__cell __fa-table__auto-width-column__cell____table-operation"},[g.operation({row:t,column:a,$index:l,search:O,...i.getTableDefaultSlots(S)})])}),0===S.tableColumns?.length?g.default&&g.default():S.tableColumns.map(a=>a.show&&("expand"===a.type?e.createVNode(t.ElTableColumn,e.mergeProps(a,{width:35,fixed:a.fixed??"left",resizable:!1}),{default:({row:t,column:l,$index:o})=>e.createVNode(e.Fragment,null,[a.render&&a.render({row:t,column:l,$index:o,...i.getTableDefaultSlots(S)}),a.slot&&g[a.slot]&&g[a.slot]({row:t,column:l,$index:o,...i.getTableDefaultSlots(S)})])}):a.prop&&e.createVNode(r.default,e.mergeProps(n.omit(a,W),{hideImage:p.hideImage,resizable:!0,onImagePreview:q,onCustomCellClick:j}),n.pick(g,U.value))))])}),[[e.resolveDirective("loading"),S.loading]]),e.createVNode("div",{class:"fa-table__main-footer"},[e.createVNode("div",{class:"fa-table__main-footer__left"},[g.footer&&g.footer({search:O,...i.getTableDefaultSlots(S)})]),g.pagination?g.pagination({pageIndex:S.tablePagination.pageIndex,pageSize:S.tablePagination.pageSize,totalRows:S.tablePagination.totalRows,handleSizeChange:N,handlePaginationChange:x}):e.createVNode(e.Fragment,null,[p.pagination?e.createVNode(s.default,{onSizeChange:N,onCurrentChange:x},null):e.createVNode(t.ElPagination,{class:"fa-table-pagination",size:"small",layout:"total",total:S.tableData.length},null)])])]),S.imagePreview&&e.createVNode(t.ElImageViewer,{closeOnPressEscape:!0,hideOnClickModal:!0,teleported:!0,onClose:()=>S.imagePreview=!1,urlList:S.previewList},null),p.columnSettingBtn&&e.createVNode(c.default,{ref:I,change:p.columnsChange},null)])),o.useExpose(f,{clearSelection:e.computed(()=>y.value?.clearSelection),getSelectionRows:e.computed(()=>y.value?.getSelectionRows),toggleRowSelection:e.computed(()=>y.value?.toggleRowSelection),toggleAllSelection:e.computed(()=>y.value?.toggleAllSelection),toggleRowExpansion:e.computed(()=>y.value?.toggleRowExpansion),setCurrentRow:e.computed(()=>y.value?.setCurrentRow),clearSort:e.computed(()=>y.value?.clearSort),clearFilter:e.computed(()=>y.value?.clearFilter),doLayout:e.computed(()=>y.value?.doLayout),sort:e.computed(()=>y.value?.sort),scrollTo:e.computed(()=>y.value?.scrollTo),setScrollTop:e.computed(()=>y.value?.setScrollTop),setScrollLeft:e.computed(()=>y.value?.setScrollLeft),columns:e.computed(()=>y.value?.columns),updateKeyChildren:e.computed(()=>y.value?.updateKeyChildren),loading:e.computed(()=>S.loading),tableData:e.computed(()=>S.tableData),tablePagination:e.computed(()=>S.tablePagination),searchParam:e.computed(()=>S.searchParam),selected:e.computed(()=>S.selected),selectedList:e.computed(()=>S.selectedList),selectedListIds:e.computed(()=>S.selectedListIds),indeterminateSelectedListIds:e.computed(()=>S.indeterminateSelectedListIds),tableWidth:e.computed(()=>S.tableWidth),tableHeight:e.computed(()=>S.tableHeight),toggleRowIndeterminateSelection:(e,t)=>{const a=n.isFunction(p.rowKey)?p.rowKey(e):e[p.rowKey],l=S.tableData.find(e=>n.isFunction(p.rowKey)?p.rowKey(e):e[p.rowKey]===a);if(!0===t)S.indeterminateSelectedListIds.some(e=>e===a)||S.indeterminateSelectedListIds.push(a),y.value.toggleRowSelection(l,!0);else if(!1===t){const e=S.indeterminateSelectedListIds.findIndex(e=>e===a);e>=0&&S.indeterminateSelectedListIds.splice(e,1),y.value.toggleRowSelection(l,!1)}else{const e=S.indeterminateSelectedListIds.findIndex(e=>e===a);e>=0?S.indeterminateSelectedListIds.splice(e,1):S.indeterminateSelectedListIds.push(a),y.value.toggleRowSelection(l)}},refresh:O,reset:T,doRender:V,doLoading:E})}});exports.default=g,exports.faTableEmits=h,exports.faTableProps=p,exports.tableProps=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("element-plus"),a=require("@element-plus/icons-vue"),l=require("@fast-element-plus/icons-vue"),o=require("@fast-china/utils"),n=require("lodash-unified"),i=require("./table.type.js"),r=require("./tableColumn.js"),c=require("./tableColumnSettingDialog.js"),s=require("./tablePagination.js"),d=require("./tableSearchForm.js"),u=require("./useTable.js");const m={data:{type:Array,default:()=>[]},size:t.useSizeProp,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children",checkStrictly:!1})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:[Boolean,Object],scrollbarTabindex:{type:[Number,String],default:void 0}},p={...m,border:{type:Boolean,default:!0},highlightCurrentRow:{type:Boolean,default:!0},rowKey:{type:[String,Function],default:"id"},spanMethod:{type:Function,validator:()=>(o.consoleWarn("FaTable","'spanMethod' 属性,组件已经封装,外部使用会失效。"),!1)},tableKey:{type:String,default:()=>o.stringUtil.generateRandomString(8)},data:{type:o.definePropType(Array),default:()=>[]},requestApi:{type:o.definePropType(Function)},dataCallback:{type:o.definePropType(Function)},initParam:o.definePropType([String,Number,Object]),columns:{type:o.definePropType([Array,Boolean]),default:()=>!1},columnsChange:{type:o.definePropType(Function)},searchFormCols:{type:o.definePropType([String,Number,Object]),default:()=>({xs:3,sm:3,md:4,lg:5,xl:6})},collapsedSearch:{type:Boolean,default:!0},advancedSearchDrawer:{type:Boolean,default:!1},searchForm:{type:Boolean,default:!0},headerCard:{type:Boolean,default:!0},refreshBtn:{type:Boolean,default:!0},searchBtn:{type:Boolean,default:!0},columnSettingBtn:{type:Boolean,default:!1},toolBtn:{type:Boolean,default:!0},hideSearchTime:Boolean,dataSearchRange:{type:o.definePropType(String),default:"Past3D"},pagination:{type:Boolean,default:!0},hideImage:Boolean,single:Boolean,rowClickSelection:Boolean,treeData:Boolean,props:{type:o.definePropType(Object),default:()=>({span:void 0,children:"children"})},autoRefresh:{type:Boolean,default:!0},rowSelectable:Function},h={select:(e,t)=>n.isArray(e)&&n.isObject(t),selectAll:e=>n.isArray(e),selectionChange:e=>n.isArray(e),cellMouseEnter:(e,t,a,l)=>n.isObject(e)&&n.isObject(t)&&a instanceof HTMLTableCellElement&&l instanceof Event,cellMouseLeave:(e,t,a,l)=>n.isObject(e)&&n.isObject(t)&&a instanceof HTMLTableCellElement&&l instanceof Event,cellClick:(e,t,a,l)=>n.isObject(e)&&n.isObject(t)&&a instanceof HTMLTableCellElement&&l instanceof Event,cellDblclick:(e,t,a,l)=>n.isObject(e)&&n.isObject(t)&&a instanceof HTMLTableCellElement&&l instanceof Event,cellContextmenu:(e,t,a,l)=>n.isObject(e)&&n.isObject(t)&&a instanceof HTMLTableCellElement&&l instanceof Event,rowClick:(e,t,a)=>n.isObject(e)&&n.isObject(t)&&a instanceof Event,rowContextmenu:(e,t,a)=>n.isObject(e)&&n.isObject(t)&&a instanceof Event,rowDblclick:(e,t,a)=>n.isObject(e)&&n.isObject(t)&&a instanceof Event,headerClick:(e,t)=>n.isObject(e)&&t instanceof Event,headerContextmenu:(e,t)=>n.isObject(e)&&t instanceof Event,sortChange:e=>n.isObject(e),filterChange:e=>n.isString(e)||n.isNumber(e)||n.isBoolean(e)||n.isObject(e),currentChange:(e,t)=>n.isObject(e)&&(n.isNull(t)||n.isObject(t)),headerDragend:(e,t,a,l)=>n.isNumber(e)&&n.isNumber(t)&&n.isObject(a)&&l instanceof MouseEvent,expandChange:(e,t)=>n.isObject(e)&&(n.isBoolean(t)||n.isArray(t)),refresh:e=>n.isObject(e),reset:e=>n.isObject(e),sizeChange:e=>n.isNumber(e),paginationChange:(e,t)=>n.isNumber(e)&&n.isNumber(t),customCellClick:(e,{row:t,column:a,$index:l})=>(n.isNil(e)||n.isString(e))&&n.isObject(t)&&n.isObject(a)&&n.isNumber(l)},g=e.defineComponent({name:"FaTable",props:p,emits:h,slots:o.makeSlots(),setup(p,{attrs:h,slots:g,emit:b,expose:f}){const{_globalSize:C,state:S,elementRef:w,tableRef:y,handleTableColumnAutoWidth:_,loadTableColumns:v,handleSizeChange:N,handlePaginationChange:x,defaultSearchTime:P,tableSearch:O,tableReset:T,doRender:V,doLoading:E,handleCustomCellClick:j}=u.useTable(p,g,b),I=e.ref();let F=0;const B=e=>{if(0===e&&(F=0),S.spanColumns?.length>0){return 0===Number(S.tableSpanData["__table-index"][e])?F+(S.tablePagination.pageIndex-1)*S.tablePagination.pageSize+1:(F++,F+(S.tablePagination.pageIndex-1)*S.tablePagination.pageSize)}return e+(S.tablePagination.pageIndex-1)*S.tablePagination.pageSize+1},L=(e,t)=>{p.single&&(y.value.clearSelection(),e.length>0&&t&&y.value.toggleRowSelection(t)),b("select",e,t)},D=e=>{p.single&&(S.selected?S.tableData.length>0&&(y.value.clearSelection(),y.value.toggleRowSelection(S.tableData[0])):y.value.clearSelection()),b("selectAll",e)},R=e=>{0===e.length?S.selected=!1:S.selected=!0,p.single&&e.length>0?S.selectedList=[e[e.length-1]]:S.selectedList=e,S.indeterminateSelectedListIds=S.indeterminateSelectedListIds.filter(e=>S.selectedListIds.some(t=>t===e)),b("selectionChange",S.selectedList)},k=({column:e,prop:t,order:a})=>{e.multiOrder?"descending"===e.multiOrder?e.multiOrder="ascending":e.multiOrder=null:e.multiOrder="descending",S.searchParam.sortList=[...new Set([...p.initParam?.sortList??[],...S.searchParam?.sortList??[]])];const l=S.orgColumns.find(e=>e.prop===t),o=l?.sortableField??l?.prop??e.property,n=S.searchParam.sortList.findIndex(e=>e.enField===o);e.multiOrder?-1===n?S.searchParam.sortList.push({enField:o,cnField:e.label,mode:e.multiOrder}):S.searchParam.sortList[n].mode=e.multiOrder:S.searchParam.sortList.splice(n,1),0===S.searchParam.sortList.length&&delete S.searchParam.sortList,b("sortChange",{column:e,prop:t,order:e.multiOrder}),O()},M=(e,t)=>{e&&(p.rowClickSelection&&(p.single&&t&&y.value.toggleRowSelection(t),y.value.toggleRowSelection(e)),b("currentChange",e,t))},A=({row:e,column:t,rowIndex:a,columnIndex:l})=>{let o=null;if("selection"===t.type){const t=n.isFunction(p.rowKey)?p.rowKey(e):e[p.rowKey];S.indeterminateSelectedListIds.some(e=>e===t)&&(o="fa-table__selection-column__indeterminate")}const i=S.tableColumns.find(e=>e.prop===t.property);if(i?.dataDeleteField&&e&&!0===e[i.dataDeleteField]&&(o?o+=" fa-table__data-delete-column":o="fa-table__data-delete-column"),p.cellClassName){let i=null;return i=n.isString(p.cellClassName)?p.cellClassName:p.cellClassName({row:e,column:t,rowIndex:a,columnIndex:l}),i?o?`${o} ${i}`:i:o}return o},z=({row:e,column:t,rowIndex:a,columnIndex:l})=>(t.order=t.multiOrder,p.headerCellClassName?n.isFunction(p.headerCellClassName)?p.headerCellClassName({row:e,column:t,rowIndex:a,columnIndex:l}):p.headerCellClassName:null),K=({row:e,column:t,rowIndex:a,columnIndex:l})=>{const o=t.property??t.columnKey;if(-1!==S.spanColumns.findIndex(e=>e.prop===o)){const e=Number(S.tableSpanData[o][a]);return e>0?{rowspan:e,colspan:1}:{rowspan:0,colspan:0}}return{rowspan:1,colspan:1}},H=async(e,t,a,l)=>{S.orgColumns.forEach(t=>{a.property===t.prop&&(t.width=e,t.smallWidth=e)}),b("headerDragend",e,t,a,l),p.columnsChange&&await o.clickUtil.debounceAsync(()=>p.columnsChange(S.orgColumns),500)},q=e=>{S.previewList=[e],S.imagePreview=!0};e.onMounted(async()=>{S.initParam=p.initParam,P(),Object.keys(p.initParam??{}).forEach(e=>{S.searchParam[e]=p.initParam[e]}),await O(),e.watch(()=>p.columns,async()=>{v()},{deep:!0,immediate:!0}),e.watch(()=>p.initParam,()=>{Object.keys(p.initParam??{}).forEach(e=>{S.searchParam[e]=p.initParam[e]})},{deep:!0}),e.watch(()=>p.data,async()=>{!p.requestApi&&p.autoRefresh&&await O()},{deep:!0,immediate:!0}),e.watchEffect(async()=>{const e=w.value;if(e){const t=new ResizeObserver(e=>{for(const t of e){const{width:e,height:a}=t.contentRect;S.tableWidth=e,S.tableHeight=a}o.clickUtil.debounceAsync(async()=>{await _()},100)});return t.observe(e),()=>{t.disconnect()}}})}),e.onActivated(async()=>{await _()});const $=e.computed(()=>S.searchColumns.filter(e=>e.search.slot).map(e=>e.search.slot)),U=e.computed(()=>S.tableColumns.filter(e=>e.slot).map(e=>e.slot)),W=["multiOrder","columnId","order","sortableField","disabledSortable","spanProp","pureSearch","search"],Y=o.useProps(p,m,["data","spanMethod","headerCellClassName","cellClassName"]);return o.useRender(()=>e.createVNode("div",{ref:w,class:["fa-table",`fa-table-${C.value}`,`fa-table__${p.tableKey??"notFound"}`,{fa__click__disabled:S.loading}],style:{"--fa-table-width":""+(S.tableWidth?`${S.tableWidth}px`:""),"--fa-table-height":""+(S.tableHeight?`${S.tableHeight}px`:"")}},[e.createVNode(d.default,{show:p.searchForm&&S.searchForm,collapsedSearch:p.collapsedSearch,advancedSearchDrawer:p.advancedSearchDrawer,cols:p.searchFormCols,search:O,reset:T},n.pick(g,$.value)),g.topHeader&&e.createVNode("div",{class:"el-card fa-table__header"},[g.topHeader({search:O,...i.getTableDefaultSlots(S)})]),e.createVNode("div",{class:"el-card fa-table__main"},[p.headerCard&&e.createVNode("div",{class:"fa-table__main-header"},[e.createVNode("div",{class:"fa-table__main-header-left"},[g.header&&g.header({search:O,...i.getTableDefaultSlots(S)})]),e.createVNode("div",{class:"fa-table__main-header-right"},[p.toolBtn&&e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"fa-table__main-header-right__div-search"},[e.createVNode(t.ElInput,{class:"fa-table__main-header-right__input-search",disabled:S.loading,prefixIcon:a.Search,placeholder:"关键字搜索",modelValue:S.searchParam.searchValue,modelModifiers:{trim:!0},"onUpdate:modelValue":e=>S.searchParam.searchValue=e,clearable:!0,onCompositionupdate:e=>{S.searchValueUpdate=e.data},onCompositionend:e=>{S.searchValueUpdate=""},onChange:()=>O()},null),e.createVNode("div",{class:"fa-table__main-header-right__div-search__hidden"},[S.searchParam.searchValue,S.searchValueUpdate])]),p.requestApi&&!p.hideSearchTime&&e.createVNode(t.ElDatePicker,{class:"fa-table__main-header-right__data-search",popperClass:"fa-table__main-header-right__data-search__popper",disabled:S.loading,type:"daterange",modelValue:S.searchParam.searchTimeList,"onUpdate:modelValue":e=>S.searchParam.searchTimeList=e,defaultTime:o.dateUtil.getDefaultTime(),shortcuts:o.dateUtil.getShortcuts(),valueFormat:"YYYY-MM-DD HH:mm:ss",clearable:!1,teleported:!1,unlinkPanels:!0,onChange:()=>O()},null),p.refreshBtn&&e.createVNode(t.ElButton,{loading:S.loading,loadingIcon:a.Eleme,title:"刷新",circle:!0,icon:a.Refresh,onClick:()=>O()},null),p.searchBtn&&S.searchColumns.length>0&&e.createVNode(t.ElButton,{loading:S.loading,loadingIcon:a.Eleme,title:S.searchForm?"隐藏搜索栏":"显示搜索栏",circle:!0,icon:a.Search,onClick:()=>S.searchForm=!S.searchForm},null),p.columnSettingBtn&&p.columns&&e.createVNode(t.ElDropdown,{title:"表格列配置",trigger:"click"},{default:()=>e.createVNode(t.ElButton,{loading:S.loading,loadingIcon:a.Eleme,circle:!0,icon:a.Setting},null),dropdown:()=>e.createVNode(t.ElDropdownMenu,null,{default:()=>[g.columnSetting&&g.columnSetting(),e.createVNode(t.ElDropdownItem,{title:"表格列配置",divided:!0,onClick:()=>I.value.open()},{default:()=>[e.createTextVNode("表格列配置")]})]})}),g.toolButton&&g.toolButton({search:O,...i.getTableDefaultSlots(S)}),g.toolButtonAdv&&e.createVNode(t.ElDropdown,{title:"高级操作",trigger:"click"},{default:()=>e.createVNode(t.ElButton,{loading:S.loading,loadingIcon:a.Eleme,circle:!0,icon:a.More},null),dropdown:()=>{let a;return e.createVNode(t.ElDropdownMenu,null,"function"==typeof(l=a=g.toolButtonAdv({search:O,...i.getTableDefaultSlots(S)}))||"[object Object]"===Object.prototype.toString.call(l)&&!e.isVNode(l)?a:{default:()=>[a]});var l}})])])]),e.withDirectives(e.createVNode(t.ElTable,e.mergeProps(Y.value,{ref:y,"element-loading-text":S.loadingText,data:S.tableData,spanMethod:K,headerCellClassName:z,cellClassName:A,onSelectionChange:R,onSortChange:k,onSelect:L,onSelectAll:D,onCurrentChange:M,onHeaderDragend:H,onCellMouseEnter:(e,t,a,l)=>b("cellMouseEnter",e,t,a,l),onCellMouseLeave:(e,t,a,l)=>b("cellMouseLeave",e,t,a,l),onCellClick:(e,t,a,l)=>b("cellClick",e,t,a,l),onCellDblclick:(e,t,a,l)=>b("cellDblclick",e,t,a,l),onCellContextmenu:(e,t,a,l)=>b("cellContextmenu",e,t,a,l),onRowClick:(e,t,a)=>b("rowClick",e,t,a),onRowContextmenu:(e,t,a)=>b("rowContextmenu",e,t,a),onRowDblclick:(e,t,a)=>b("rowDblclick",e,t,a),onHeaderClick:(e,t)=>b("headerClick",e,t),onHeaderContextmenu:(e,t)=>b("headerContextmenu",e,t),onFilterChange:e=>b("filterChange",e),onExpandChange:(e,t)=>b("expandChange",e,t)}),{append:()=>g.append&&g.append(),empty:()=>e.createVNode("div",{class:"fa-table__empty"},[g.empty?g.empty():e.createVNode(e.Fragment,null,[e.createVNode(t.ElIcon,null,{default:()=>[e.createVNode(l.NotData,null,null)]}),e.createVNode("div",null,[e.createTextVNode("暂无数据")])])]),default:()=>e.createVNode(e.Fragment,null,[e.createVNode(t.ElTableColumn,{className:"fa-table__index-column",type:"index",fixed:"left",width:S.tablePagination.pageIndex*S.tablePagination.pageSize>=100?S.tablePagination.pageIndex*S.tablePagination.pageSize>=1e3?50:40:30,align:"center",index:B,showOverflowTooltip:!1,resizable:!1,columnKey:"__table-index"},null),e.createVNode(t.ElTableColumn,{className:"fa-table__selection-column",type:"selection",fixed:"left",width:35,align:"center",reserveSelection:!0,showOverflowTooltip:!1,resizable:!1,columnKey:"__table-selection",selectable:p.rowSelectable},null),g.operation&&e.createVNode(t.ElTableColumn,{fixed:"right",width:S.operationColumnWidth,headerAlign:"center",align:"left",showOverflowTooltip:!1,className:"fa-table__operation-column",resizable:!1,columnKey:"__table-operation"},{header:()=>e.createVNode("div",{class:"fa-table__auto-width-column__cell-header __fa-table__auto-width-column__cell-header____table-operation"},[e.createVNode("span",null,[e.createTextVNode("操作")])]),default:({row:t,column:a,$index:l})=>e.createVNode("div",{class:"fa-table__auto-width-column__cell __fa-table__auto-width-column__cell____table-operation"},[g.operation({row:t,column:a,$index:l,search:O,...i.getTableDefaultSlots(S)})])}),0===S.tableColumns?.length?g.default&&g.default():S.tableColumns.map(a=>a.show&&("expand"===a.type?e.createVNode(t.ElTableColumn,e.mergeProps(a,{width:35,fixed:a.fixed??"left",resizable:!1}),{default:({row:t,column:l,$index:o})=>e.createVNode(e.Fragment,null,[a.render&&a.render({row:t,column:l,$index:o,...i.getTableDefaultSlots(S)}),a.slot&&g[a.slot]&&g[a.slot]({row:t,column:l,$index:o,...i.getTableDefaultSlots(S)})])}):a.prop&&e.createVNode(r.default,e.mergeProps(n.omit(a,W),{hideImage:p.hideImage,resizable:!0,onImagePreview:q,onCustomCellClick:j}),n.pick(g,U.value))))])}),[[e.resolveDirective("loading"),S.loading]]),e.createVNode("div",{class:"fa-table__main-footer"},[e.createVNode("div",{class:"fa-table__main-footer__left"},[g.footer&&g.footer({search:O,...i.getTableDefaultSlots(S)})]),g.pagination?g.pagination({pageIndex:S.tablePagination.pageIndex,pageSize:S.tablePagination.pageSize,totalRows:S.tablePagination.totalRows,handleSizeChange:N,handlePaginationChange:x}):e.createVNode(e.Fragment,null,[p.pagination?e.createVNode(s.default,{onSizeChange:N,onCurrentChange:x},null):e.createVNode(t.ElPagination,{class:"fa-table-pagination",size:"small",layout:"total",total:S.tableData.length},null)])])]),S.imagePreview&&e.createVNode(t.ElImageViewer,{closeOnPressEscape:!0,hideOnClickModal:!0,teleported:!0,onClose:()=>S.imagePreview=!1,urlList:S.previewList},null),p.columnSettingBtn&&e.createVNode(c.default,{ref:I,change:p.columnsChange},null)])),o.useExpose(f,{clearSelection:e.computed(()=>y.value?.clearSelection),getSelectionRows:e.computed(()=>y.value?.getSelectionRows),toggleRowSelection:e.computed(()=>y.value?.toggleRowSelection),toggleAllSelection:e.computed(()=>y.value?.toggleAllSelection),toggleRowExpansion:e.computed(()=>y.value?.toggleRowExpansion),setCurrentRow:e.computed(()=>y.value?.setCurrentRow),clearSort:e.computed(()=>y.value?.clearSort),clearFilter:e.computed(()=>y.value?.clearFilter),doLayout:e.computed(()=>y.value?.doLayout),sort:e.computed(()=>y.value?.sort),scrollTo:e.computed(()=>y.value?.scrollTo),setScrollTop:e.computed(()=>y.value?.setScrollTop),setScrollLeft:e.computed(()=>y.value?.setScrollLeft),columns:e.computed(()=>y.value?.columns),updateKeyChildren:e.computed(()=>y.value?.updateKeyChildren),loading:e.computed(()=>S.loading),tableData:e.computed(()=>S.tableData),tablePagination:e.computed(()=>S.tablePagination),searchParam:e.computed(()=>S.searchParam),selected:e.computed(()=>S.selected),selectedList:e.computed(()=>S.selectedList),selectedListIds:e.computed(()=>S.selectedListIds),indeterminateSelectedListIds:e.computed(()=>S.indeterminateSelectedListIds),tableWidth:e.computed(()=>S.tableWidth),tableHeight:e.computed(()=>S.tableHeight),toggleRowIndeterminateSelection:(e,t)=>{const a=n.isFunction(p.rowKey)?p.rowKey(e):e[p.rowKey],l=S.tableData.find(e=>n.isFunction(p.rowKey)?p.rowKey(e):e[p.rowKey]===a);if(!0===t)S.indeterminateSelectedListIds.some(e=>e===a)||S.indeterminateSelectedListIds.push(a),y.value.toggleRowSelection(l,!0);else if(!1===t){const e=S.indeterminateSelectedListIds.findIndex(e=>e===a);e>=0&&S.indeterminateSelectedListIds.splice(e,1),y.value.toggleRowSelection(l,!1)}else{const e=S.indeterminateSelectedListIds.findIndex(e=>e===a);e>=0?S.indeterminateSelectedListIds.splice(e,1):S.indeterminateSelectedListIds.push(a),y.value.toggleRowSelection(l)}},refresh:O,reset:T,doRender:V,doLoading:E})}});exports.default=g,exports.faTableEmits=h,exports.faTableProps=p,exports.tableProps=m;
2
2
  //# sourceMappingURL=table.js.map