fast-element-plus 2.0.15 → 2.0.16

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 (106) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/components/avatar/src/avatar.mjs.map +1 -1
  3. package/dist/components/button/src/button.mjs.map +1 -1
  4. package/dist/components/carNumber/src/carNumber.mjs.map +1 -1
  5. package/dist/components/contextMenu/index.d.ts +1 -1
  6. package/dist/components/contextMenu/index.mjs.map +1 -1
  7. package/dist/components/contextMenu/src/contextMenu.d.ts +2 -2
  8. package/dist/components/contextMenu/src/contextMenu.mjs +2 -2
  9. package/dist/components/contextMenu/src/contextMenu.mjs.map +1 -1
  10. package/dist/components/dialog/src/dialog.d.ts +6 -6
  11. package/dist/components/dialog/src/dialog.mjs +4 -4
  12. package/dist/components/dialog/src/dialog.mjs.map +1 -1
  13. package/dist/components/drawer/src/drawer.d.ts +2 -2
  14. package/dist/components/drawer/src/drawer.mjs +6 -6
  15. package/dist/components/drawer/src/drawer.mjs.map +1 -1
  16. package/dist/components/form/src/form.d.ts +10 -4
  17. package/dist/components/form/src/form.mjs.map +1 -1
  18. package/dist/components/form/src/formItem.d.ts +4 -4
  19. package/dist/components/form/src/formItem.mjs.map +1 -1
  20. package/dist/components/form/utils/form.d.ts +1 -1
  21. package/dist/components/form/utils/form.mjs +4 -8
  22. package/dist/components/form/utils/form.mjs.map +1 -1
  23. package/dist/components/image/src/image.mjs +1 -1
  24. package/dist/components/image/src/image.mjs.map +1 -1
  25. package/dist/components/inputDialogPage/src/inputDialogPage.d.ts +4 -4
  26. package/dist/components/inputDialogPage/src/inputDialogPage.mjs +1 -3
  27. package/dist/components/inputDialogPage/src/inputDialogPage.mjs.map +1 -1
  28. package/dist/components/layoutGrid/index.d.ts +1 -1
  29. package/dist/components/layoutGrid/index.mjs.map +1 -1
  30. package/dist/components/layoutGrid/src/layoutGrid.d.ts +3 -3
  31. package/dist/components/layoutGrid/src/layoutGrid.mjs +2 -2
  32. package/dist/components/layoutGrid/src/layoutGrid.mjs.map +1 -1
  33. package/dist/components/select/index.d.ts +1 -1
  34. package/dist/components/select/index.mjs.map +1 -1
  35. package/dist/components/select/src/select.d.ts +2 -2
  36. package/dist/components/select/src/select.mjs +2 -2
  37. package/dist/components/select/src/select.mjs.map +1 -1
  38. package/dist/components/selectPage/src/selectPage.d.ts +5 -5
  39. package/dist/components/selectPage/src/selectPage.mjs.map +1 -1
  40. package/dist/components/selectV2/src/selectV2.d.ts +2 -2
  41. package/dist/components/selectV2/src/selectV2.mjs +3 -3
  42. package/dist/components/selectV2/src/selectV2.mjs.map +1 -1
  43. package/dist/components/table/index.d.ts +3 -3
  44. package/dist/components/table/index.mjs +1 -3
  45. package/dist/components/table/index.mjs.map +1 -1
  46. package/dist/components/table/src/table.d.ts +9 -9
  47. package/dist/components/table/src/table.mjs +21 -23
  48. package/dist/components/table/src/table.mjs.map +1 -1
  49. package/dist/components/table/src/tableColumn.d.ts +3 -3
  50. package/dist/components/table/src/tableColumn.mjs +9 -16
  51. package/dist/components/table/src/tableColumn.mjs.map +1 -1
  52. package/dist/components/table/src/tableColumnSettingDialog.mjs +8 -8
  53. package/dist/components/table/src/tableColumnSettingDialog.mjs.map +1 -1
  54. package/dist/components/table/src/tableSearchForm.d.ts +3 -3
  55. package/dist/components/table/src/tableSearchForm.mjs +15 -21
  56. package/dist/components/table/src/tableSearchForm.mjs.map +1 -1
  57. package/dist/components/table/src/tableSearchFormItem.mjs.map +1 -1
  58. package/dist/components/table/src/useTable.mjs +7 -7
  59. package/dist/components/table/src/useTable.mjs.map +1 -1
  60. package/dist/components/table/utils/table.mjs +1 -1
  61. package/dist/components/table/utils/table.mjs.map +1 -1
  62. package/dist/components/tree/index.d.ts +1 -1
  63. package/dist/components/tree/index.mjs.map +1 -1
  64. package/dist/components/tree/src/tree.d.ts +3 -3
  65. package/dist/components/tree/src/tree.mjs +1 -1
  66. package/dist/components/tree/src/tree.mjs.map +1 -1
  67. package/dist/components/treeSelect/src/treeSelect.d.ts +8 -8
  68. package/dist/components/treeSelect/src/treeSelect.mjs +3 -3
  69. package/dist/components/treeSelect/src/treeSelect.mjs.map +1 -1
  70. package/dist/components/upload/src/upload.mjs +1 -1
  71. package/dist/components/upload/src/upload.mjs.map +1 -1
  72. package/dist/components/upload/src/useUpload.mjs +3 -3
  73. package/dist/components/upload/src/useUpload.mjs.map +1 -1
  74. package/dist/components/upload/utils/upload.d.ts +1 -1
  75. package/dist/components/upload/utils/upload.mjs.map +1 -1
  76. package/dist/components/uploadImage/src/uploadImage.d.ts +7 -4
  77. package/dist/components/uploadImage/src/uploadImage.mjs +11 -5
  78. package/dist/components/uploadImage/src/uploadImage.mjs.map +1 -1
  79. package/dist/components/uploadImages/src/uploadImages.d.ts +7 -4
  80. package/dist/components/uploadImages/src/uploadImages.mjs +9 -3
  81. package/dist/components/uploadImages/src/uploadImages.mjs.map +1 -1
  82. package/dist/directives/click-copy/index.d.ts +1 -1
  83. package/dist/directives/click-copy/index.mjs.map +1 -1
  84. package/dist/directives/click-debounce/index.d.ts +1 -1
  85. package/dist/directives/click-draggable/index.d.ts +1 -1
  86. package/dist/directives/click-icon-copy/index.d.ts +1 -1
  87. package/dist/directives/click-icon-copy/index.mjs.map +1 -1
  88. package/dist/directives/click-longpress/index.d.ts +1 -1
  89. package/dist/directives/click-throttle/index.d.ts +1 -1
  90. package/dist/element-plus.mjs.map +1 -1
  91. package/dist/hooks/use-screenFull/index.mjs.map +1 -1
  92. package/dist/index.global.min.js +4 -4
  93. package/dist/index.global.min.js.map +1 -1
  94. package/dist/index.mjs +1 -3
  95. package/dist/index.mjs.map +1 -1
  96. package/dist/utils/async/index.mjs +6 -4
  97. package/dist/utils/async/index.mjs.map +1 -1
  98. package/dist/utils/string/index.mjs +19 -11
  99. package/dist/utils/string/index.mjs.map +1 -1
  100. package/dist/utils/vue/install.mjs.map +1 -1
  101. package/dist/version.d.ts +1 -1
  102. package/dist/version.mjs +1 -1
  103. package/dist/version.mjs.map +1 -1
  104. package/package.json +3 -3
  105. package/dist/components/table/src/page.type.mjs +0 -45
  106. package/dist/components/table/src/page.type.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"select.mjs","names":["update:modelValue","update:label"],"sources":["../../../../src/components/select/src/select.tsx"],"sourcesContent":["import { useVModel } from \"@vueuse/core\";\nimport { computed, defineComponent, onMounted, reactive, ref, watch } from \"vue\";\nimport { ElSelect, selectEmits, selectProps, useGlobalSize } from \"element-plus\";\nimport { isArray, isBoolean, isEqual, isNil, isNull, isNumber, isObject, isString } from \"lodash-unified\";\nimport { addCssUnit, definePropType, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport FaSelectOption from \"./selectOption\";\nimport type { VNode } from \"vue\";\nimport type { PagedInput } from \"../../table\";\nimport type { ElSelectorModelValue, ElSelectorOutput, ElSelectorValue } from \"./select.type\";\n\n/** 传递给底层 Element Plus 选择器的扩展 Props。 */\nexport interface SelectComponentProps {\n\t/** @description 指定标签为节点的某个属性值 */\n\tlabel?: string | ((data: ElSelectorOutput) => string);\n\t/** @description 指定是否隐藏为节点的某个属性值 */\n\thide?: string | ((data: ElSelectorOutput) => boolean);\n\t/** @description 指定是否禁用为节点的某个属性值 */\n\tdisabled?: string | ((data: ElSelectorOutput) => boolean);\n\t/** @description 指定子节点对象为节点的某个属性值 */\n\tchildren?: string;\n}\n\n/** FaSelect 的运行时 Props 定义。 */\nexport const faSelectProps = {\n\t...selectProps,\n\t/** @description whether Select is disabled 重载使其支持 ElForm*/\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: undefined,\n\t},\n\t/** @description displayed text while loading data from server, default is 'Loading' */\n\tloadingText: {\n\t\ttype: String,\n\t\tdefault: \"加载中...\",\n\t},\n\t/** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */\n\tnoMatchText: {\n\t\ttype: String,\n\t\tdefault: \"暂无匹配的数据\",\n\t},\n\t/** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */\n\tnoDataText: {\n\t\ttype: String,\n\t\tdefault: \"暂无数据\",\n\t},\n\t/** @description whether to collapse tags to a text when multiple selecting */\n\tcollapseTags: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true */\n\tcollapseTagsTooltip: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<ElSelectorModelValue>([String, Number, Boolean, Object, Array]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: definePropType<string | string[] | null>([String, Array]),\n\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"100%\",\n\t},\n\t/** @description 更多细节,只有使用slot的时候有用 */\n\tmoreDetail: Boolean,\n\t/** @description 懒加载远程数据,默认 true。当下拉框第一次显示的时候才会加载远程数据*/\n\tlazy: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 默认选中。不能和懒加载一起使用 */\n\tdefaultSelected: Boolean,\n\t/** @description 配置选项 */\n\tprops: {\n\t\ttype: definePropType<SelectComponentProps>(Object),\n\t\tdefault: (): Partial<SelectComponentProps> => ({\n\t\t\tlabel: \"label\",\n\t\t\thide: \"hide\",\n\t\t\tdisabled: \"disabled\",\n\t\t\tchildren: \"children\",\n\t\t}),\n\t},\n\t/** @description 下拉框数据 */\n\tdata: {\n\t\ttype: definePropType<ElSelectorOutput[]>(Array),\n\t\tdefault: (): ElSelectorOutput[] => [],\n\t},\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: string | number | PagedInput) => Promise<ElSelectorOutput[]>>(Function),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | PagedInput>([String, Number, Object]),\n};\n\n/** FaSelect 的运行时 Emits 定义。 */\nexport const faSelectEmits = {\n\t...selectEmits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: ElSelectorModelValue): boolean =>\n\t\tisString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isArray(value) || isNil(value),\n\t/** @description 选中数据改变 */\n\tchange: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue): boolean => true,\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string | string[] | null): boolean => isString(value) || isArray(value) || isNull(value),\n\t/** @description 数据改变 */\n\tdataChangeCallBack: (data: ElSelectorOutput[]): boolean => isArray(data),\n};\n\n/** FaSelect 的插槽参数。 */\nexport interface FaSelectSlots extends Record<string, unknown> {\n\t/** @description FaSelectOption 默认内容插槽 */\n\tdefault: ElSelectorOutput;\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: \"FaSelect\",\n\tprops: faSelectProps,\n\temits: faSelectEmits,\n\tslots: makeSlots<FaSelectSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst selectedLabel = useVModel(props, \"label\", emit, { passive: true });\n\t\tconst _globalSize = useGlobalSize();\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<ElSelectorModelValue>(),\n\t\t\tloading: false,\n\t\t\tselectorData: withDefineType<ElSelectorOutput[]>([]),\n\t\t\t/** 首次出现 */\n\t\t\tdebut: true,\n\t\t\t/** 回显 */\n\t\t\techo: props.data?.length > 0 ? false : true,\n\t\t\t/** 下次刷新 */\n\t\t\tnextRefresh: false,\n\t\t});\n\n\t\tconst selectRef = ref<InstanceType<typeof ElSelect>>();\n\t\tlet requestVersion = 0;\n\n\t\tconst handleData = (data: ElSelectorOutput[]): ElSelectorOutput[] => {\n\t\t\treturn data\n\t\t\t\t.map((item): ElSelectorOutput => {\n\t\t\t\t\tconst value: unknown = item[props.valueKey];\n\t\t\t\t\tconst label: unknown = typeof props.props.label === \"function\" ? props.props.label(item) : item[props.props.label ?? \"label\"];\n\t\t\t\t\tconst hide: unknown = typeof props.props.hide === \"function\" ? props.props.hide(item) : item[props.props.hide ?? \"hide\"];\n\t\t\t\t\tconst disabled: unknown =\n\t\t\t\t\t\ttypeof props.props.disabled === \"function\" ? props.props.disabled(item) : item[props.props.disabled ?? \"disabled\"];\n\t\t\t\t\tconst children: unknown = item[props.props.children ?? \"children\"];\n\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t(typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\" || typeof value === \"object\")\n\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...item,\n\t\t\t\t\t\tchildren: Array.isArray(children) ? handleData(children as ElSelectorOutput[]) : [],\n\t\t\t\t\t\tdisabled: typeof disabled === \"boolean\" ? disabled : undefined,\n\t\t\t\t\t\thide: typeof hide === \"boolean\" ? hide : undefined,\n\t\t\t\t\t\tlabel: typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t\t.filter((item) => item.hide !== true);\n\t\t};\n\n\t\tconst loadData = async (): Promise<void> => {\n\t\t\tconst currentRequestVersion = ++requestVersion;\n\t\t\t// 判断是否需要自动请求\n\t\t\tif (props.requestApi) {\n\t\t\t\tstate.loading = true;\n\t\t\t\tconst params = props.initParam ?? {};\n\t\t\t\ttry {\n\t\t\t\t\tconst resData = await props.requestApi(params);\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\t// 这里不允许回显了\n\t\t\t\t\tstate.echo = false;\n\t\t\t\t\tstate.selectorData = handleData(resData);\n\t\t\t\t\temit(\"dataChangeCallBack\", state.selectorData);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\tstate.selectorData = [];\n\t\t\t\t\tthrow error;\n\t\t\t\t} finally {\n\t\t\t\t\tif (currentRequestVersion === requestVersion) state.loading = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t// 这里不允许回显了\n\t\t\t\tstate.echo = false;\n\t\t\t\tstate.selectorData = handleData(props.data);\n\t\t\t}\n\t\t};\n\n\t\tconst handleModelValueUpdate = (value: ElSelectorModelValue): void => {\n\t\t\tstate.value = value;\n\t\t\temit(\"update:modelValue\", value);\n\t\t};\n\n\t\tconst handleVisibleChange = async (visible: boolean): Promise<void> => {\n\t\t\tif (visible) {\n\t\t\t\tif (state.debut) {\n\t\t\t\t\t// 首次出现\n\t\t\t\t\tstate.debut = false;\n\t\t\t\t\t// 懒加载\n\t\t\t\t\t!props.defaultSelected && props.lazy && (await loadData());\n\t\t\t\t} else {\n\t\t\t\t\t// 判断再次出现是否需要刷新数据\n\t\t\t\t\tif (state.nextRefresh) {\n\t\t\t\t\t\tstate.nextRefresh = false;\n\t\t\t\t\t\tawait loadData();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\temit(\"visible-change\", visible);\n\t\t};\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t(newValue) => {\n\t\t\t\tif (state.echo && !isNil(newValue)) {\n\t\t\t\t\tconst hasLabel = !isNil(props.label);\n\t\t\t\t\t// 判断是否为多选\n\t\t\t\t\tif (props.multiple) {\n\t\t\t\t\t\t// 判断是否为数组\n\t\t\t\t\t\tif (!Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelect]\", \"当启用 multiple 时,传入的 modelValue 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && !isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelect]\", \"当启用 multiple 时,传入的 modelValue:label 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = newValue\n\t\t\t\t\t\t\t// 最大选项截取\n\t\t\t\t\t\t\t.slice(0, props.multipleLimit > 0 ? props.multipleLimit : newValue.length)\n\t\t\t\t\t\t\t.map((item, index) => {\n\t\t\t\t\t\t\t\tconst value: unknown = item;\n\t\t\t\t\t\t\t\tconst label: unknown = Array.isArray(props.label) ? props.label[index] : undefined;\n\t\t\t\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t\t\t\t(typeof value === \"string\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"number\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"boolean\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"object\")\n\t\t\t\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t\t\t\t\tlabel: hasLabel && typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelect]\", \"当禁用 multiple 时,传入的 modelValue 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelect]\", \"当禁用 multiple 时,传入的 modelValue:label 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: newValue,\n\t\t\t\t\t\t\t\tlabel: typeof props.label === \"string\" ? props.label : undefined,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstate.value = newValue;\n\t\t\t},\n\t\t\t{\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\tconst flattenOptions = (data: ElSelectorOutput[]): ElSelectorOutput[] =>\n\t\t\tdata.flatMap((item) => [item, ...flattenOptions(item.children ?? [])]);\n\n\t\tconst handleChange = (value?: ElSelectorModelValue): void => {\n\t\t\tif (props.multiple) {\n\t\t\t\tconst valueList = Array.isArray(value) ? value : [];\n\t\t\t\tif (valueList.length === 0) {\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst selectorData = flattenOptions(state.selectorData);\n\t\t\t\tconst dataList = valueList\n\t\t\t\t\t.map((item) => selectorData.find((option) => option.value !== undefined && isEqual(option.value, item)))\n\t\t\t\t\t.filter((item): item is ElSelectorOutput => item !== undefined);\n\t\t\t\temit(\"change\", dataList, value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (isNil(value) || Array.isArray(value)) {\n\t\t\t\temit(\"change\", null, null);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst data = flattenOptions(state.selectorData).find((item) => item.value !== undefined && isEqual(item.value, value));\n\t\t\temit(\"change\", data ?? null, value);\n\t\t};\n\n\t\twatch(\n\t\t\t[() => state.value, () => state.selectorData],\n\t\t\t([value]) => {\n\t\t\t\tconst selectorData = flattenOptions(state.selectorData);\n\n\t\t\t\tif (props.multiple) {\n\t\t\t\t\tif (!Array.isArray(value)) {\n\t\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tselectedLabel.value = value.map((item, index) => {\n\t\t\t\t\t\tconst data = selectorData.find((option) => option.value !== undefined && isEqual(option.value, item));\n\n\t\t\t\t\t\treturn data?.label ?? (Array.isArray(props.label) ? (props.label[index] ?? \"\") : \"\");\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (isNil(value) || Array.isArray(value)) {\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tselectedLabel.value =\n\t\t\t\t\tselectorData.find((item) => item.value !== undefined && isEqual(item.value, value))?.label ??\n\t\t\t\t\t(typeof props.label === \"string\" ? props.label : null);\n\t\t\t},\n\t\t\t{\n\t\t\t\tdeep: true,\n\t\t\t\tflush: \"sync\",\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\tonMounted(async () => {\n\t\t\tif (props.defaultSelected) {\n\t\t\t\tawait loadData();\n\t\t\t\tconst firstItem = state.selectorData[0];\n\t\t\t\tif (firstItem?.value !== undefined) {\n\t\t\t\t\thandleModelValueUpdate(props.multiple ? [firstItem.value] : firstItem.value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// 判断是否为本地数据\n\t\t\telse if (!props.requestApi && props.data?.length > 0) {\n\t\t\t\tstate.debut = false;\n\t\t\t\tawait loadData();\n\t\t\t}\n\t\t\t// 判断是否非默认选中,且未启用懒加载\n\t\t\telse if (!props.lazy) {\n\t\t\t\tawait loadData();\n\t\t\t}\n\t\t\twatch(\n\t\t\t\t() => props.initParam,\n\t\t\t\t(newValue, oldValue) => {\n\t\t\t\t\tif (!isEqual(newValue, oldValue)) {\n\t\t\t\t\t\tstate.nextRefresh = true;\n\t\t\t\t\t\tif (!isNil(state.value)) {\n\t\t\t\t\t\t\thandleModelValueUpdate(props.multiple ? [] : undefined);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t\twatch(\n\t\t\t\t() => props.data,\n\t\t\t\t() => {\n\t\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\t\treturn loadData();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ deep: true }\n\t\t\t);\n\t\t});\n\n\t\tconst elSelectProps = useProps(props, selectProps, [\"modelValue\", \"popperClass\", \"loading\", \"props\"]);\n\t\tconst elSelectEmits = useEmits(selectEmits, emit, [\"update:modelValue\", \"change\", \"visible-change\"]);\n\t\tconst elPopperClass = computed(() => [\n\t\t\t\"fa-select-dropdown\",\n\t\t\tprops.popperClass,\n\t\t\tprops.moreDetail && `fa-select-dropdown__more-detail fa-select-dropdown__more-detail-${_globalSize.value}`,\n\t\t]);\n\n\t\tuseRender(() => (\n\t\t\t<ElSelect\n\t\t\t\t{...elSelectProps.value}\n\t\t\t\t{...elSelectEmits.value}\n\t\t\t\tref={selectRef}\n\t\t\t\tclass=\"fa-select\"\n\t\t\t\tpopperClass={elPopperClass.value}\n\t\t\t\tstyle={{ width: addCssUnit(props.width) }}\n\t\t\t\tmodelValue={state.value}\n\t\t\t\tonUpdate:modelValue={handleModelValueUpdate}\n\t\t\t\tonChange={handleChange}\n\t\t\t\tloading={state.loading}\n\t\t\t\tonVisible-change={handleVisibleChange}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\tdefault: (): VNode[] =>\n\t\t\t\t\t\tstate.selectorData.map((item) => (\n\t\t\t\t\t\t\t<FaSelectOption vSlots={{ default: slots.default }} data={item} moreDetail={props.moreDetail} />\n\t\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</ElSelect>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 使选择器的输入框获取焦点 */\n\t\t\tfocus: computed(() => selectRef.value?.focus),\n\t\t\t/** @description 使选择器的输入框失去焦点,并隐藏下拉框 */\n\t\t\tblur: computed(() => selectRef.value?.blur),\n\t\t\t/** @description 获取当前选中的标签 */\n\t\t\tselectedLabel: computed(() => selectRef.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: Exclude<ElSelectorModelValue, null | undefined>) => handleModelValueUpdate(value),\n\t\t\t/** @description 清除选择 */\n\t\t\tclearSelection: () => handleModelValueUpdate(props.multiple ? [] : undefined),\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;AAuBA,MAAa,gBAAgB;CAC5B,GAAG;;CAEH,UAAU;EACT,MAAM;EACN,SAAS,KAAA;CACV;;CAEA,aAAa;EACZ,MAAM;EACN,SAAS;CACV;;CAEA,aAAa;EACZ,MAAM;EACN,SAAS;CACV;;CAEA,YAAY;EACX,MAAM;EACN,SAAS;CACV;;CAEA,cAAc;EACb,MAAM;EACN,SAAS;CACV;;CAEA,qBAAqB;EACpB,MAAM;EACN,SAAS;CACV;;CAEA,YAAY;EACX,MAAM,eAAqC;GAAC;GAAQ;GAAQ;GAAS;GAAQ;EAAK,CAAC;EACnF,SAAS,KAAA;CACV;;CAEA,OAAO,eAAyC,CAAC,QAAQ,KAAK,CAAC;;CAE/D,OAAO;EACN,MAAM,C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KAAA,CAAS;EAC7E,CAAC;CACF;AACD,CAAC"}
1
+ {"version":3,"file":"select.mjs","names":["update:modelValue","update:label"],"sources":["../../../../src/components/select/src/select.tsx"],"sourcesContent":["import { useVModel } from \"@vueuse/core\";\nimport { computed, defineComponent, onMounted, reactive, ref, watch } from \"vue\";\nimport { ElSelect, selectEmits, selectProps, useGlobalSize } from \"element-plus\";\nimport { isArray, isBoolean, isEqual, isNil, isNull, isNumber, isObject, isString } from \"lodash-unified\";\nimport { addCssUnit, definePropType, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport FaSelectOption from \"./selectOption\";\nimport type { VNode } from \"vue\";\nimport type { PagedInput } from \"../../table\";\nimport type { ElSelectorModelValue, ElSelectorOutput, ElSelectorValue } from \"./select.type\";\n\n/** 传递给底层 Element Plus 选择器的扩展 Props。 */\nexport interface SelectComponentProps {\n\t/** @description 指定标签为节点的某个属性值 */\n\tlabel?: string | ((data: ElSelectorOutput) => string);\n\t/** @description 指定是否隐藏为节点的某个属性值 */\n\thide?: string | ((data: ElSelectorOutput) => boolean);\n\t/** @description 指定是否禁用为节点的某个属性值 */\n\tdisabled?: string | ((data: ElSelectorOutput) => boolean);\n\t/** @description 指定子节点对象为节点的某个属性值 */\n\tchildren?: string;\n}\n\n/** FaSelect 的运行时 Props 定义。 */\nexport const faSelectProps = {\n\t...selectProps,\n\t/** @description whether Select is disabled 重载使其支持 ElForm*/\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: undefined,\n\t},\n\t/** @description displayed text while loading data from server, default is 'Loading' */\n\tloadingText: {\n\t\ttype: String,\n\t\tdefault: \"加载中...\",\n\t},\n\t/** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */\n\tnoMatchText: {\n\t\ttype: String,\n\t\tdefault: \"暂无匹配的数据\",\n\t},\n\t/** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */\n\tnoDataText: {\n\t\ttype: String,\n\t\tdefault: \"暂无数据\",\n\t},\n\t/** @description whether to collapse tags to a text when multiple selecting */\n\tcollapseTags: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true */\n\tcollapseTagsTooltip: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<ElSelectorModelValue>([String, Number, Boolean, Object, Array]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: definePropType<string | string[] | null>([String, Array]),\n\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"100%\",\n\t},\n\t/** @description 更多细节,只有使用slot的时候有用 */\n\tmoreDetail: Boolean,\n\t/** @description 懒加载远程数据,默认 true。当下拉框第一次显示的时候才会加载远程数据*/\n\tlazy: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 默认选中。不能和懒加载一起使用 */\n\tdefaultSelected: Boolean,\n\t/** @description 配置选项 */\n\tprops: {\n\t\ttype: definePropType<SelectComponentProps>(Object),\n\t\tdefault: (): Partial<SelectComponentProps> => ({\n\t\t\tlabel: \"label\",\n\t\t\thide: \"hide\",\n\t\t\tdisabled: \"disabled\",\n\t\t\tchildren: \"children\",\n\t\t}),\n\t},\n\t/** @description 下拉框数据 */\n\tdata: {\n\t\ttype: definePropType<ElSelectorOutput[]>(Array),\n\t\tdefault: (): ElSelectorOutput[] => [],\n\t},\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: string | number | PagedInput) => Promise<ElSelectorOutput[]>>(Function),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | PagedInput>([String, Number, Object]),\n};\n\n/** FaSelect 的运行时 Emits 定义。 */\nexport const faSelectEmits = {\n\t...selectEmits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: ElSelectorModelValue): boolean =>\n\t\tisString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isArray(value) || isNil(value),\n\t/** @description 选中数据改变 */\n\tchange: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue): boolean => true,\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string | string[] | null): boolean => isString(value) || isArray(value) || isNull(value),\n\t/** @description 数据改变 */\n\tdataChangeCallBack: (data: ElSelectorOutput[]): boolean => isArray(data),\n};\n\n/** FaSelect 的插槽参数。 */\nexport interface FaSelectSlots extends Record<string, unknown> {\n\t/** @description FaSelectOption 默认内容插槽 */\n\tdefault: ElSelectorOutput;\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: \"FaSelect\",\n\tprops: faSelectProps,\n\temits: faSelectEmits,\n\tslots: makeSlots<FaSelectSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst selectedLabel = useVModel(props, \"label\", emit, { passive: true });\n\t\tconst _globalSize = useGlobalSize();\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<ElSelectorModelValue>(),\n\t\t\tloading: false,\n\t\t\tselectorData: withDefineType<ElSelectorOutput[]>([]),\n\t\t\t/** 首次出现 */\n\t\t\tdebut: true,\n\t\t\t/** 回显 */\n\t\t\techo: props.data.length > 0 ? false : true,\n\t\t\t/** 下次刷新 */\n\t\t\tnextRefresh: false,\n\t\t});\n\n\t\tconst selectRef = ref<InstanceType<typeof ElSelect>>();\n\t\tlet requestVersion = 0;\n\n\t\tconst handleData = (data: ElSelectorOutput[]): ElSelectorOutput[] => {\n\t\t\treturn data\n\t\t\t\t.map((item): ElSelectorOutput => {\n\t\t\t\t\tconst value: unknown = item[props.valueKey];\n\t\t\t\t\tconst label: unknown = typeof props.props.label === \"function\" ? props.props.label(item) : item[props.props.label ?? \"label\"];\n\t\t\t\t\tconst hide: unknown = typeof props.props.hide === \"function\" ? props.props.hide(item) : item[props.props.hide ?? \"hide\"];\n\t\t\t\t\tconst disabled: unknown =\n\t\t\t\t\t\ttypeof props.props.disabled === \"function\" ? props.props.disabled(item) : item[props.props.disabled ?? \"disabled\"];\n\t\t\t\t\tconst children: unknown = item[props.props.children ?? \"children\"];\n\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t(typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\" || typeof value === \"object\")\n\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...item,\n\t\t\t\t\t\tchildren: Array.isArray(children) ? handleData(children as ElSelectorOutput[]) : [],\n\t\t\t\t\t\tdisabled: typeof disabled === \"boolean\" ? disabled : undefined,\n\t\t\t\t\t\thide: typeof hide === \"boolean\" ? hide : undefined,\n\t\t\t\t\t\tlabel: typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t\t.filter((item) => item.hide !== true);\n\t\t};\n\n\t\tconst loadData = async (): Promise<void> => {\n\t\t\tconst currentRequestVersion = ++requestVersion;\n\t\t\t// 判断是否需要自动请求\n\t\t\tif (props.requestApi) {\n\t\t\t\tstate.loading = true;\n\t\t\t\tconst params = props.initParam ?? {};\n\t\t\t\ttry {\n\t\t\t\t\tconst resData = await props.requestApi(params);\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\t// 这里不允许回显了\n\t\t\t\t\tstate.echo = false;\n\t\t\t\t\tstate.selectorData = handleData(resData);\n\t\t\t\t\temit(\"dataChangeCallBack\", state.selectorData);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\tstate.selectorData = [];\n\t\t\t\t\tthrow error;\n\t\t\t\t} finally {\n\t\t\t\t\tif (currentRequestVersion === requestVersion) state.loading = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t// 这里不允许回显了\n\t\t\t\tstate.echo = false;\n\t\t\t\tstate.selectorData = handleData(props.data);\n\t\t\t}\n\t\t};\n\n\t\tconst handleModelValueUpdate = (value: ElSelectorModelValue): void => {\n\t\t\tstate.value = value;\n\t\t\temit(\"update:modelValue\", value);\n\t\t};\n\n\t\tconst handleVisibleChange = async (visible: boolean): Promise<void> => {\n\t\t\tif (visible) {\n\t\t\t\tif (state.debut) {\n\t\t\t\t\t// 首次出现\n\t\t\t\t\tstate.debut = false;\n\t\t\t\t\t// 懒加载\n\t\t\t\t\t!props.defaultSelected && props.lazy && (await loadData());\n\t\t\t\t} else {\n\t\t\t\t\t// 判断再次出现是否需要刷新数据\n\t\t\t\t\tif (state.nextRefresh) {\n\t\t\t\t\t\tstate.nextRefresh = false;\n\t\t\t\t\t\tawait loadData();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\temit(\"visible-change\", visible);\n\t\t};\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t(newValue) => {\n\t\t\t\tif (state.echo && !isNil(newValue)) {\n\t\t\t\t\tconst hasLabel = !isNil(props.label);\n\t\t\t\t\t// 判断是否为多选\n\t\t\t\t\tif (props.multiple) {\n\t\t\t\t\t\t// 判断是否为数组\n\t\t\t\t\t\tif (!Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelect]\", \"当启用 multiple 时,传入的 modelValue 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && !isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelect]\", \"当启用 multiple 时,传入的 modelValue:label 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = newValue\n\t\t\t\t\t\t\t// 最大选项截取\n\t\t\t\t\t\t\t.slice(0, props.multipleLimit > 0 ? props.multipleLimit : newValue.length)\n\t\t\t\t\t\t\t.map((item, index) => {\n\t\t\t\t\t\t\t\tconst value: unknown = item;\n\t\t\t\t\t\t\t\tconst label: unknown = Array.isArray(props.label) ? props.label[index] : undefined;\n\t\t\t\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t\t\t\t(typeof value === \"string\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"number\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"boolean\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"object\")\n\t\t\t\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t\t\t\t\tlabel: hasLabel && typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelect]\", \"当禁用 multiple 时,传入的 modelValue 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelect]\", \"当禁用 multiple 时,传入的 modelValue:label 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: newValue,\n\t\t\t\t\t\t\t\tlabel: typeof props.label === \"string\" ? props.label : undefined,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstate.value = newValue;\n\t\t\t},\n\t\t\t{\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\tconst flattenOptions = (data: ElSelectorOutput[]): ElSelectorOutput[] =>\n\t\t\tdata.flatMap((item) => [item, ...flattenOptions(item.children ?? [])]);\n\n\t\tconst handleChange = (value?: ElSelectorModelValue): void => {\n\t\t\tif (props.multiple) {\n\t\t\t\tconst valueList = Array.isArray(value) ? value : [];\n\t\t\t\tif (valueList.length === 0) {\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst selectorData = flattenOptions(state.selectorData);\n\t\t\t\tconst dataList = valueList\n\t\t\t\t\t.map((item) => selectorData.find((option) => option.value !== undefined && isEqual(option.value, item)))\n\t\t\t\t\t.filter((item): item is ElSelectorOutput => item !== undefined);\n\t\t\t\temit(\"change\", dataList, value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (isNil(value) || Array.isArray(value)) {\n\t\t\t\temit(\"change\", null, null);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst data = flattenOptions(state.selectorData).find((item) => item.value !== undefined && isEqual(item.value, value));\n\t\t\temit(\"change\", data ?? null, value);\n\t\t};\n\n\t\twatch(\n\t\t\t[() => state.value, () => state.selectorData],\n\t\t\t([value]) => {\n\t\t\t\tconst selectorData = flattenOptions(state.selectorData);\n\n\t\t\t\tif (props.multiple) {\n\t\t\t\t\tif (!Array.isArray(value)) {\n\t\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tselectedLabel.value = value.map((item, index) => {\n\t\t\t\t\t\tconst data = selectorData.find((option) => option.value !== undefined && isEqual(option.value, item));\n\n\t\t\t\t\t\treturn data?.label ?? (Array.isArray(props.label) ? (props.label[index] ?? \"\") : \"\");\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (isNil(value) || Array.isArray(value)) {\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tselectedLabel.value =\n\t\t\t\t\tselectorData.find((item) => item.value !== undefined && isEqual(item.value, value))?.label ??\n\t\t\t\t\t(typeof props.label === \"string\" ? props.label : null);\n\t\t\t},\n\t\t\t{\n\t\t\t\tdeep: true,\n\t\t\t\tflush: \"sync\",\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\tonMounted(async () => {\n\t\t\tif (props.defaultSelected) {\n\t\t\t\tawait loadData();\n\t\t\t\tconst firstItem = state.selectorData[0];\n\t\t\t\tif (firstItem?.value !== undefined) {\n\t\t\t\t\thandleModelValueUpdate(props.multiple ? [firstItem.value] : firstItem.value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// 判断是否为本地数据\n\t\t\telse if (!props.requestApi && props.data.length > 0) {\n\t\t\t\tstate.debut = false;\n\t\t\t\tawait loadData();\n\t\t\t}\n\t\t\t// 判断是否非默认选中,且未启用懒加载\n\t\t\telse if (!props.lazy) {\n\t\t\t\tawait loadData();\n\t\t\t}\n\t\t\twatch(\n\t\t\t\t() => props.initParam,\n\t\t\t\t(newValue, oldValue) => {\n\t\t\t\t\tif (!isEqual(newValue, oldValue)) {\n\t\t\t\t\t\tstate.nextRefresh = true;\n\t\t\t\t\t\tif (!isNil(state.value)) {\n\t\t\t\t\t\t\thandleModelValueUpdate(props.multiple ? [] : undefined);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t\twatch(\n\t\t\t\t() => props.data,\n\t\t\t\t() => {\n\t\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\t\treturn loadData();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ deep: true }\n\t\t\t);\n\t\t});\n\n\t\tconst elSelectProps = useProps(props, selectProps, [\"modelValue\", \"popperClass\", \"loading\", \"props\"]);\n\t\tconst elSelectEmits = useEmits(selectEmits, emit, [\"update:modelValue\", \"change\", \"visible-change\"]);\n\t\tconst elPopperClass = computed(() => [\n\t\t\t\"fa-select-dropdown\",\n\t\t\tprops.popperClass,\n\t\t\tprops.moreDetail && `fa-select-dropdown__more-detail fa-select-dropdown__more-detail-${_globalSize.value}`,\n\t\t]);\n\n\t\tuseRender(() => (\n\t\t\t<ElSelect\n\t\t\t\t{...elSelectProps.value}\n\t\t\t\t{...elSelectEmits.value}\n\t\t\t\tref={selectRef}\n\t\t\t\tclass=\"fa-select\"\n\t\t\t\tpopperClass={elPopperClass.value}\n\t\t\t\tstyle={{ width: addCssUnit(props.width) }}\n\t\t\t\tmodelValue={state.value}\n\t\t\t\tonUpdate:modelValue={handleModelValueUpdate}\n\t\t\t\tonChange={handleChange}\n\t\t\t\tloading={state.loading}\n\t\t\t\tonVisible-change={handleVisibleChange}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\tdefault: (): VNode[] =>\n\t\t\t\t\t\tstate.selectorData.map((item) => (\n\t\t\t\t\t\t\t<FaSelectOption vSlots={{ default: slots.default }} data={item} moreDetail={props.moreDetail} />\n\t\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</ElSelect>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 使选择器的输入框获取焦点 */\n\t\t\tfocus: computed(() => selectRef.value?.focus),\n\t\t\t/** @description 使选择器的输入框失去焦点,并隐藏下拉框 */\n\t\t\tblur: computed(() => selectRef.value?.blur),\n\t\t\t/** @description 获取当前选中的标签 */\n\t\t\tselectedLabel: computed(() => selectRef.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: Exclude<ElSelectorModelValue, null | undefined>) => handleModelValueUpdate(value),\n\t\t\t/** @description 清除选择 */\n\t\t\tclearSelection: () => handleModelValueUpdate(props.multiple ? [] : undefined),\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;AAuBA,MAAa,gBAAgB;CAC5B,GAAG;;CAEH,UAAU;EACT,MAAM;EACN,SAAS,KAAA;CACV;;CAEA,aAAa;EACZ,MAAM;EACN,SAAS;CACV;;CAEA,aAAa;EACZ,MAAM;EACN,SAAS;CACV;;CAEA,YAAY;EACX,MAAM;EACN,SAAS;CACV;;CAEA,cAAc;EACb,MAAM;EACN,SAAS;CACV;;CAEA,qBAAqB;EACpB,MAAM;EACN,SAAS;CACV;;CAEA,YAAY;EACX,MAAM,eAAqC;GAAC;GAAQ;GAAQ;GAAS;GAAQ;EAAK,CAAC;EACnF,SAAS,KAAA;CACV;;CAEA,OAAO,eAAyC,CAAC,QAAQ,KAAK,CAAC;;CAE/D,OAAO;EACN,MAAM,CAAC,QAAQ,MAAM;EACrB,SAAS;CACV;;CAEA,YAAY;;CAEZ,MAAM;EACL,MAAM;EACN,SAAS;C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  required: true;
59
59
  };
60
60
  /** 初始化参数 */
61
- initParam: import("vue").PropType<string | number | PagedInput>;
61
+ initParam: import("vue").PropType<string | number | PagedInput | null>;
62
62
  ariaLabel: StringConstructor;
63
63
  emptyValues: ArrayConstructor;
64
64
  valueOnClear: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown, undefined, boolean>;
@@ -245,7 +245,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
245
245
  required: true;
246
246
  };
247
247
  /** 初始化参数 */
248
- initParam: import("vue").PropType<string | number | PagedInput>;
248
+ initParam: import("vue").PropType<string | number | PagedInput | null>;
249
249
  ariaLabel: StringConstructor;
250
250
  emptyValues: ArrayConstructor;
251
251
  valueOnClear: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown, undefined, boolean>;
@@ -432,7 +432,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
432
432
  required: true;
433
433
  };
434
434
  /** 初始化参数 */
435
- initParam: import("vue").PropType<string | number | PagedInput>;
435
+ initParam: import("vue").PropType<string | number | PagedInput | null>;
436
436
  ariaLabel: StringConstructor;
437
437
  emptyValues: ArrayConstructor;
438
438
  valueOnClear: import("element-plus/es/utils/vue/props/types.mjs").EpPropFinalized<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown, undefined, boolean>;
@@ -520,11 +520,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
520
520
  __epPropKey: true;
521
521
  };
522
522
  }>> & Readonly<{
523
- onBlur?: ((evt: FocusEvent) => any) | undefined;
524
- onFocus?: ((evt: FocusEvent) => any) | undefined;
525
523
  onClear?: (() => any) | undefined;
526
524
  onChange?: ((_data: ElSelectorOutput<ElSelectorValue, any> | ElSelectorOutput<ElSelectorValue, any>[] | null, _value?: ElSelectorModelValue) => any) | undefined;
527
525
  "onUpdate:modelValue"?: ((value: ElSelectorModelValue) => any) | undefined;
526
+ onFocus?: ((evt: FocusEvent) => any) | undefined;
527
+ onBlur?: ((evt: FocusEvent) => any) | undefined;
528
528
  "onEnd-reached"?: ((direction: import("element-plus").ScrollbarDirection) => any) | undefined;
529
529
  "onVisible-change"?: ((visible: boolean) => any) | undefined;
530
530
  "onUpdate:label"?: ((value: string | string[] | null) => any) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"selectPage.mjs","names":["update:modelValue","update:label"],"sources":["../../../../src/components/selectPage/src/selectPage.tsx"],"sourcesContent":["import { useVModel } from \"@vueuse/core\";\nimport { Fragment, computed, defineComponent, onMounted, reactive, ref, watch } from \"vue\";\nimport { Search } from \"@element-plus/icons-vue\";\nimport { ElButton, ElInput, ElOption, ElPagination, ElSelect, selectEmits, selectProps, useGlobalSize } from \"element-plus\";\nimport { isArray, isBoolean, isEqual, isNil, isNull, isNumber, isObject, isString } from \"lodash-unified\";\nimport { addCssUnit, definePropType, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport { FaSelectOption } from \"../../select\";\nimport type { VNode } from \"vue\";\nimport type { ElSelectorModelValue, ElSelectorOutput, ElSelectorValue } from \"../../select\";\nimport type { SelectComponentProps } from \"../../select/src/select\";\nimport type { PagedInput, PagedResult } from \"../../table\";\n\n/** FaSelectPage 的运行时 Props 定义。 */\nexport const faSelectPageProps = {\n\t...selectProps,\n\t/** @description whether Select is disabled 重载使其支持 ElForm*/\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: undefined,\n\t},\n\t/** @description displayed text while loading data from server, default is 'Loading' */\n\tloadingText: {\n\t\ttype: String,\n\t\tdefault: \"加载中...\",\n\t},\n\t/** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */\n\tnoMatchText: {\n\t\ttype: String,\n\t\tdefault: \"暂无匹配的数据\",\n\t},\n\t/** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */\n\tnoDataText: {\n\t\ttype: String,\n\t\tdefault: \"暂无数据\",\n\t},\n\t/** @description whether to collapse tags to a text when multiple selecting */\n\tcollapseTags: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true */\n\tcollapseTagsTooltip: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<ElSelectorModelValue>([String, Number, Boolean, Object, Array]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: definePropType<string | string[] | null>([String, Array]),\n\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"100%\",\n\t},\n\t/** @description 更多细节,只有使用slot的时候有用 */\n\tmoreDetail: Boolean,\n\t/** @description 配置选项 */\n\tprops: {\n\t\ttype: definePropType<SelectComponentProps>(Object),\n\t\tdefault: (): Partial<SelectComponentProps> => ({\n\t\t\tlabel: \"label\",\n\t\t\thide: \"hide\",\n\t\t\tdisabled: \"disabled\",\n\t\t\tchildren: \"children\",\n\t\t}),\n\t},\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: PagedInput) => Promise<PagedResult<ElSelectorOutput>>>(Function),\n\t\trequired: true as const,\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | PagedInput>([String, Number, Object]),\n};\n\n/** FaSelectPage 的运行时 Emits 定义。 */\nexport const faSelectPageEmits = {\n\t...selectEmits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: ElSelectorModelValue): boolean =>\n\t\tisString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isArray(value) || isNil(value),\n\t/** @description 选中数据改变 */\n\tchange: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue): boolean => true,\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string | string[] | null): boolean => isString(value) || isArray(value) || isNull(value),\n\t/** @description 数据改变 */\n\tdataChangeCallBack: (data: ElSelectorOutput[]): boolean => isArray(data),\n};\n\n/** FaSelectPage 的插槽参数。 */\nexport interface FaSelectPageSlots extends Record<string, unknown> {\n\t/** @description FaSelectOption 默认内容插槽 */\n\tdefault: ElSelectorOutput;\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: \"FaSelectPage\",\n\tprops: faSelectPageProps,\n\temits: faSelectPageEmits,\n\tslots: makeSlots<FaSelectPageSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst selectedLabel = useVModel(props, \"label\", emit, { passive: true });\n\t\tconst _globalSize = useGlobalSize();\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<ElSelectorModelValue>(),\n\t\t\tloading: false,\n\t\t\tselectorData: withDefineType<ElSelectorOutput[]>([]),\n\t\t\t/** 选中的数据 */\n\t\t\tselectedList: withDefineType<ElSelectorOutput[]>([]),\n\t\t\t/** 首次出现 */\n\t\t\tdebut: true,\n\t\t\t/** 回显 */\n\t\t\techo: true,\n\t\t\t/** 下次刷新 */\n\t\t\tnextRefresh: false,\n\t\t\tpageIndex: 1,\n\t\t\tpageSize: 15,\n\t\t\ttotalRows: 0,\n\t\t\tsearchValue: undefined,\n\t\t\tdefaultSelectorData: withDefineType<ElSelectorOutput>(),\n\t\t});\n\n\t\tconst selectRef = ref<InstanceType<typeof ElSelect>>();\n\t\tlet requestVersion = 0;\n\n\t\tconst handleData = (data: ElSelectorOutput[]): ElSelectorOutput[] => {\n\t\t\treturn data\n\t\t\t\t.map((item): ElSelectorOutput => {\n\t\t\t\t\tconst value: unknown = item[props.valueKey];\n\t\t\t\t\tconst label: unknown = typeof props.props.label === \"function\" ? props.props.label(item) : item[props.props.label ?? \"label\"];\n\t\t\t\t\tconst hide: unknown = typeof props.props.hide === \"function\" ? props.props.hide(item) : item[props.props.hide ?? \"hide\"];\n\t\t\t\t\tconst disabled: unknown =\n\t\t\t\t\t\ttypeof props.props.disabled === \"function\" ? props.props.disabled(item) : item[props.props.disabled ?? \"disabled\"];\n\t\t\t\t\tconst children: unknown = item[props.props.children ?? \"children\"];\n\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t(typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\" || typeof value === \"object\")\n\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...item,\n\t\t\t\t\t\tchildren: Array.isArray(children) ? handleData(children as ElSelectorOutput[]) : [],\n\t\t\t\t\t\tdisabled: typeof disabled === \"boolean\" ? disabled : undefined,\n\t\t\t\t\t\thide: typeof hide === \"boolean\" ? hide : undefined,\n\t\t\t\t\t\tlabel: typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t\t.filter((item) => item.hide !== true);\n\t\t};\n\n\t\tconst loadData = async (pageIndex?: number): Promise<void> => {\n\t\t\tconst currentRequestVersion = ++requestVersion;\n\t\t\tstate.loading = true;\n\t\t\tstate.pageIndex = pageIndex ?? state.pageIndex;\n\t\t\tconst params: PagedInput = {\n\t\t\t\t...(typeof props.initParam === \"object\" && props.initParam !== null ? props.initParam : {}),\n\t\t\t\tpageIndex: state.pageIndex,\n\t\t\t\tpageSize: state.pageSize,\n\t\t\t\tsearchValue: state.searchValue,\n\t\t\t};\n\t\t\ttry {\n\t\t\t\tconst resData = await props.requestApi(params);\n\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t// 这里不允许回显了\n\t\t\t\tstate.echo = false;\n\t\t\t\tstate.totalRows = resData.totalRows ?? 0;\n\t\t\t\tstate.selectorData = handleData(resData.rows ?? []);\n\t\t\t\temit(\"dataChangeCallBack\", state.selectorData);\n\t\t\t} catch (error) {\n\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\tstate.pageIndex = 1;\n\t\t\t\tstate.totalRows = 0;\n\t\t\t\tstate.selectorData = [];\n\t\t\t\tthrow error;\n\t\t\t} finally {\n\t\t\t\tif (currentRequestVersion === requestVersion) state.loading = false;\n\t\t\t}\n\t\t};\n\n\t\tconst pageIndexModel = computed({\n\t\t\tget: () => state.pageIndex,\n\t\t\tset: (pageIndex: number) => {\n\t\t\t\tvoid loadData(pageIndex);\n\t\t\t},\n\t\t});\n\n\t\tconst handleModelValueUpdate = (value: ElSelectorModelValue): void => {\n\t\t\tstate.value = value;\n\t\t\temit(\"update:modelValue\", value);\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\tawait 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\tif (!Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectPage]\", \"当启用 multiple 时,传入的 modelValue 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && !isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectPage]\", \"当启用 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.selectedList = newValue\n\t\t\t\t\t\t\t// 最大选项截取\n\t\t\t\t\t\t\t.slice(0, props.multipleLimit > 0 ? props.multipleLimit : newValue.length)\n\t\t\t\t\t\t\t.map((item, index) => {\n\t\t\t\t\t\t\t\tconst value: unknown = item;\n\t\t\t\t\t\t\t\tconst label: unknown = Array.isArray(props.label) ? props.label[index] : undefined;\n\t\t\t\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t\t\t\t(typeof value === \"string\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"number\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"boolean\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"object\")\n\t\t\t\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t\t\t\t\tlabel: hasLabel && typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectPage]\", \"当禁用 multiple 时,传入的 modelValue 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectPage]\", \"当禁用 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.defaultSelectorData = {\n\t\t\t\t\t\t\tvalue: newValue,\n\t\t\t\t\t\t\tlabel: typeof props.label === \"string\" ? props.label : undefined,\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\tconst flattenOptions = (data: ElSelectorOutput[]): ElSelectorOutput[] =>\n\t\t\tdata.flatMap((item) => [item, ...flattenOptions(item.children ?? [])]);\n\n\t\tconst handleChange = (value?: ElSelectorModelValue): void => {\n\t\t\tconst selectorData = flattenOptions([\n\t\t\t\t...state.selectedList,\n\t\t\t\t...(state.defaultSelectorData ? [state.defaultSelectorData] : []),\n\t\t\t\t...state.selectorData,\n\t\t\t]);\n\t\t\tif (props.multiple) {\n\t\t\t\tconst valueList = Array.isArray(value) ? value : [];\n\t\t\t\tif (valueList.length === 0) {\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst dataList = valueList\n\t\t\t\t\t.map((item) => selectorData.find((option) => option.value !== undefined && isEqual(option.value, item)))\n\t\t\t\t\t.filter((item): item is ElSelectorOutput => item !== undefined);\n\t\t\t\temit(\"change\", dataList, value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (isNil(value) || Array.isArray(value)) {\n\t\t\t\temit(\"change\", null, null);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst data = selectorData.find((item) => item.value !== undefined && isEqual(item.value, value));\n\t\t\temit(\"change\", data ?? null, value);\n\t\t};\n\n\t\twatch(\n\t\t\t[() => state.value, () => state.selectorData],\n\t\t\t([value]) => {\n\t\t\t\tconst selectorData = flattenOptions([\n\t\t\t\t\t...state.selectedList,\n\t\t\t\t\t...(state.defaultSelectorData ? [state.defaultSelectorData] : []),\n\t\t\t\t\t...state.selectorData,\n\t\t\t\t]);\n\n\t\t\t\tif (props.multiple) {\n\t\t\t\t\tif (!Array.isArray(value)) {\n\t\t\t\t\t\tstate.selectedList = [];\n\t\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.selectedList = value\n\t\t\t\t\t\t.map((item) => selectorData.find((option) => option.value !== undefined && isEqual(option.value, item)))\n\t\t\t\t\t\t.filter((item): item is ElSelectorOutput => item !== undefined);\n\t\t\t\t\tselectedLabel.value = value.map((item, index) => {\n\t\t\t\t\t\tconst data = state.selectedList.find((option) => option.value !== undefined && isEqual(option.value, item));\n\n\t\t\t\t\t\treturn data?.label ?? (Array.isArray(props.label) ? (props.label[index] ?? \"\") : \"\");\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (isNil(value) || Array.isArray(value)) {\n\t\t\t\t\tstate.selectedList = [];\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst data = selectorData.find((item) => item.value !== undefined && isEqual(item.value, value));\n\t\t\t\tstate.selectedList = data ? [data] : [];\n\t\t\t\tselectedLabel.value = data?.label ?? (typeof props.label === \"string\" ? props.label : null);\n\t\t\t},\n\t\t\t{\n\t\t\t\tdeep: true,\n\t\t\t\tflush: \"sync\",\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\tonMounted(() => {\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\thandleModelValueUpdate(props.multiple ? [] : undefined);\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});\n\n\t\tconst elSelectProps = useProps(props, selectProps, [\"modelValue\", \"popperClass\", \"loading\", \"props\"]);\n\t\tconst elSelectEmits = useEmits(selectEmits, emit, [\"update:modelValue\", \"change\", \"visible-change\"]);\n\t\tconst elPopperClass = computed(() => [\n\t\t\t`fa-select-page-dropdown fa-select-page-dropdown-${_globalSize.value}`,\n\t\t\tprops.popperClass,\n\t\t\tprops.moreDetail && `fa-select-dropdown__more-detail fa-select-dropdown__more-detail-${_globalSize.value}`,\n\t\t]);\n\n\t\tuseRender(() => (\n\t\t\t<ElSelect\n\t\t\t\t{...elSelectProps.value}\n\t\t\t\t{...elSelectEmits.value}\n\t\t\t\tref={selectRef}\n\t\t\t\tclass=\"fa-select-page\"\n\t\t\t\tpopperClass={elPopperClass.value}\n\t\t\t\tstyle={{ width: addCssUnit(props.width) }}\n\t\t\t\tmodelValue={state.value}\n\t\t\t\tonUpdate:modelValue={handleModelValueUpdate}\n\t\t\t\tonChange={handleChange}\n\t\t\t\tloading={state.loading}\n\t\t\t\tonVisible-change={handleVisibleChange}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\tdefault: (): VNode[] =>\n\t\t\t\t\t\tstate.selectorData.map((item) => (\n\t\t\t\t\t\t\t<FaSelectOption vSlots={{ default: slots.default }} data={item} moreDetail={props.moreDetail} />\n\t\t\t\t\t\t)),\n\t\t\t\t\theader: (): VNode[] => [\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t{state.defaultSelectorData?.value !== undefined && (\n\t\t\t\t\t\t\t\t<ElOption\n\t\t\t\t\t\t\t\t\tclass=\"fa-select-page-dropdown__default-selector\"\n\t\t\t\t\t\t\t\t\tvalue={state.defaultSelectorData.value}\n\t\t\t\t\t\t\t\t\tlabel={state.defaultSelectorData.label ?? \"\"}\n\t\t\t\t\t\t\t\t\tdisabled={true}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span>{state.defaultSelectorData.label}</span>\n\t\t\t\t\t\t\t\t\t<span>Default</span>\n\t\t\t\t\t\t\t\t</ElOption>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t<ElInput\n\t\t\t\t\t\t\t\t\tclass=\"fa-select-page-dropdown__search-input\"\n\t\t\t\t\t\t\t\t\tclearable={Boolean(state.searchValue)}\n\t\t\t\t\t\t\t\t\tplaceholder=\"请输入关键字搜索\"\n\t\t\t\t\t\t\t\t\tvModel_trim={state.searchValue}\n\t\t\t\t\t\t\t\t\tonKeyup={(event: KeyboardEvent) => {\n\t\t\t\t\t\t\t\t\t\tif (event.key === \"Enter\") {\n\t\t\t\t\t\t\t\t\t\t\tvoid loadData(1);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\t\t\tappend: () => (\n\t\t\t\t\t\t\t\t\t\t\t<ElButton\n\t\t\t\t\t\t\t\t\t\t\t\tloading={state.loading}\n\t\t\t\t\t\t\t\t\t\t\t\ticon={Search}\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvoid loadData(1);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t</ElInput>\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t{slots.header?.()}\n\t\t\t\t\t\t</Fragment>,\n\t\t\t\t\t],\n\t\t\t\t\tfooter: () => (\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<ElPagination\n\t\t\t\t\t\t\t\tclass=\"fa-select-page-dropdown__pagination\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tvModel:currentPage={pageIndexModel.value}\n\t\t\t\t\t\t\t\tpageSize={state.pageSize}\n\t\t\t\t\t\t\t\ttotal={state.totalRows}\n\t\t\t\t\t\t\t\tlayout=\"prev, pager, next, total\"\n\t\t\t\t\t\t\t\tpagerCount={5}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{slots.footer?.()}\n\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t),\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...(props.multiple\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tlabel: ({ label: _label, value }: { label: string; value: string | number | boolean | object }): VNode[] => {\n\t\t\t\t\t\t\t\t\tconst selectedData = state.selectedList.find((f) => f.value === value);\n\t\t\t\t\t\t\t\t\tif (slots.label) {\n\t\t\t\t\t\t\t\t\t\treturn slots.label({ label: selectedData?.label ?? _label, value: selectedData?.value ?? value });\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn selectedData ? [<span class=\"el-select__tags-text\">{selectedData.label}</span>] : [];\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: slots.label && {\n\t\t\t\t\t\t\t\tlabel: ({ label, value }: { label: string; value: string | number | boolean | object }): VNode[] =>\n\t\t\t\t\t\t\t\t\tslots.label?.({ label, value }) ?? [],\n\t\t\t\t\t\t\t}),\n\t\t\t\t}}\n\t\t\t</ElSelect>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 使选择器的输入框获取焦点 */\n\t\t\tfocus: computed(() => selectRef.value?.focus),\n\t\t\t/** @description 使选择器的输入框失去焦点,并隐藏下拉框 */\n\t\t\tblur: computed(() => selectRef.value?.blur),\n\t\t\t/** @description 获取当前选中的标签 */\n\t\t\tselectedLabel: computed(() => selectRef.value?.selectedLabel),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading: computed(() => state.loading),\n\t\t\t/** @description 选中的数据 */\n\t\t\tselectedList: computed(() => state.selectedList),\n\t\t\t/** @description 刷新 */\n\t\t\trefresh: loadData,\n\t\t\t/** @description 设置选择 */\n\t\t\tsetSelection: (value: Exclude<ElSelectorModelValue, null | undefined>) => handleModelValueUpdate(value),\n\t\t\t/** @description 清除选择 */\n\t\t\tclearSelection: () => handleModelValueUpdate(props.multiple ? [] : undefined),\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;;AAaA,MAAa,oBAAoB;CAChC,GAAG;;CAEH,UAAU;EACT,MAAM;EACN,SAAS,KAAA;CACV;;CAEA,aAAa;EACZ,MAAM;EACN,SAAS;CACV;;CAEA,aAAa;EACZ,MAAM;EACN,SAAS;CACV;;CAEA,YAAY;EACX,MAAM;EACN,SAAS;CACV;;CAEA,cAAc;EACb,MAAM;EACN,SAAS;CACV;;CAEA,qBAAqB;EACpB,MAAM;EACN,SAAS;CACV;;CAEA,YAAY;EACX,MAAM,eAAqC;GAAC;GAAQ;GAAQ;GAAS;GAAQ;EAAK,CAAC;EACnF,SAAS,KAAA;CACV;;CAEA,OAAO,eAAyC,CAAC,QAAQ,KAAK,CAAC;;CAE/D,OAAO;EACN,MAAM,CAAC,QAAQ,MAAM;EACrB,SAAS;CACV;;CAEA,YAAY;;CAEZ,OAAO;EACN,MAAM,eAAqC,MAAM;EACjD,gBAA+C;GAC9C,OAAO;GACP,MAAM;GACN,UAAU;GACV,UAAU;EACX;CACD;;CAEA,YAAY;EACX,MAA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C"}
1
+ {"version":3,"file":"selectPage.mjs","names":["update:modelValue","update:label"],"sources":["../../../../src/components/selectPage/src/selectPage.tsx"],"sourcesContent":["import { useVModel } from \"@vueuse/core\";\nimport { Fragment, computed, defineComponent, onMounted, reactive, ref, watch } from \"vue\";\nimport { Search } from \"@element-plus/icons-vue\";\nimport { ElButton, ElInput, ElOption, ElPagination, ElSelect, selectEmits, selectProps, useGlobalSize } from \"element-plus\";\nimport { isArray, isBoolean, isEqual, isNil, isNull, isNumber, isObject, isString } from \"lodash-unified\";\nimport { addCssUnit, definePropType, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport { FaSelectOption } from \"../../select\";\nimport type { VNode } from \"vue\";\nimport type { ElSelectorModelValue, ElSelectorOutput, ElSelectorValue } from \"../../select\";\nimport type { SelectComponentProps } from \"../../select/src/select\";\nimport type { PagedInput, PagedResult } from \"../../table\";\n\n/** FaSelectPage 的运行时 Props 定义。 */\nexport const faSelectPageProps = {\n\t...selectProps,\n\t/** @description whether Select is disabled 重载使其支持 ElForm*/\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: undefined,\n\t},\n\t/** @description displayed text while loading data from server, default is 'Loading' */\n\tloadingText: {\n\t\ttype: String,\n\t\tdefault: \"加载中...\",\n\t},\n\t/** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */\n\tnoMatchText: {\n\t\ttype: String,\n\t\tdefault: \"暂无匹配的数据\",\n\t},\n\t/** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */\n\tnoDataText: {\n\t\ttype: String,\n\t\tdefault: \"暂无数据\",\n\t},\n\t/** @description whether to collapse tags to a text when multiple selecting */\n\tcollapseTags: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true */\n\tcollapseTagsTooltip: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<ElSelectorModelValue>([String, Number, Boolean, Object, Array]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: definePropType<string | string[] | null>([String, Array]),\n\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"100%\",\n\t},\n\t/** @description 更多细节,只有使用slot的时候有用 */\n\tmoreDetail: Boolean,\n\t/** @description 配置选项 */\n\tprops: {\n\t\ttype: definePropType<SelectComponentProps>(Object),\n\t\tdefault: (): Partial<SelectComponentProps> => ({\n\t\t\tlabel: \"label\",\n\t\t\thide: \"hide\",\n\t\t\tdisabled: \"disabled\",\n\t\t\tchildren: \"children\",\n\t\t}),\n\t},\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: PagedInput) => Promise<PagedResult<ElSelectorOutput>>>(Function),\n\t\trequired: true as const,\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | PagedInput | null>([String, Number, Object]),\n};\n\n/** FaSelectPage 的运行时 Emits 定义。 */\nexport const faSelectPageEmits = {\n\t...selectEmits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: ElSelectorModelValue): boolean =>\n\t\tisString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isArray(value) || isNil(value),\n\t/** @description 选中数据改变 */\n\tchange: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue): boolean => true,\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string | string[] | null): boolean => isString(value) || isArray(value) || isNull(value),\n\t/** @description 数据改变 */\n\tdataChangeCallBack: (data: ElSelectorOutput[]): boolean => isArray(data),\n};\n\n/** FaSelectPage 的插槽参数。 */\nexport interface FaSelectPageSlots extends Record<string, unknown> {\n\t/** @description FaSelectOption 默认内容插槽 */\n\tdefault: ElSelectorOutput;\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: \"FaSelectPage\",\n\tprops: faSelectPageProps,\n\temits: faSelectPageEmits,\n\tslots: makeSlots<FaSelectPageSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst selectedLabel = useVModel(props, \"label\", emit, { passive: true });\n\t\tconst _globalSize = useGlobalSize();\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<ElSelectorModelValue>(),\n\t\t\tloading: false,\n\t\t\tselectorData: withDefineType<ElSelectorOutput[]>([]),\n\t\t\t/** 选中的数据 */\n\t\t\tselectedList: withDefineType<ElSelectorOutput[]>([]),\n\t\t\t/** 首次出现 */\n\t\t\tdebut: true,\n\t\t\t/** 回显 */\n\t\t\techo: true,\n\t\t\t/** 下次刷新 */\n\t\t\tnextRefresh: false,\n\t\t\tpageIndex: 1,\n\t\t\tpageSize: 15,\n\t\t\ttotalRows: 0,\n\t\t\tsearchValue: undefined,\n\t\t\tdefaultSelectorData: withDefineType<ElSelectorOutput | undefined>(),\n\t\t});\n\n\t\tconst selectRef = ref<InstanceType<typeof ElSelect>>();\n\t\tlet requestVersion = 0;\n\n\t\tconst handleData = (data: ElSelectorOutput[]): ElSelectorOutput[] => {\n\t\t\treturn data\n\t\t\t\t.map((item): ElSelectorOutput => {\n\t\t\t\t\tconst value: unknown = item[props.valueKey];\n\t\t\t\t\tconst label: unknown = typeof props.props.label === \"function\" ? props.props.label(item) : item[props.props.label ?? \"label\"];\n\t\t\t\t\tconst hide: unknown = typeof props.props.hide === \"function\" ? props.props.hide(item) : item[props.props.hide ?? \"hide\"];\n\t\t\t\t\tconst disabled: unknown =\n\t\t\t\t\t\ttypeof props.props.disabled === \"function\" ? props.props.disabled(item) : item[props.props.disabled ?? \"disabled\"];\n\t\t\t\t\tconst children: unknown = item[props.props.children ?? \"children\"];\n\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t(typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\" || typeof value === \"object\")\n\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...item,\n\t\t\t\t\t\tchildren: Array.isArray(children) ? handleData(children as ElSelectorOutput[]) : [],\n\t\t\t\t\t\tdisabled: typeof disabled === \"boolean\" ? disabled : undefined,\n\t\t\t\t\t\thide: typeof hide === \"boolean\" ? hide : undefined,\n\t\t\t\t\t\tlabel: typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t\t.filter((item) => item.hide !== true);\n\t\t};\n\n\t\tconst loadData = async (pageIndex?: number): Promise<void> => {\n\t\t\tconst currentRequestVersion = ++requestVersion;\n\t\t\tstate.loading = true;\n\t\t\tstate.pageIndex = pageIndex ?? state.pageIndex;\n\t\t\tconst params: PagedInput = {\n\t\t\t\t...(typeof props.initParam === \"object\" && props.initParam !== null ? props.initParam : {}),\n\t\t\t\tpageIndex: state.pageIndex,\n\t\t\t\tpageSize: state.pageSize,\n\t\t\t\tsearchValue: state.searchValue,\n\t\t\t};\n\t\t\ttry {\n\t\t\t\tconst resData = await props.requestApi(params);\n\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t// 这里不允许回显了\n\t\t\t\tstate.echo = false;\n\t\t\t\tstate.totalRows = resData.totalRows ?? 0;\n\t\t\t\tstate.selectorData = handleData(resData.rows ?? []);\n\t\t\t\temit(\"dataChangeCallBack\", state.selectorData);\n\t\t\t} catch (error) {\n\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\tstate.pageIndex = 1;\n\t\t\t\tstate.totalRows = 0;\n\t\t\t\tstate.selectorData = [];\n\t\t\t\tthrow error;\n\t\t\t} finally {\n\t\t\t\tif (currentRequestVersion === requestVersion) state.loading = false;\n\t\t\t}\n\t\t};\n\n\t\tconst pageIndexModel = computed({\n\t\t\tget: () => state.pageIndex,\n\t\t\tset: (pageIndex: number) => {\n\t\t\t\tloadData(pageIndex);\n\t\t\t},\n\t\t});\n\n\t\tconst handleModelValueUpdate = (value: ElSelectorModelValue): void => {\n\t\t\tstate.value = value;\n\t\t\temit(\"update:modelValue\", value);\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\tawait 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\tif (!Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectPage]\", \"当启用 multiple 时,传入的 modelValue 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && !isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectPage]\", \"当启用 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.selectedList = newValue\n\t\t\t\t\t\t\t// 最大选项截取\n\t\t\t\t\t\t\t.slice(0, props.multipleLimit > 0 ? props.multipleLimit : newValue.length)\n\t\t\t\t\t\t\t.map((item, index) => {\n\t\t\t\t\t\t\t\tconst value: unknown = item;\n\t\t\t\t\t\t\t\tconst label: unknown = Array.isArray(props.label) ? props.label[index] : undefined;\n\t\t\t\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t\t\t\t(typeof value === \"string\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"number\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"boolean\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"object\")\n\t\t\t\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t\t\t\t\tlabel: hasLabel && typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectPage]\", \"当禁用 multiple 时,传入的 modelValue 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectPage]\", \"当禁用 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.defaultSelectorData = {\n\t\t\t\t\t\t\tvalue: newValue,\n\t\t\t\t\t\t\tlabel: typeof props.label === \"string\" ? props.label : undefined,\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\tconst flattenOptions = (data: ElSelectorOutput[]): ElSelectorOutput[] =>\n\t\t\tdata.flatMap((item) => [item, ...flattenOptions(item.children ?? [])]);\n\n\t\tconst handleChange = (value?: ElSelectorModelValue): void => {\n\t\t\tconst selectorData = flattenOptions([\n\t\t\t\t...state.selectedList,\n\t\t\t\t...(state.defaultSelectorData ? [state.defaultSelectorData] : []),\n\t\t\t\t...state.selectorData,\n\t\t\t]);\n\t\t\tif (props.multiple) {\n\t\t\t\tconst valueList = Array.isArray(value) ? value : [];\n\t\t\t\tif (valueList.length === 0) {\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst dataList = valueList\n\t\t\t\t\t.map((item) => selectorData.find((option) => option.value !== undefined && isEqual(option.value, item)))\n\t\t\t\t\t.filter((item): item is ElSelectorOutput => item !== undefined);\n\t\t\t\temit(\"change\", dataList, value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (isNil(value) || Array.isArray(value)) {\n\t\t\t\temit(\"change\", null, null);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst data = selectorData.find((item) => item.value !== undefined && isEqual(item.value, value));\n\t\t\temit(\"change\", data ?? null, value);\n\t\t};\n\n\t\twatch(\n\t\t\t[() => state.value, () => state.selectorData],\n\t\t\t([value]) => {\n\t\t\t\tconst selectorData = flattenOptions([\n\t\t\t\t\t...state.selectedList,\n\t\t\t\t\t...(state.defaultSelectorData ? [state.defaultSelectorData] : []),\n\t\t\t\t\t...state.selectorData,\n\t\t\t\t]);\n\n\t\t\t\tif (props.multiple) {\n\t\t\t\t\tif (!Array.isArray(value)) {\n\t\t\t\t\t\tstate.selectedList = [];\n\t\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.selectedList = value\n\t\t\t\t\t\t.map((item) => selectorData.find((option) => option.value !== undefined && isEqual(option.value, item)))\n\t\t\t\t\t\t.filter((item): item is ElSelectorOutput => item !== undefined);\n\t\t\t\t\tselectedLabel.value = value.map((item, index) => {\n\t\t\t\t\t\tconst data = state.selectedList.find((option) => option.value !== undefined && isEqual(option.value, item));\n\n\t\t\t\t\t\treturn data?.label ?? (Array.isArray(props.label) ? (props.label[index] ?? \"\") : \"\");\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (isNil(value) || Array.isArray(value)) {\n\t\t\t\t\tstate.selectedList = [];\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst data = selectorData.find((item) => item.value !== undefined && isEqual(item.value, value));\n\t\t\t\tstate.selectedList = data ? [data] : [];\n\t\t\t\tselectedLabel.value = data?.label ?? (typeof props.label === \"string\" ? props.label : null);\n\t\t\t},\n\t\t\t{\n\t\t\t\tdeep: true,\n\t\t\t\tflush: \"sync\",\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\tonMounted(() => {\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\thandleModelValueUpdate(props.multiple ? [] : undefined);\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});\n\n\t\tconst elSelectProps = useProps(props, selectProps, [\"modelValue\", \"popperClass\", \"loading\", \"props\"]);\n\t\tconst elSelectEmits = useEmits(selectEmits, emit, [\"update:modelValue\", \"change\", \"visible-change\"]);\n\t\tconst elPopperClass = computed(() => [\n\t\t\t`fa-select-page-dropdown fa-select-page-dropdown-${_globalSize.value}`,\n\t\t\tprops.popperClass,\n\t\t\tprops.moreDetail && `fa-select-dropdown__more-detail fa-select-dropdown__more-detail-${_globalSize.value}`,\n\t\t]);\n\n\t\tuseRender(() => (\n\t\t\t<ElSelect\n\t\t\t\t{...elSelectProps.value}\n\t\t\t\t{...elSelectEmits.value}\n\t\t\t\tref={selectRef}\n\t\t\t\tclass=\"fa-select-page\"\n\t\t\t\tpopperClass={elPopperClass.value}\n\t\t\t\tstyle={{ width: addCssUnit(props.width) }}\n\t\t\t\tmodelValue={state.value}\n\t\t\t\tonUpdate:modelValue={handleModelValueUpdate}\n\t\t\t\tonChange={handleChange}\n\t\t\t\tloading={state.loading}\n\t\t\t\tonVisible-change={handleVisibleChange}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\tdefault: (): VNode[] =>\n\t\t\t\t\t\tstate.selectorData.map((item) => (\n\t\t\t\t\t\t\t<FaSelectOption vSlots={{ default: slots.default }} data={item} moreDetail={props.moreDetail} />\n\t\t\t\t\t\t)),\n\t\t\t\t\theader: (): VNode[] => [\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t{state.defaultSelectorData?.value !== undefined && (\n\t\t\t\t\t\t\t\t<ElOption\n\t\t\t\t\t\t\t\t\tclass=\"fa-select-page-dropdown__default-selector\"\n\t\t\t\t\t\t\t\t\tvalue={state.defaultSelectorData.value}\n\t\t\t\t\t\t\t\t\tlabel={state.defaultSelectorData.label ?? \"\"}\n\t\t\t\t\t\t\t\t\tdisabled={true}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span>{state.defaultSelectorData.label}</span>\n\t\t\t\t\t\t\t\t\t<span>Default</span>\n\t\t\t\t\t\t\t\t</ElOption>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t<ElInput\n\t\t\t\t\t\t\t\t\tclass=\"fa-select-page-dropdown__search-input\"\n\t\t\t\t\t\t\t\t\tclearable={Boolean(state.searchValue)}\n\t\t\t\t\t\t\t\t\tplaceholder=\"请输入关键字搜索\"\n\t\t\t\t\t\t\t\t\tvModel_trim={state.searchValue}\n\t\t\t\t\t\t\t\t\tonKeyup={(event: KeyboardEvent) => {\n\t\t\t\t\t\t\t\t\t\tif (event.key === \"Enter\") {\n\t\t\t\t\t\t\t\t\t\t\tloadData(1);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\t\t\tappend: () => (\n\t\t\t\t\t\t\t\t\t\t\t<ElButton\n\t\t\t\t\t\t\t\t\t\t\t\tloading={state.loading}\n\t\t\t\t\t\t\t\t\t\t\t\ticon={Search}\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tloadData(1);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t</ElInput>\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t{slots.header?.()}\n\t\t\t\t\t\t</Fragment>,\n\t\t\t\t\t],\n\t\t\t\t\tfooter: () => (\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<ElPagination\n\t\t\t\t\t\t\t\tclass=\"fa-select-page-dropdown__pagination\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tvModel:currentPage={pageIndexModel.value}\n\t\t\t\t\t\t\t\tpageSize={state.pageSize}\n\t\t\t\t\t\t\t\ttotal={state.totalRows}\n\t\t\t\t\t\t\t\tlayout=\"prev, pager, next, total\"\n\t\t\t\t\t\t\t\tpagerCount={5}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{slots.footer?.()}\n\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t),\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...(props.multiple\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tlabel: ({ label: _label, value }: { label: string; value: string | number | boolean | object }): VNode[] => {\n\t\t\t\t\t\t\t\t\tconst selectedData = state.selectedList.find((f) => f.value === value);\n\t\t\t\t\t\t\t\t\tif (slots.label) {\n\t\t\t\t\t\t\t\t\t\treturn slots.label({ label: selectedData?.label ?? _label, value: selectedData?.value ?? value });\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn selectedData ? [<span class=\"el-select__tags-text\">{selectedData.label}</span>] : [];\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: slots.label && {\n\t\t\t\t\t\t\t\tlabel: ({ label, value }: { label: string; value: string | number | boolean | object }): VNode[] =>\n\t\t\t\t\t\t\t\t\tslots.label?.({ label, value }) ?? [],\n\t\t\t\t\t\t\t}),\n\t\t\t\t}}\n\t\t\t</ElSelect>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 使选择器的输入框获取焦点 */\n\t\t\tfocus: computed(() => selectRef.value?.focus),\n\t\t\t/** @description 使选择器的输入框失去焦点,并隐藏下拉框 */\n\t\t\tblur: computed(() => selectRef.value?.blur),\n\t\t\t/** @description 获取当前选中的标签 */\n\t\t\tselectedLabel: computed(() => selectRef.value?.selectedLabel),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading: computed(() => state.loading),\n\t\t\t/** @description 选中的数据 */\n\t\t\tselectedList: computed(() => state.selectedList),\n\t\t\t/** @description 刷新 */\n\t\t\trefresh: loadData,\n\t\t\t/** @description 设置选择 */\n\t\t\tsetSelection: (value: Exclude<ElSelectorModelValue, null | undefined>) => handleModelValueUpdate(value),\n\t\t\t/** @description 清除选择 */\n\t\t\tclearSelection: () => handleModelValueUpdate(props.multiple ? [] : undefined),\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;;AAaA,MAAa,oBAAoB;CAChC,GAAG;;CAEH,UAAU;EACT,MAAM;EACN,SAAS,KAAA;CACV;;CAEA,aAAa;EACZ,MAAM;EACN,SAAS;CACV;;CAEA,aAAa;EACZ,MAAM;EACN,SAAS;CACV;;CAEA,YAAY;EACX,MAAM;EACN,SAAS;CACV;;CAEA,cAAc;EACb,MAAM;EACN,SAAS;CACV;;CAEA,qBAAqB;EACpB,MAAM;EACN,SAAS;CACV;;CAEA,YAAY;EACX,MAAM,eAAqC;GAAC;GAAQ;GAAQ;GAAS;GAAQ;EAAK,CAAC;EACnF,SAAS,KAAA;CACV;;CAEA,OAAO,eAAyC,CAAC,QAAQ,KAAK,CAAC;;CAE/D,OAAO;EACN,MAAM,CAAC,QAAQ,MAAM;EACrB,SAAS;CACV;;CAEA,YAAY;;CAEZ,OAAO;EACN,MAAM,eAAqC,MAAM;EACjD,gBAA+C;GAC9C,OAAO;GACP,MAAM;GACN,UAAU;GACV,UAAU;EACX;CACD;;CAEA,YAAY;EACX,MAAM,eAAgF,QAAQ;EAC9F,UAAU;CACX;;CAEA,WAAW,eAAoD;EAAC;EAAQ;EAAQ;CAAM,CAAC;AACxF;;AAGA,MAAa,oBAAoB;CAChC,GAAG;;CAEH,sBAAsB,UACrB,SAAS,KAAK,KAAK,SAAS,KAAK,KAAK,UAAU,KAAK,KAAK,SAAS,KAAK,KAAK,QAAQ,KAAK,KAAK,MAAM,KAAK;;CAE3G,SAAS,OAAqD,WAA2C;;CAEzG,iBAAiB,UAA6C,SAAS,KAAK,KAAK,QAAQ,KAAK,KAAK,OAAO,KAAK;;CAE/G,qBAAqB,SAAsC,QAAQ,IAAI;AACxE;AAsBA,IAAA,qBAAe,gBAAgB;CAC9B,MAAM;CACN,OAAO;CACP,OAAO;CACP,OAAO,U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O,QAAQ,YAAmF;IAC3G,MAAM,eAAe,MAAM,aAAa,MAAM,MAAM,EAAE,UAAU,KAAK;IACrE,IAAI,MAAM,OACT,OAAO,MAAM,MAAM;KAAE,OAAO,cAAc,SAAS;KAAQ,OAAO,cAAc,SAAS;IAAM,CAAC;IAEjG,OAAO,eAAe,CAAA,YAAA,QAAA,EAAA,SAAA,uBAAA,GAAA,CAAqC,aAAa,KAAK,CAAA,CAAA,IAAY,CAAA;GAC1F,EACD,IACC,MAAM,SAAS,EACf,QAAQ,EAAE,OAAO,YAChB,MAAM,QAAQ;IAAE;IAAO;GAAM,CAAC,KAAK,CAAA,EACrC;EAAE,CAAA,CAGN;EAED,OAAO,UAAU,QAAQ;;GAExB,OAAO,eAAe,UAAU,OAAO,KAAK;;GAE5C,MAAM,eAAe,UAAU,OAAO,IAAI;;GAE1C,eAAe,eAAe,UAAU,OAAO,aAAa;;GAE5D,SAAS,eAAe,MAAM,OAAO;;GAErC,cAAc,eAAe,MAAM,YAAY;;GAE/C,SAAS;;GAET,eAAe,UAA2D,uBAAuB,KAAK;;GAEtG,sBAAsB,uBAAuB,MAAM,WAAW,CAAA,IAAK,KAAA,CAAS;EAC7E,CAAC;CACF;AACD,CAAC"}
@@ -1402,11 +1402,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1402
1402
  default: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1403
1403
  };
1404
1404
  }>> & Readonly<{
1405
- onBlur?: ((_event: FocusEvent) => any) | undefined;
1406
- onFocus?: ((_event: FocusEvent) => any) | undefined;
1407
1405
  onClear?: (() => any) | undefined;
1408
1406
  onChange?: ((_data: ElSelectorOutput<ElSelectorValue, any> | ElSelectorOutput<ElSelectorValue, any>[] | null, _value?: ElSelectorModelValue) => any) | undefined;
1409
1407
  "onUpdate:modelValue"?: ((value: ElSelectorModelValue) => any) | undefined;
1408
+ onFocus?: ((_event: FocusEvent) => any) | undefined;
1409
+ onBlur?: ((_event: FocusEvent) => any) | undefined;
1410
1410
  "onEnd-reached"?: ((_direction: ScrollbarDirection) => any) | undefined;
1411
1411
  "onVisible-change"?: ((_visible: boolean) => any) | undefined;
1412
1412
  "onUpdate:label"?: ((value: string | string[] | null) => any) | undefined;
@@ -433,7 +433,7 @@ var selectV2_default = defineComponent({
433
433
  /** 首次出现 */
434
434
  debut: true,
435
435
  /** 回显 */
436
- echo: props.data?.length > 0 ? false : true,
436
+ echo: props.data.length > 0 ? false : true,
437
437
  /** 下次刷新 */
438
438
  nextRefresh: false
439
439
  });
@@ -461,7 +461,7 @@ var selectV2_default = defineComponent({
461
461
  } else {
462
462
  if (currentRequestVersion !== requestVersion) return;
463
463
  state.echo = false;
464
- state.selectorData = props.data ?? [];
464
+ state.selectorData = props.data;
465
465
  }
466
466
  };
467
467
  const handleModelValueUpdate = (value) => {
@@ -588,7 +588,7 @@ var selectV2_default = defineComponent({
588
588
  const firstItem = state.selectorData[0];
589
589
  const firstValue = firstItem && getOptionValue(firstItem);
590
590
  if (firstValue !== void 0) handleModelValueUpdate(props.multiple ? [firstValue] : firstValue);
591
- } else if (!props.requestApi && props.data?.length > 0) {
591
+ } else if (!props.requestApi && props.data.length > 0) {
592
592
  state.debut = false;
593
593
  await loadData();
594
594
  } else if (!props.lazy) await loadData();
@@ -1 +1 @@
1
- {"version":3,"file":"selectV2.mjs","names":["update:modelValue","end-reached","remove-tag","visible-change","update:label"],"sources":["../../../../src/components/selectV2/src/selectV2.tsx"],"sourcesContent":["import { useVModel } from \"@vueuse/core\";\nimport { computed, defineComponent, onMounted, reactive, ref, watch } from \"vue\";\nimport { ArrowDown, CircleClose } from \"@element-plus/icons-vue\";\nimport { ElSelectV2, tagProps, useAriaProps, useEmptyValuesProps, useGlobalSize, useSizeProp, useTooltipContentProps } from \"element-plus\";\nimport { isArray, isBoolean, isEqual, isNil, isNull, isNumber, isObject, isString } from \"lodash-unified\";\nimport { addCssUnit, definePropType, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport type { SelectV2Props as ElementPlusSelectV2Props, Options, Placement, ScrollbarDirection } from \"element-plus\";\nimport type { Component, PropType, VNode } from \"vue\";\nimport type { ElSelectorModelValue, ElSelectorOutput, ElSelectorValue } from \"../../select/src/select.type\";\nimport type { PagedInput, PagedResult } from \"../../table\";\n\n/** 传递给底层 Element Plus 虚拟化选择器的扩展 Props。 */\nexport interface Props {\n\tlabel?: string;\n\tvalue?: string;\n\tdisabled?: string;\n\toptions?: string;\n}\n\n/** FaSelectV2 支持的业务选择器 Props 定义。 */\nexport const SelectV2Props = {\n\t/**\n\t * @description whether creating new items is allowed. To use this, `filterable` must be true\n\t */\n\tallowCreate: Boolean,\n\t/**\n\t * @description autocomplete of select input\n\t */\n\tautocomplete: {\n\t\ttype: definePropType<\"none\" | \"both\" | \"list\" | \"inline\">(String),\n\t\tdefault: \"none\",\n\t},\n\t/**\n\t * @description for non-filterable Select, this prop decides if the option menu pops up when the input is focused\n\t */\n\tautomaticDropdown: Boolean,\n\t/**\n\t * @description whether select can be cleared\n\t */\n\tclearable: Boolean,\n\t/**\n\t * @description custom clear icon\n\t */\n\tclearIcon: {\n\t\ttype: definePropType<string | Component>([String, Object, Function]),\n\t\tdefault: CircleClose,\n\t},\n\t/**\n\t * @description tooltip theme, built-in theme: `dark` / `light`\n\t */\n\teffect: {\n\t\ttype: definePropType<string>(String),\n\t\tdefault: \"light\",\n\t},\n\t/**\n\t * @description whether to collapse tags to a text when multiple selecting\n\t */\n\tcollapseTags: Boolean,\n\t/**\n\t * @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true\n\t */\n\tcollapseTagsTooltip: Boolean,\n\t/** @description collapse-tags tooltip configuration */\n\ttagTooltip: {\n\t\ttype: definePropType<ElementPlusSelectV2Props[\"tagTooltip\"]>(Object),\n\t\tdefault: (): NonNullable<ElementPlusSelectV2Props[\"tagTooltip\"]> => ({}),\n\t},\n\t/**\n\t * @description The max tags number to be shown. To use this, `collapse-tags` must be true\n\t */\n\tmaxCollapseTags: {\n\t\ttype: Number,\n\t\tdefault: 1,\n\t},\n\t/**\n\t * @description\n\t */\n\tdefaultFirstOption: Boolean,\n\t/**\n\t * @description is disabled\n\t */\n\tdisabled: Boolean,\n\t/**\n\t * @description\n\t */\n\testimatedOptionHeight: {\n\t\ttype: Number,\n\t\tdefault: undefined,\n\t},\n\t/**\n\t * @description is filterable\n\t */\n\tfilterable: Boolean,\n\t/**\n\t * @description\n\t */\n\tfilterMethod: Function as PropType<ElementPlusSelectV2Props[\"filterMethod\"]>,\n\t/**\n\t * @description The height of the dropdown panel, 34px for each item\n\t */\n\theight: {\n\t\ttype: Number,\n\t\tdefault: 274, // same as select dropdown menu\n\t},\n\t/**\n\t * @description The height of the dropdown item\n\t */\n\titemHeight: {\n\t\ttype: Number,\n\t\tdefault: 34,\n\t},\n\t/**\n\t * @description\n\t */\n\tid: String,\n\t/**\n\t * @description whether Select is loading data from server\n\t */\n\tloading: Boolean,\n\t/**\n\t * @description displayed text while loading data from server, default is 'Loading'\n\t */\n\tloadingText: String,\n\t/**\n\t * @description biding value\n\t */\n\tmodelValue: {\n\t\ttype: definePropType<ElSelectorModelValue>([Array, String, Number, Boolean, Object]),\n\t},\n\t/**\n\t * @description is multiple\n\t */\n\tmultiple: Boolean,\n\t/**\n\t * @description maximum number of options user can select when multiple is true. No limit when set to 0\n\t */\n\tmultipleLimit: {\n\t\ttype: Number,\n\t\tdefault: 0,\n\t},\n\t/**\n\t * @description the name attribute of select input\n\t */\n\tname: String,\n\t/**\n\t * @description displayed text when there is no options, you can also use slot empty, the default is 'No Data'\n\t */\n\tnoDataText: String,\n\t/**\n\t * @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data'\n\t */\n\tnoMatchText: String,\n\t/**\n\t * @description function that gets called when the input value changes. Its parameter is the current input value. To use this, `filterable` must be true\n\t */\n\tremoteMethod: Function as PropType<ElementPlusSelectV2Props[\"remoteMethod\"]>,\n\t/**\n\t * @description whether reserve the keyword after select filtered option.\n\t */\n\treserveKeyword: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description data of the options, the key of `value` and `label` can be customize by `props`\n\t */\n\toptions: {\n\t\ttype: definePropType<ElementPlusSelectV2Props[\"options\"]>(Array),\n\t\t// required: true,\n\t},\n\t/**\n\t * @description placeholder, the default is 'Please select'\n\t */\n\tplaceholder: {\n\t\ttype: String,\n\t},\n\t/**\n\t * @description whether select dropdown is teleported to the body\n\t */\n\tteleported: useTooltipContentProps.teleported,\n\t/**\n\t * @description when select dropdown is inactive and `persistent` is `false`, select dropdown will be destroyed\n\t */\n\tpersistent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description custom class name for Select's dropdown\n\t */\n\tpopperClass: {\n\t\ttype: String,\n\t\tdefault: \"\",\n\t},\n\t/** @description custom style for Select's dropdown */\n\tpopperStyle: useTooltipContentProps.popperStyle,\n\t/**\n\t * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n\t */\n\tpopperOptions: {\n\t\ttype: definePropType<Partial<Options>>(Object),\n\t\tdefault: (): Partial<Options> => ({}),\n\t},\n\t/**\n\t * @description whether search data from server\n\t */\n\tremote: Boolean,\n\t/** @description debounce delay during remote search, in milliseconds */\n\tdebounce: {\n\t\ttype: Number,\n\t\tdefault: 300,\n\t},\n\t/**\n\t * @description size of component\n\t */\n\tsize: useSizeProp,\n\t/**\n\t * @description configuration options, see the following table\n\t */\n\tprops: {\n\t\ttype: definePropType<Props>(Object),\n\t\tdefault: (): Required<Props> => ({\n\t\t\tlabel: \"label\",\n\t\t\tvalue: \"value\",\n\t\t\tdisabled: \"disabled\",\n\t\t\toptions: \"options\",\n\t\t}),\n\t},\n\t/**\n\t * @description unique identity key name for value, required when value is an object\n\t */\n\tvalueKey: {\n\t\ttype: String,\n\t\tdefault: \"value\",\n\t},\n\t/**\n\t * @description Controls whether the scrollbar is always displayed\n\t */\n\tscrollbarAlwaysOn: Boolean,\n\t/**\n\t * @description whether to trigger form validation\n\t */\n\tvalidateEvent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description offset of the dropdown\n\t */\n\toffset: {\n\t\ttype: Number,\n\t\tdefault: 12,\n\t},\n\t/** @description whether to show the suffix icon during remote search */\n\tremoteShowSuffix: Boolean,\n\t/**\n\t * @description Determines whether the arrow is displayed\n\t */\n\tshowArrow: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description position of dropdown\n\t */\n\tplacement: {\n\t\ttype: definePropType<Placement>(String),\n\t\tdefault: \"bottom-start\",\n\t},\n\t/**\n\t * @description list of possible positions for dropdown\n\t */\n\tfallbackPlacements: {\n\t\ttype: definePropType<Placement[]>(Array),\n\t\tdefault: [\"bottom-start\", \"top-start\", \"right\", \"left\"],\n\t},\n\t/**\n\t * @description tag type\n\t */\n\ttagType: { ...tagProps.type, default: \"info\" },\n\t/**\n\t * @description tag effect\n\t */\n\ttagEffect: { ...tagProps.effect, default: \"light\" },\n\t/**\n\t * @description tabindex for input\n\t */\n\ttabindex: {\n\t\ttype: [String, Number],\n\t\tdefault: 0,\n\t},\n\t/**\n\t * @description which element the select dropdown appends to\n\t */\n\tappendTo: String,\n\t/** @description whether the dropdown width follows the input width, or a fixed width */\n\tfitInputWidth: {\n\t\ttype: [Boolean, Number],\n\t\tdefault: true,\n\t\tvalidator: (value: boolean | number): boolean => isBoolean(value) || isNumber(value),\n\t},\n\t/** @description select suffix icon */\n\tsuffixIcon: {\n\t\ttype: definePropType<string | Component>([String, Object, Function]),\n\t\tdefault: ArrowDown,\n\t},\n\t...useEmptyValuesProps,\n\t...useAriaProps([\"ariaLabel\"]),\n};\n\n/** 底层虚拟化选择器的运行时 Emits 定义。 */\nexport const selectV2Emits = {\n\t\"update:modelValue\": (_value: ElSelectorModelValue): boolean => true,\n\tchange: (_value: ElSelectorModelValue): boolean => true,\n\t\"end-reached\": (_direction: ScrollbarDirection): boolean => true,\n\t\"remove-tag\": (_value: ElSelectorValue): boolean => true,\n\t\"visible-change\": (_visible: boolean): boolean => true,\n\tfocus: (_event: FocusEvent): boolean => true,\n\tblur: (_event: FocusEvent): boolean => true,\n\tclear: (): boolean => true,\n} as const;\n\n/** FaSelectV2 的运行时 Props 定义。 */\nexport const faSelectV2Props = {\n\t...SelectV2Props,\n\t/** @description whether Select is disabled 重载使其支持 ElForm*/\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: undefined,\n\t},\n\t/** @description displayed text while loading data from server, default is 'Loading' */\n\tloadingText: {\n\t\ttype: String,\n\t\tdefault: \"加载中...\",\n\t},\n\t/** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */\n\tnoMatchText: {\n\t\ttype: String,\n\t\tdefault: \"暂无匹配的数据\",\n\t},\n\t/** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */\n\tnoDataText: {\n\t\ttype: String,\n\t\tdefault: \"暂无数据\",\n\t},\n\t/** @description whether to collapse tags to a text when multiple selecting */\n\tcollapseTags: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true */\n\tcollapseTagsTooltip: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<ElSelectorModelValue>([String, Number, Boolean, Object, Array]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: definePropType<string | string[] | null>([String, Array]),\n\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"100%\",\n\t},\n\t/** @description 更多细节,只有使用slot的时候有用 */\n\tmoreDetail: Boolean,\n\t/** @description 懒加载远程数据,默认 true。当下拉框第一次显示的时候才会加载远程数据*/\n\tlazy: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 默认选中。不能和懒加载一起使用 */\n\tdefaultSelected: Boolean,\n\t/** @description 下拉框数据 */\n\tdata: {\n\t\ttype: definePropType<ElSelectorOutput[]>(Array),\n\t\tdefault: (): ElSelectorOutput[] => [],\n\t},\n\t/** 分页返回 */\n\tpageResult: Boolean,\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: string | number | PagedInput) => Promise<ElSelectorOutput[] | PagedResult<ElSelectorOutput>>>(Function),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | PagedInput>([String, Number, Object]),\n};\n\n/** FaSelectV2 的运行时 Emits 定义。 */\nexport const faSelectV2Emits = {\n\t...selectV2Emits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: ElSelectorModelValue): boolean =>\n\t\tisString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isArray(value) || isNil(value),\n\t/** @description 选中数据改变 */\n\tchange: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue): boolean => true,\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string | string[] | null): boolean => isString(value) || isArray(value) || isNull(value),\n\t/** @description 数据改变 */\n\tdataChangeCallBack: (data: ElSelectorOutput[]): boolean => isArray(data),\n};\n\n/** FaSelectV2 的插槽参数。 */\nexport interface FaSelectV2Slots extends Record<string, unknown> {\n\t/** @description FaSelectOption 默认内容插槽 */\n\tdefault: { item: ElSelectorOutput; index: number; disabled: boolean };\n\t/** @description 下拉列表顶部的内容 */\n\theader: never;\n\t/** @description 下拉列表底部的内容 */\n\tfooter: never;\n\t/** @description Select 组件头部内容 */\n\tprefix: never;\n\t/** @description 无选项时的列表 */\n\tempty: never;\n\t/** @description select 组件自定义标签内容 */\n\ttag: never;\n\t/** @description select 组件自定义 loading内容 */\n\tloading: never;\n\t/** @description select 组件自定义标签内容 */\n\tlabel: { label: string; value: string | number | boolean | object };\n}\n\nexport default defineComponent({\n\tname: \"FaSelectV2\",\n\tprops: faSelectV2Props,\n\temits: faSelectV2Emits,\n\tslots: makeSlots<FaSelectV2Slots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst selectedLabel = useVModel(props, \"label\", emit, { passive: true });\n\t\tconst _globalSize = useGlobalSize();\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<ElSelectorModelValue>(),\n\t\t\tloading: false,\n\t\t\tselectorData: withDefineType<ElSelectorOutput[]>([]),\n\t\t\t/** 首次出现 */\n\t\t\tdebut: true,\n\t\t\t/** 回显 */\n\t\t\techo: props.data?.length > 0 ? false : true,\n\t\t\t/** 下次刷新 */\n\t\t\tnextRefresh: false,\n\t\t});\n\n\t\tconst selectV2Ref = ref<InstanceType<typeof ElSelectV2>>();\n\t\tlet requestVersion = 0;\n\n\t\tconst loadData = async (): Promise<void> => {\n\t\t\tconst currentRequestVersion = ++requestVersion;\n\t\t\t// 判断是否需要自动请求\n\t\t\tif (props.requestApi) {\n\t\t\t\tstate.loading = true;\n\t\t\t\tconst params = props.initParam ?? {};\n\t\t\t\ttry {\n\t\t\t\t\tconst resData = await props.requestApi(params);\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\t// 这里不允许回显了\n\t\t\t\t\tstate.echo = false;\n\t\t\t\t\t// 判断是否为分页返回\n\t\t\t\t\tif (props.pageResult) {\n\t\t\t\t\t\tstate.selectorData = (resData as PagedResult<ElSelectorOutput>).rows ?? [];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate.selectorData = resData as ElSelectorOutput[];\n\t\t\t\t\t}\n\t\t\t\t\temit(\"dataChangeCallBack\", state.selectorData);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\tstate.selectorData = [];\n\t\t\t\t\tthrow error;\n\t\t\t\t} finally {\n\t\t\t\t\tif (currentRequestVersion === requestVersion) state.loading = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t// 这里不允许回显了\n\t\t\t\tstate.echo = false;\n\t\t\t\tstate.selectorData = props.data ?? [];\n\t\t\t}\n\t\t};\n\n\t\tconst handleModelValueUpdate = (value: ElSelectorModelValue): void => {\n\t\t\tstate.value = value;\n\t\t\temit(\"update:modelValue\", value);\n\t\t};\n\n\t\tconst handleVisibleChange = async (visible: boolean): Promise<void> => {\n\t\t\tif (visible) {\n\t\t\t\tif (state.debut) {\n\t\t\t\t\t// 首次出现\n\t\t\t\t\tstate.debut = false;\n\t\t\t\t\t// 懒加载\n\t\t\t\t\t!props.defaultSelected && props.lazy && (await loadData());\n\t\t\t\t} else {\n\t\t\t\t\t// 判断再次出现是否需要刷新数据\n\t\t\t\t\tif (state.nextRefresh) {\n\t\t\t\t\t\tstate.nextRefresh = false;\n\t\t\t\t\t\tawait loadData();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\temit(\"visible-change\", visible);\n\t\t};\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t(newValue) => {\n\t\t\t\tif (state.echo && !isNil(newValue)) {\n\t\t\t\t\tconst hasLabel = !isNil(props.label);\n\t\t\t\t\t// 判断是否为多选\n\t\t\t\t\tif (props.multiple) {\n\t\t\t\t\t\t// 判断是否为数组\n\t\t\t\t\t\tif (!Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectV2]\", \"当启用 multiple 时,传入的 modelValue 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && !isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectV2]\", \"当启用 multiple 时,传入的 modelValue:label 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = newValue\n\t\t\t\t\t\t\t// 最大选项截取\n\t\t\t\t\t\t\t.slice(0, props.multipleLimit > 0 ? props.multipleLimit : newValue.length)\n\t\t\t\t\t\t\t.map((item, index) => {\n\t\t\t\t\t\t\t\tconst value: unknown = item;\n\t\t\t\t\t\t\t\tconst label: unknown = Array.isArray(props.label) ? props.label[index] : undefined;\n\t\t\t\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t\t\t\t(typeof value === \"string\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"number\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"boolean\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"object\")\n\t\t\t\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t\t\t\t\tlabel: hasLabel && typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectV2]\", \"当禁用 multiple 时,传入的 modelValue 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectV2]\", \"当禁用 multiple 时,传入的 modelValue:label 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: newValue,\n\t\t\t\t\t\t\t\tlabel: typeof props.label === \"string\" ? props.label : undefined,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstate.value = newValue;\n\t\t\t},\n\t\t\t{\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\tconst getOptionValue = (item: ElSelectorOutput): ElSelectorValue | undefined => {\n\t\t\tconst value: unknown = item[props.props.value ?? \"value\"];\n\t\t\treturn value !== null &&\n\t\t\t\t(typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\" || typeof value === \"object\")\n\t\t\t\t? value\n\t\t\t\t: undefined;\n\t\t};\n\n\t\tconst getOptionLabel = (item: ElSelectorOutput): string | undefined => {\n\t\t\tconst label: unknown = item[props.props.label ?? \"label\"];\n\t\t\treturn typeof label === \"string\" ? label : undefined;\n\t\t};\n\n\t\tconst flattenOptions = (data: ElSelectorOutput[]): ElSelectorOutput[] =>\n\t\t\tdata.flatMap((item) => {\n\t\t\t\tconst children: unknown = item[props.props.options ?? \"options\"];\n\t\t\t\treturn [item, ...(Array.isArray(children) ? flattenOptions(children as ElSelectorOutput[]) : [])];\n\t\t\t});\n\n\t\tconst handleChange = (value?: ElSelectorModelValue): void => {\n\t\t\tconst selectorData = flattenOptions(state.selectorData);\n\t\t\tif (props.multiple) {\n\t\t\t\tconst valueList = Array.isArray(value) ? value : [];\n\t\t\t\tif (valueList.length === 0) {\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst dataList = valueList\n\t\t\t\t\t.map((item) =>\n\t\t\t\t\t\tselectorData.find((option) => {\n\t\t\t\t\t\t\tconst optionValue = getOptionValue(option);\n\t\t\t\t\t\t\treturn optionValue !== undefined && isEqual(optionValue, item);\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t\t.filter((item): item is ElSelectorOutput => item !== undefined);\n\t\t\t\temit(\"change\", dataList, value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (isNil(value) || Array.isArray(value)) {\n\t\t\t\temit(\"change\", null, null);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst data = selectorData.find((option) => {\n\t\t\t\tconst optionValue = getOptionValue(option);\n\t\t\t\treturn optionValue !== undefined && isEqual(optionValue, value);\n\t\t\t});\n\t\t\temit(\"change\", data ?? null, value);\n\t\t};\n\n\t\twatch(\n\t\t\t[() => state.value, () => state.selectorData],\n\t\t\t([value]) => {\n\t\t\t\tconst selectorData = flattenOptions(state.selectorData);\n\t\t\t\tif (props.multiple) {\n\t\t\t\t\tif (!Array.isArray(value)) {\n\t\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tselectedLabel.value = value.map((item, index) => {\n\t\t\t\t\t\tconst data = selectorData.find((option) => {\n\t\t\t\t\t\t\tconst optionValue = getOptionValue(option);\n\t\t\t\t\t\t\treturn optionValue !== undefined && isEqual(optionValue, item);\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn (data && getOptionLabel(data)) ?? (Array.isArray(props.label) ? (props.label[index] ?? \"\") : \"\");\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (isNil(value) || Array.isArray(value)) {\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst data = selectorData.find((option) => {\n\t\t\t\t\tconst optionValue = getOptionValue(option);\n\t\t\t\t\treturn optionValue !== undefined && isEqual(optionValue, value);\n\t\t\t\t});\n\t\t\t\tselectedLabel.value = (data && getOptionLabel(data)) ?? (typeof props.label === \"string\" ? props.label : null);\n\t\t\t},\n\t\t\t{\n\t\t\t\tdeep: true,\n\t\t\t\tflush: \"sync\",\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\tonMounted(async () => {\n\t\t\tif (props.defaultSelected) {\n\t\t\t\tawait loadData();\n\t\t\t\tconst firstItem = state.selectorData[0];\n\t\t\t\tconst firstValue = firstItem && getOptionValue(firstItem);\n\t\t\t\tif (firstValue !== undefined) {\n\t\t\t\t\thandleModelValueUpdate(props.multiple ? [firstValue] : firstValue);\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\thandleModelValueUpdate(props.multiple ? [] : undefined);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t\twatch(\n\t\t\t\t() => props.data,\n\t\t\t\t() => {\n\t\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\t\treturn loadData();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ deep: true }\n\t\t\t);\n\t\t});\n\n\t\tconst elSelectV2Props = useProps(props, SelectV2Props, [\"modelValue\", \"popperClass\", \"loading\", \"options\", \"itemHeight\"]);\n\t\tconst elSelectV2Emits = useEmits(selectV2Emits, emit, [\"update:modelValue\", \"change\", \"visible-change\"]);\n\t\tconst elPopperClass = computed(() => {\n\t\t\tlet localClass = `fa-select-v2-dropdown ${props.popperClass}`;\n\t\t\tif (props.moreDetail) {\n\t\t\t\tlocalClass += ` fa-select-v2-dropdown__more-detail fa-select-v2-dropdown__more-detail-${_globalSize.value}`;\n\t\t\t}\n\t\t\treturn localClass;\n\t\t});\n\n\t\tuseRender(() => (\n\t\t\t<ElSelectV2\n\t\t\t\t{...elSelectV2Props.value}\n\t\t\t\t{...elSelectV2Emits.value}\n\t\t\t\tref={selectV2Ref}\n\t\t\t\tclass=\"fa-select-v2\"\n\t\t\t\tpopperClass={elPopperClass.value}\n\t\t\t\tstyle={{ width: addCssUnit(props.width) }}\n\t\t\t\tmodelValue={state.value}\n\t\t\t\tonUpdate:modelValue={handleModelValueUpdate}\n\t\t\t\tonChange={handleChange}\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\tonVisible-change={handleVisibleChange}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\t...(slots.default && {\n\t\t\t\t\t\tdefault: ({ item, index, disabled }: { item: ElSelectorOutput; index: number; disabled: boolean }): VNode[] =>\n\t\t\t\t\t\t\tslots.default?.({ item, index, disabled }) ?? [],\n\t\t\t\t\t}),\n\t\t\t\t\t...(slots.header && { header: (): VNode[] => slots.header?.() ?? [] }),\n\t\t\t\t\t...(slots.footer && { footer: (): VNode[] => slots.footer?.() ?? [] }),\n\t\t\t\t\t...(slots.prefix && { prefix: (): VNode[] => slots.prefix?.() ?? [] }),\n\t\t\t\t\t...(slots.empty && { empty: (): VNode[] => slots.empty?.() ?? [] }),\n\t\t\t\t\t...(slots.tag && { tag: (): VNode[] => slots.tag?.() ?? [] }),\n\t\t\t\t\t...(slots.loading && { loading: (): VNode[] => slots.loading?.() ?? [] }),\n\t\t\t\t\t...(slots.label && {\n\t\t\t\t\t\tlabel: ({ label, value }: { label: string; value: string | number | boolean | object }): VNode[] =>\n\t\t\t\t\t\t\tslots.label?.({ label, value }) ?? [],\n\t\t\t\t\t}),\n\t\t\t\t}}\n\t\t\t</ElSelectV2>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 使选择器的输入框获取焦点 */\n\t\t\tfocus: computed(() => selectV2Ref.value?.focus),\n\t\t\t/** @description 使选择器的输入框失去焦点,并隐藏下拉框 */\n\t\t\tblur: computed(() => selectV2Ref.value?.blur),\n\t\t\t/** @description 获取当前选中的标签 */\n\t\t\tselectedLabel: computed(() => selectV2Ref.value?.selectedLabel),\n\t\t\t/** @description 滚动到指定选项索引。 */\n\t\t\tscrollTo: computed(() => selectV2Ref.value?.scrollTo),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading: computed(() => state.loading),\n\t\t\t/** @description 刷新 */\n\t\t\trefresh: loadData,\n\t\t\t/** @description 设置选择 */\n\t\t\tsetSelection: (value: Exclude<ElSelectorModelValue, null | undefined>) => handleModelValueUpdate(value),\n\t\t\t/** @description 清除选择 */\n\t\t\tclearSelection: () => handleModelValueUpdate(props.multiple ? [] : undefined),\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;AAoBA,MAAa,gBAAgB;;;;CAI5B,aAAa;;;;CAIb,cAAc;EACb,MAAM,eAAoD,MAAM;EAChE,SAAS;CACV;;;;CAIA,mBAAmB;;;;CAInB,WAAW;;;;CAIX,WAAW;EACV,MAAM,eAAmC;GAAC;GAAQ;GAAQ;EAAQ,CAAC;EACnE,SAAS;CACV;;;;CAIA,QAAQ;EACP,MAAM,eAAuB,MAAM;EACnC,SAAS;CACV;;;;CAIA,cAAc;;;;CAId,qBAAqB;;CAErB,YAAY;EACX,MAAM,eAAuD,MAAM;EACnE,gBAAqE,CAAC;CACvE;;;;CAIA,iBAAiB;EAChB,MAAM;EACN,SAAS;CACV;;;;CAIA,oBAAoB;;;;CAIpB,UAAU;;;;CAIV,uBAAuB;EACtB,MAAM;EACN,SAAS,KAAA;CACV;;;;CAIA,YAAY;;;;CAIZ,cAAc;;;;CAId,QAAQ;EACP,MAAM;EACN,SAAS;CACV;;;;CAIA,YAAY;EACX,MAAM;EACN,SAAS;CACV;;;;CAIA,IAAI;;;;CAIJ,SAAS;;;;CAIT,aAAa;;;;CAIb,YAAY,EACX,MAAM,eAAqC;EAAC;EAAO;EAAQ;EAAQ;EAAS;CAAM,CAAC,EACpF;;;;CAIA,UAAU;;;;CAIV,eAAe;EACd,MAAM;EACN,SAAS;CACV;;;;CAIA,MAAM;;;;CAIN,YAAY;;;;CAIZ,aAAa;;;;CAIb,cAAc;;;;CAId,gBAAgB;EAC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AK,CAAA,EAAG;GAC3D,GAAI,MAAM,WAAW,EAAE,eAAwB,MAAM,UAAU,KAAK,CAAA,EAAG;GACvE,GAAI,MAAM,SAAS,EAClB,QAAQ,EAAE,OAAO,YAChB,MAAM,QAAQ;IAAE;IAAO;GAAM,CAAC,KAAK,CAAA,EACrC;EAAE,CAAA,CAGJ;EAED,OAAO,UAAU,QAAQ;;GAExB,OAAO,eAAe,YAAY,OAAO,KAAK;;GAE9C,MAAM,eAAe,YAAY,OAAO,IAAI;;GAE5C,eAAe,eAAe,YAAY,OAAO,aAAa;;GAE9D,UAAU,eAAe,YAAY,OAAO,QAAQ;;GAEpD,SAAS,eAAe,MAAM,OAAO;;GAErC,SAAS;;GAET,eAAe,UAA2D,uBAAuB,KAAK;;GAEtG,sBAAsB,uBAAuB,MAAM,WAAW,CAAA,IAAK,KAAA,CAAS;EAC7E,CAAC;CACF;AACD,CAAC"}
1
+ {"version":3,"file":"selectV2.mjs","names":["update:modelValue","end-reached","remove-tag","visible-change","update:label"],"sources":["../../../../src/components/selectV2/src/selectV2.tsx"],"sourcesContent":["import { useVModel } from \"@vueuse/core\";\nimport { computed, defineComponent, onMounted, reactive, ref, watch } from \"vue\";\nimport { ArrowDown, CircleClose } from \"@element-plus/icons-vue\";\nimport { ElSelectV2, tagProps, useAriaProps, useEmptyValuesProps, useGlobalSize, useSizeProp, useTooltipContentProps } from \"element-plus\";\nimport { isArray, isBoolean, isEqual, isNil, isNull, isNumber, isObject, isString } from \"lodash-unified\";\nimport { addCssUnit, definePropType, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport type { SelectV2Props as ElementPlusSelectV2Props, Options, Placement, ScrollbarDirection } from \"element-plus\";\nimport type { Component, PropType, VNode } from \"vue\";\nimport type { ElSelectorModelValue, ElSelectorOutput, ElSelectorValue } from \"../../select/src/select.type\";\nimport type { PagedInput, PagedResult } from \"../../table\";\n\n/** 传递给底层 Element Plus 虚拟化选择器的扩展 Props。 */\nexport interface Props {\n\tlabel?: string;\n\tvalue?: string;\n\tdisabled?: string;\n\toptions?: string;\n}\n\n/** FaSelectV2 支持的业务选择器 Props 定义。 */\nexport const SelectV2Props = {\n\t/**\n\t * @description whether creating new items is allowed. To use this, `filterable` must be true\n\t */\n\tallowCreate: Boolean,\n\t/**\n\t * @description autocomplete of select input\n\t */\n\tautocomplete: {\n\t\ttype: definePropType<\"none\" | \"both\" | \"list\" | \"inline\">(String),\n\t\tdefault: \"none\",\n\t},\n\t/**\n\t * @description for non-filterable Select, this prop decides if the option menu pops up when the input is focused\n\t */\n\tautomaticDropdown: Boolean,\n\t/**\n\t * @description whether select can be cleared\n\t */\n\tclearable: Boolean,\n\t/**\n\t * @description custom clear icon\n\t */\n\tclearIcon: {\n\t\ttype: definePropType<string | Component>([String, Object, Function]),\n\t\tdefault: CircleClose,\n\t},\n\t/**\n\t * @description tooltip theme, built-in theme: `dark` / `light`\n\t */\n\teffect: {\n\t\ttype: definePropType<string>(String),\n\t\tdefault: \"light\",\n\t},\n\t/**\n\t * @description whether to collapse tags to a text when multiple selecting\n\t */\n\tcollapseTags: Boolean,\n\t/**\n\t * @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true\n\t */\n\tcollapseTagsTooltip: Boolean,\n\t/** @description collapse-tags tooltip configuration */\n\ttagTooltip: {\n\t\ttype: definePropType<ElementPlusSelectV2Props[\"tagTooltip\"]>(Object),\n\t\tdefault: (): NonNullable<ElementPlusSelectV2Props[\"tagTooltip\"]> => ({}),\n\t},\n\t/**\n\t * @description The max tags number to be shown. To use this, `collapse-tags` must be true\n\t */\n\tmaxCollapseTags: {\n\t\ttype: Number,\n\t\tdefault: 1,\n\t},\n\t/**\n\t * @description\n\t */\n\tdefaultFirstOption: Boolean,\n\t/**\n\t * @description is disabled\n\t */\n\tdisabled: Boolean,\n\t/**\n\t * @description\n\t */\n\testimatedOptionHeight: {\n\t\ttype: Number,\n\t\tdefault: undefined,\n\t},\n\t/**\n\t * @description is filterable\n\t */\n\tfilterable: Boolean,\n\t/**\n\t * @description\n\t */\n\tfilterMethod: Function as PropType<ElementPlusSelectV2Props[\"filterMethod\"]>,\n\t/**\n\t * @description The height of the dropdown panel, 34px for each item\n\t */\n\theight: {\n\t\ttype: Number,\n\t\tdefault: 274, // same as select dropdown menu\n\t},\n\t/**\n\t * @description The height of the dropdown item\n\t */\n\titemHeight: {\n\t\ttype: Number,\n\t\tdefault: 34,\n\t},\n\t/**\n\t * @description\n\t */\n\tid: String,\n\t/**\n\t * @description whether Select is loading data from server\n\t */\n\tloading: Boolean,\n\t/**\n\t * @description displayed text while loading data from server, default is 'Loading'\n\t */\n\tloadingText: String,\n\t/**\n\t * @description biding value\n\t */\n\tmodelValue: {\n\t\ttype: definePropType<ElSelectorModelValue>([Array, String, Number, Boolean, Object]),\n\t},\n\t/**\n\t * @description is multiple\n\t */\n\tmultiple: Boolean,\n\t/**\n\t * @description maximum number of options user can select when multiple is true. No limit when set to 0\n\t */\n\tmultipleLimit: {\n\t\ttype: Number,\n\t\tdefault: 0,\n\t},\n\t/**\n\t * @description the name attribute of select input\n\t */\n\tname: String,\n\t/**\n\t * @description displayed text when there is no options, you can also use slot empty, the default is 'No Data'\n\t */\n\tnoDataText: String,\n\t/**\n\t * @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data'\n\t */\n\tnoMatchText: String,\n\t/**\n\t * @description function that gets called when the input value changes. Its parameter is the current input value. To use this, `filterable` must be true\n\t */\n\tremoteMethod: Function as PropType<ElementPlusSelectV2Props[\"remoteMethod\"]>,\n\t/**\n\t * @description whether reserve the keyword after select filtered option.\n\t */\n\treserveKeyword: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description data of the options, the key of `value` and `label` can be customize by `props`\n\t */\n\toptions: {\n\t\ttype: definePropType<ElementPlusSelectV2Props[\"options\"]>(Array),\n\t\t// required: true,\n\t},\n\t/**\n\t * @description placeholder, the default is 'Please select'\n\t */\n\tplaceholder: {\n\t\ttype: String,\n\t},\n\t/**\n\t * @description whether select dropdown is teleported to the body\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-deprecated -- 复用 Element Plus 2.x 的运行时默认值与校验规则。\n\tteleported: useTooltipContentProps.teleported,\n\t/**\n\t * @description when select dropdown is inactive and `persistent` is `false`, select dropdown will be destroyed\n\t */\n\tpersistent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description custom class name for Select's dropdown\n\t */\n\tpopperClass: {\n\t\ttype: String,\n\t\tdefault: \"\",\n\t},\n\t/** @description custom style for Select's dropdown */\n\t// eslint-disable-next-line @typescript-eslint/no-deprecated -- 复用 Element Plus 2.x 的运行时类型定义。\n\tpopperStyle: useTooltipContentProps.popperStyle,\n\t/**\n\t * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n\t */\n\tpopperOptions: {\n\t\ttype: definePropType<Partial<Options>>(Object),\n\t\tdefault: (): Partial<Options> => ({}),\n\t},\n\t/**\n\t * @description whether search data from server\n\t */\n\tremote: Boolean,\n\t/** @description debounce delay during remote search, in milliseconds */\n\tdebounce: {\n\t\ttype: Number,\n\t\tdefault: 300,\n\t},\n\t/**\n\t * @description size of component\n\t */\n\tsize: useSizeProp,\n\t/**\n\t * @description configuration options, see the following table\n\t */\n\tprops: {\n\t\ttype: definePropType<Props>(Object),\n\t\tdefault: (): Required<Props> => ({\n\t\t\tlabel: \"label\",\n\t\t\tvalue: \"value\",\n\t\t\tdisabled: \"disabled\",\n\t\t\toptions: \"options\",\n\t\t}),\n\t},\n\t/**\n\t * @description unique identity key name for value, required when value is an object\n\t */\n\tvalueKey: {\n\t\ttype: String,\n\t\tdefault: \"value\",\n\t},\n\t/**\n\t * @description Controls whether the scrollbar is always displayed\n\t */\n\tscrollbarAlwaysOn: Boolean,\n\t/**\n\t * @description whether to trigger form validation\n\t */\n\tvalidateEvent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description offset of the dropdown\n\t */\n\toffset: {\n\t\ttype: Number,\n\t\tdefault: 12,\n\t},\n\t/** @description whether to show the suffix icon during remote search */\n\tremoteShowSuffix: Boolean,\n\t/**\n\t * @description Determines whether the arrow is displayed\n\t */\n\tshowArrow: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description position of dropdown\n\t */\n\tplacement: {\n\t\ttype: definePropType<Placement>(String),\n\t\tdefault: \"bottom-start\",\n\t},\n\t/**\n\t * @description list of possible positions for dropdown\n\t */\n\tfallbackPlacements: {\n\t\ttype: definePropType<Placement[]>(Array),\n\t\tdefault: [\"bottom-start\", \"top-start\", \"right\", \"left\"],\n\t},\n\t/**\n\t * @description tag type\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-deprecated -- 复用 Element Plus 2.x 的 Tag 运行时校验规则。\n\ttagType: { ...tagProps.type, default: \"info\" },\n\t/**\n\t * @description tag effect\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-deprecated -- 复用 Element Plus 2.x 的 Tag 运行时校验规则。\n\ttagEffect: { ...tagProps.effect, default: \"light\" },\n\t/**\n\t * @description tabindex for input\n\t */\n\ttabindex: {\n\t\ttype: [String, Number],\n\t\tdefault: 0,\n\t},\n\t/**\n\t * @description which element the select dropdown appends to\n\t */\n\tappendTo: String,\n\t/** @description whether the dropdown width follows the input width, or a fixed width */\n\tfitInputWidth: {\n\t\ttype: [Boolean, Number],\n\t\tdefault: true,\n\t\tvalidator: (value: boolean | number): boolean => isBoolean(value) || isNumber(value),\n\t},\n\t/** @description select suffix icon */\n\tsuffixIcon: {\n\t\ttype: definePropType<string | Component>([String, Object, Function]),\n\t\tdefault: ArrowDown,\n\t},\n\t// eslint-disable-next-line @typescript-eslint/no-deprecated -- 复用 Element Plus 2.x 的空值运行时约定。\n\t...useEmptyValuesProps,\n\t...useAriaProps([\"ariaLabel\"]),\n};\n\n/** 底层虚拟化选择器的运行时 Emits 定义。 */\nexport const selectV2Emits = {\n\t\"update:modelValue\": (_value: ElSelectorModelValue): boolean => true,\n\tchange: (_value: ElSelectorModelValue): boolean => true,\n\t\"end-reached\": (_direction: ScrollbarDirection): boolean => true,\n\t\"remove-tag\": (_value: ElSelectorValue): boolean => true,\n\t\"visible-change\": (_visible: boolean): boolean => true,\n\tfocus: (_event: FocusEvent): boolean => true,\n\tblur: (_event: FocusEvent): boolean => true,\n\tclear: (): boolean => true,\n} as const;\n\n/** FaSelectV2 的运行时 Props 定义。 */\nexport const faSelectV2Props = {\n\t...SelectV2Props,\n\t/** @description whether Select is disabled 重载使其支持 ElForm*/\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: undefined,\n\t},\n\t/** @description displayed text while loading data from server, default is 'Loading' */\n\tloadingText: {\n\t\ttype: String,\n\t\tdefault: \"加载中...\",\n\t},\n\t/** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */\n\tnoMatchText: {\n\t\ttype: String,\n\t\tdefault: \"暂无匹配的数据\",\n\t},\n\t/** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */\n\tnoDataText: {\n\t\ttype: String,\n\t\tdefault: \"暂无数据\",\n\t},\n\t/** @description whether to collapse tags to a text when multiple selecting */\n\tcollapseTags: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true */\n\tcollapseTagsTooltip: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<ElSelectorModelValue>([String, Number, Boolean, Object, Array]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: definePropType<string | string[] | null>([String, Array]),\n\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"100%\",\n\t},\n\t/** @description 更多细节,只有使用slot的时候有用 */\n\tmoreDetail: Boolean,\n\t/** @description 懒加载远程数据,默认 true。当下拉框第一次显示的时候才会加载远程数据*/\n\tlazy: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 默认选中。不能和懒加载一起使用 */\n\tdefaultSelected: Boolean,\n\t/** @description 下拉框数据 */\n\tdata: {\n\t\ttype: definePropType<ElSelectorOutput[]>(Array),\n\t\tdefault: (): ElSelectorOutput[] => [],\n\t},\n\t/** 分页返回 */\n\tpageResult: Boolean,\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: string | number | PagedInput) => Promise<ElSelectorOutput[] | PagedResult<ElSelectorOutput>>>(Function),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | PagedInput>([String, Number, Object]),\n};\n\n/** FaSelectV2 的运行时 Emits 定义。 */\nexport const faSelectV2Emits = {\n\t...selectV2Emits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: ElSelectorModelValue): boolean =>\n\t\tisString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isArray(value) || isNil(value),\n\t/** @description 选中数据改变 */\n\tchange: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue): boolean => true,\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string | string[] | null): boolean => isString(value) || isArray(value) || isNull(value),\n\t/** @description 数据改变 */\n\tdataChangeCallBack: (data: ElSelectorOutput[]): boolean => isArray(data),\n};\n\n/** FaSelectV2 的插槽参数。 */\nexport interface FaSelectV2Slots extends Record<string, unknown> {\n\t/** @description FaSelectOption 默认内容插槽 */\n\tdefault: { item: ElSelectorOutput; index: number; disabled: boolean };\n\t/** @description 下拉列表顶部的内容 */\n\theader: never;\n\t/** @description 下拉列表底部的内容 */\n\tfooter: never;\n\t/** @description Select 组件头部内容 */\n\tprefix: never;\n\t/** @description 无选项时的列表 */\n\tempty: never;\n\t/** @description select 组件自定义标签内容 */\n\ttag: never;\n\t/** @description select 组件自定义 loading内容 */\n\tloading: never;\n\t/** @description select 组件自定义标签内容 */\n\tlabel: { label: string; value: string | number | boolean | object };\n}\n\nexport default defineComponent({\n\tname: \"FaSelectV2\",\n\tprops: faSelectV2Props,\n\temits: faSelectV2Emits,\n\tslots: makeSlots<FaSelectV2Slots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst selectedLabel = useVModel(props, \"label\", emit, { passive: true });\n\t\tconst _globalSize = useGlobalSize();\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<ElSelectorModelValue>(),\n\t\t\tloading: false,\n\t\t\tselectorData: withDefineType<ElSelectorOutput[]>([]),\n\t\t\t/** 首次出现 */\n\t\t\tdebut: true,\n\t\t\t/** 回显 */\n\t\t\techo: props.data.length > 0 ? false : true,\n\t\t\t/** 下次刷新 */\n\t\t\tnextRefresh: false,\n\t\t});\n\n\t\tconst selectV2Ref = ref<InstanceType<typeof ElSelectV2>>();\n\t\tlet requestVersion = 0;\n\n\t\tconst loadData = async (): Promise<void> => {\n\t\t\tconst currentRequestVersion = ++requestVersion;\n\t\t\t// 判断是否需要自动请求\n\t\t\tif (props.requestApi) {\n\t\t\t\tstate.loading = true;\n\t\t\t\tconst params = props.initParam ?? {};\n\t\t\t\ttry {\n\t\t\t\t\tconst resData = await props.requestApi(params);\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\t// 这里不允许回显了\n\t\t\t\t\tstate.echo = false;\n\t\t\t\t\t// 判断是否为分页返回\n\t\t\t\t\tif (props.pageResult) {\n\t\t\t\t\t\tstate.selectorData = (resData as PagedResult<ElSelectorOutput>).rows ?? [];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate.selectorData = resData as ElSelectorOutput[];\n\t\t\t\t\t}\n\t\t\t\t\temit(\"dataChangeCallBack\", state.selectorData);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\tstate.selectorData = [];\n\t\t\t\t\tthrow error;\n\t\t\t\t} finally {\n\t\t\t\t\tif (currentRequestVersion === requestVersion) state.loading = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t// 这里不允许回显了\n\t\t\t\tstate.echo = false;\n\t\t\t\tstate.selectorData = props.data;\n\t\t\t}\n\t\t};\n\n\t\tconst handleModelValueUpdate = (value: ElSelectorModelValue): void => {\n\t\t\tstate.value = value;\n\t\t\temit(\"update:modelValue\", value);\n\t\t};\n\n\t\tconst handleVisibleChange = async (visible: boolean): Promise<void> => {\n\t\t\tif (visible) {\n\t\t\t\tif (state.debut) {\n\t\t\t\t\t// 首次出现\n\t\t\t\t\tstate.debut = false;\n\t\t\t\t\t// 懒加载\n\t\t\t\t\t!props.defaultSelected && props.lazy && (await loadData());\n\t\t\t\t} else {\n\t\t\t\t\t// 判断再次出现是否需要刷新数据\n\t\t\t\t\tif (state.nextRefresh) {\n\t\t\t\t\t\tstate.nextRefresh = false;\n\t\t\t\t\t\tawait loadData();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\temit(\"visible-change\", visible);\n\t\t};\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t(newValue) => {\n\t\t\t\tif (state.echo && !isNil(newValue)) {\n\t\t\t\t\tconst hasLabel = !isNil(props.label);\n\t\t\t\t\t// 判断是否为多选\n\t\t\t\t\tif (props.multiple) {\n\t\t\t\t\t\t// 判断是否为数组\n\t\t\t\t\t\tif (!Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectV2]\", \"当启用 multiple 时,传入的 modelValue 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && !isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectV2]\", \"当启用 multiple 时,传入的 modelValue:label 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = newValue\n\t\t\t\t\t\t\t// 最大选项截取\n\t\t\t\t\t\t\t.slice(0, props.multipleLimit > 0 ? props.multipleLimit : newValue.length)\n\t\t\t\t\t\t\t.map((item, index) => {\n\t\t\t\t\t\t\t\tconst value: unknown = item;\n\t\t\t\t\t\t\t\tconst label: unknown = Array.isArray(props.label) ? props.label[index] : undefined;\n\t\t\t\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t\t\t\t(typeof value === \"string\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"number\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"boolean\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"object\")\n\t\t\t\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t\t\t\t\tlabel: hasLabel && typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectV2]\", \"当禁用 multiple 时,传入的 modelValue 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectV2]\", \"当禁用 multiple 时,传入的 modelValue:label 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: newValue,\n\t\t\t\t\t\t\t\tlabel: typeof props.label === \"string\" ? props.label : undefined,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstate.value = newValue;\n\t\t\t},\n\t\t\t{\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\tconst getOptionValue = (item: ElSelectorOutput): ElSelectorValue | undefined => {\n\t\t\tconst value: unknown = item[props.props.value ?? \"value\"];\n\t\t\treturn value !== null &&\n\t\t\t\t(typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\" || typeof value === \"object\")\n\t\t\t\t? value\n\t\t\t\t: undefined;\n\t\t};\n\n\t\tconst getOptionLabel = (item: ElSelectorOutput): string | undefined => {\n\t\t\tconst label: unknown = item[props.props.label ?? \"label\"];\n\t\t\treturn typeof label === \"string\" ? label : undefined;\n\t\t};\n\n\t\tconst flattenOptions = (data: ElSelectorOutput[]): ElSelectorOutput[] =>\n\t\t\tdata.flatMap((item) => {\n\t\t\t\tconst children: unknown = item[props.props.options ?? \"options\"];\n\t\t\t\treturn [item, ...(Array.isArray(children) ? flattenOptions(children as ElSelectorOutput[]) : [])];\n\t\t\t});\n\n\t\tconst handleChange = (value?: ElSelectorModelValue): void => {\n\t\t\tconst selectorData = flattenOptions(state.selectorData);\n\t\t\tif (props.multiple) {\n\t\t\t\tconst valueList = Array.isArray(value) ? value : [];\n\t\t\t\tif (valueList.length === 0) {\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst dataList = valueList\n\t\t\t\t\t.map((item) =>\n\t\t\t\t\t\tselectorData.find((option) => {\n\t\t\t\t\t\t\tconst optionValue = getOptionValue(option);\n\t\t\t\t\t\t\treturn optionValue !== undefined && isEqual(optionValue, item);\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t\t.filter((item): item is ElSelectorOutput => item !== undefined);\n\t\t\t\temit(\"change\", dataList, value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (isNil(value) || Array.isArray(value)) {\n\t\t\t\temit(\"change\", null, null);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst data = selectorData.find((option) => {\n\t\t\t\tconst optionValue = getOptionValue(option);\n\t\t\t\treturn optionValue !== undefined && isEqual(optionValue, value);\n\t\t\t});\n\t\t\temit(\"change\", data ?? null, value);\n\t\t};\n\n\t\twatch(\n\t\t\t[() => state.value, () => state.selectorData],\n\t\t\t([value]) => {\n\t\t\t\tconst selectorData = flattenOptions(state.selectorData);\n\t\t\t\tif (props.multiple) {\n\t\t\t\t\tif (!Array.isArray(value)) {\n\t\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tselectedLabel.value = value.map((item, index) => {\n\t\t\t\t\t\tconst data = selectorData.find((option) => {\n\t\t\t\t\t\t\tconst optionValue = getOptionValue(option);\n\t\t\t\t\t\t\treturn optionValue !== undefined && isEqual(optionValue, item);\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn (data && getOptionLabel(data)) ?? (Array.isArray(props.label) ? (props.label[index] ?? \"\") : \"\");\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (isNil(value) || Array.isArray(value)) {\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst data = selectorData.find((option) => {\n\t\t\t\t\tconst optionValue = getOptionValue(option);\n\t\t\t\t\treturn optionValue !== undefined && isEqual(optionValue, value);\n\t\t\t\t});\n\t\t\t\tselectedLabel.value = (data && getOptionLabel(data)) ?? (typeof props.label === \"string\" ? props.label : null);\n\t\t\t},\n\t\t\t{\n\t\t\t\tdeep: true,\n\t\t\t\tflush: \"sync\",\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\tonMounted(async () => {\n\t\t\tif (props.defaultSelected) {\n\t\t\t\tawait loadData();\n\t\t\t\tconst firstItem = state.selectorData[0];\n\t\t\t\tconst firstValue = firstItem && getOptionValue(firstItem);\n\t\t\t\tif (firstValue !== undefined) {\n\t\t\t\t\thandleModelValueUpdate(props.multiple ? [firstValue] : firstValue);\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\thandleModelValueUpdate(props.multiple ? [] : undefined);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t\twatch(\n\t\t\t\t() => props.data,\n\t\t\t\t() => {\n\t\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\t\treturn loadData();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ deep: true }\n\t\t\t);\n\t\t});\n\n\t\tconst elSelectV2Props = useProps(props, SelectV2Props, [\"modelValue\", \"popperClass\", \"loading\", \"options\", \"itemHeight\"]);\n\t\tconst elSelectV2Emits = useEmits(selectV2Emits, emit, [\"update:modelValue\", \"change\", \"visible-change\"]);\n\t\tconst elPopperClass = computed(() => {\n\t\t\tlet localClass = `fa-select-v2-dropdown ${props.popperClass}`;\n\t\t\tif (props.moreDetail) {\n\t\t\t\tlocalClass += ` fa-select-v2-dropdown__more-detail fa-select-v2-dropdown__more-detail-${_globalSize.value}`;\n\t\t\t}\n\t\t\treturn localClass;\n\t\t});\n\n\t\tuseRender(() => (\n\t\t\t<ElSelectV2\n\t\t\t\t{...elSelectV2Props.value}\n\t\t\t\t{...elSelectV2Emits.value}\n\t\t\t\tref={selectV2Ref}\n\t\t\t\tclass=\"fa-select-v2\"\n\t\t\t\tpopperClass={elPopperClass.value}\n\t\t\t\tstyle={{ width: addCssUnit(props.width) }}\n\t\t\t\tmodelValue={state.value}\n\t\t\t\tonUpdate:modelValue={handleModelValueUpdate}\n\t\t\t\tonChange={handleChange}\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\tonVisible-change={handleVisibleChange}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\t...(slots.default && {\n\t\t\t\t\t\tdefault: ({ item, index, disabled }: { item: ElSelectorOutput; index: number; disabled: boolean }): VNode[] =>\n\t\t\t\t\t\t\tslots.default?.({ item, index, disabled }) ?? [],\n\t\t\t\t\t}),\n\t\t\t\t\t...(slots.header && { header: (): VNode[] => slots.header?.() ?? [] }),\n\t\t\t\t\t...(slots.footer && { footer: (): VNode[] => slots.footer?.() ?? [] }),\n\t\t\t\t\t...(slots.prefix && { prefix: (): VNode[] => slots.prefix?.() ?? [] }),\n\t\t\t\t\t...(slots.empty && { empty: (): VNode[] => slots.empty?.() ?? [] }),\n\t\t\t\t\t...(slots.tag && { tag: (): VNode[] => slots.tag?.() ?? [] }),\n\t\t\t\t\t...(slots.loading && { loading: (): VNode[] => slots.loading?.() ?? [] }),\n\t\t\t\t\t...(slots.label && {\n\t\t\t\t\t\tlabel: ({ label, value }: { label: string; value: string | number | boolean | object }): VNode[] =>\n\t\t\t\t\t\t\tslots.label?.({ label, value }) ?? [],\n\t\t\t\t\t}),\n\t\t\t\t}}\n\t\t\t</ElSelectV2>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 使选择器的输入框获取焦点 */\n\t\t\tfocus: computed(() => selectV2Ref.value?.focus),\n\t\t\t/** @description 使选择器的输入框失去焦点,并隐藏下拉框 */\n\t\t\tblur: computed(() => selectV2Ref.value?.blur),\n\t\t\t/** @description 获取当前选中的标签 */\n\t\t\tselectedLabel: computed(() => selectV2Ref.value?.selectedLabel),\n\t\t\t/** @description 滚动到指定选项索引。 */\n\t\t\tscrollTo: computed(() => selectV2Ref.value?.scrollTo),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading: computed(() => state.loading),\n\t\t\t/** @description 刷新 */\n\t\t\trefresh: loadData,\n\t\t\t/** @description 设置选择 */\n\t\t\tsetSelection: (value: Exclude<ElSelectorModelValue, null | undefined>) => handleModelValueUpdate(value),\n\t\t\t/** @description 清除选择 */\n\t\t\tclearSelection: () => handleModelValueUpdate(props.multiple ? [] : undefined),\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;AAoBA,MAAa,gBAAgB;;;;CAI5B,aAAa;;;;CAIb,cAAc;EACb,MAAM,eAAoD,MAAM;EAChE,SAAS;CACV;;;;CAIA,mBAAmB;;;;CAInB,WAAW;;;;CAIX,WAAW;EACV,MAAM,eAAmC;GAAC;GAAQ;GAAQ;EAAQ,CAAC;EACnE,SAAS;CACV;;;;CAIA,QAAQ;EACP,MAAM,eAAuB,MAAM;EACnC,SAAS;CACV;;;;CAIA,cAAc;;;;CAId,qBAAqB;;CAErB,YAAY;EACX,MAAM,eAAuD,MAAM;EACnE,gBAAqE,CAAC;CACvE;;;;CAIA,iBAAiB;EAChB,MAAM;EACN,SAAS;CACV;;;;CAIA,oBAAoB;;;;CAIpB,UAAU;;;;CAIV,uBAAuB;EACtB,MAAM;EACN,SAAS,KAAA;CACV;;;;CAIA,YAAY;;;;CAIZ,cAAc;;;;CAId,QAAQ;EACP,MAAM;EACN,SAAS;CACV;;;;CAIA,YAAY;EACX,MAAM;EACN,SAAS;CACV;;;;CAIA,IAAI;;;;CAIJ,SAAS;;;;CAIT,aAAa;;;;CAIb,YAAY,EACX,MAAM,eAAqC;EAAC;EAAO;EAAQ;EAAQ;EAAS;CAAM,CAAC,EACpF;;;;CAIA,UAAU;;;;CAIV,eAAe;EACd,MAAM;EACN,SAAS;CACV;;;;CAIA,MAAM;;;;CAIN,YAAY;;;;CAIZ,aAAa;;;;CAIb,cAAc;;;;CAId,gBAAgB;EACf,MAAM;EACN,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AAI,MAAM,WAAW,EAAE,eAAwB,MAAM,UAAU,KAAK,CAAA,EAAG;GACvE,GAAI,MAAM,SAAS,EAClB,QAAQ,EAAE,OAAO,YAChB,MAAM,QAAQ;IAAE;IAAO;GAAM,CAAC,KAAK,CAAA,EACrC;EAAE,CAAA,CAGJ;EAED,OAAO,UAAU,QAAQ;;GAExB,OAAO,eAAe,YAAY,OAAO,KAAK;;GAE9C,MAAM,eAAe,YAAY,OAAO,IAAI;;GAE5C,eAAe,eAAe,YAAY,OAAO,aAAa;;GAE9D,UAAU,eAAe,YAAY,OAAO,QAAQ;;GAEpD,SAAS,eAAe,MAAM,OAAO;;GAErC,SAAS;;GAET,eAAe,UAA2D,uBAAuB,KAAK;;GAEtG,sBAAsB,uBAAuB,MAAM,WAAW,CAAA,IAAK,KAAA,CAAS;EAC7E,CAAC;CACF;AACD,CAAC"}
@@ -17,9 +17,9 @@ export declare const FaTable: TSXWithInstall<typeof Table> & {
17
17
  export default FaTable;
18
18
  /** 可独立注册的 FaTable 列组件。 */
19
19
  export declare const FaTableColumn: TSXWithInstall<typeof TableColumn>;
20
- export * from "./src/page.type";
21
- export * from "./src/table.state";
22
- export * from "./src/table.type";
20
+ export type * from "./src/page.type";
21
+ export type * from "./src/table.state";
22
+ export type * from "./src/table.type";
23
23
  export { faTableEmits, faTableProps, tableColumnProps, tableProps };
24
24
  export type { FaTableSlots };
25
25
  export type { FaTableColumnSlots, FaTableColumnSlotsResult } from "./src/tableColumn";
@@ -1,13 +1,11 @@
1
1
  import { withInstall, withNoopInstall } from "../../utils/vue/install.mjs";
2
2
  import { tableUtil } from "./utils/table.mjs";
3
- import { getTableDefaultSlots } from "./src/table.type.mjs";
4
3
  import tableColumn_default, { tableColumnProps } from "./src/tableColumn.mjs";
5
4
  import tableColumnSettingDialog_default from "./src/tableColumnSettingDialog.mjs";
6
5
  import tablePagination_default from "./src/tablePagination.mjs";
7
6
  import tableSearchFormItem_default from "./src/tableSearchFormItem.mjs";
8
7
  import tableSearchForm_default from "./src/tableSearchForm.mjs";
9
8
  import table_default, { faTableEmits, faTableProps, tableProps } from "./src/table.mjs";
10
- import { PagedSearchTypeEnum } from "./src/page.type.mjs";
11
9
  //#region src/components/table/index.ts
12
10
  /** 集成查询、分页、列配置和枚举映射的业务表格组件。 */
13
11
  const FaTable = withInstall(table_default, {
@@ -20,6 +18,6 @@ const FaTable = withInstall(table_default, {
20
18
  /** 可独立注册的 FaTable 列组件。 */
21
19
  const FaTableColumn = withNoopInstall(tableColumn_default);
22
20
  //#endregion
23
- export { FaTable, FaTable as default, FaTableColumn, PagedSearchTypeEnum, faTableEmits, faTableProps, getTableDefaultSlots, tableColumnProps, tableProps, tableUtil };
21
+ export { FaTable, FaTable as default, FaTableColumn, faTableEmits, faTableProps, tableColumnProps, tableProps, tableUtil };
24
22
 
25
23
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["Table","TableColumn"],"sources":["../../../src/components/table/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from \"../../utils\";\nimport Table, { type FaTableSlots, faTableEmits, faTableProps, tableProps } from \"./src/table\";\nimport TableColumn, { tableColumnProps } from \"./src/tableColumn\";\nimport TableColumnsSettingDialog from \"./src/tableColumnSettingDialog\";\nimport TablePagination from \"./src/tablePagination\";\nimport TableSearchForm from \"./src/tableSearchForm\";\nimport TableSearchFormItem from \"./src/tableSearchFormItem\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 集成查询、分页、列配置和枚举映射的业务表格组件。 */\nexport const FaTable: TSXWithInstall<typeof Table> & {\n\tTableColumn: typeof TableColumn;\n\tTableColumnsSettingDialog: typeof TableColumnsSettingDialog;\n\tTablePagination: typeof TablePagination;\n\tTableSearchForm: typeof TableSearchForm;\n\tTableSearchFormItem: typeof TableSearchFormItem;\n} = withInstall(Table, {\n\tTableColumn,\n\tTableColumnsSettingDialog,\n\tTablePagination,\n\tTableSearchForm,\n\tTableSearchFormItem,\n});\nexport default FaTable;\n\n/** 可独立注册的 FaTable 列组件。 */\nexport const FaTableColumn: TSXWithInstall<typeof TableColumn> = withNoopInstall(TableColumn);\n\nexport * from \"./src/page.type\";\nexport * from \"./src/table.state\";\nexport * from \"./src/table.type\";\n\nexport { faTableEmits, faTableProps, tableColumnProps, tableProps };\nexport type { FaTableSlots };\nexport type { FaTableColumnSlots, FaTableColumnSlotsResult } from \"./src/tableColumn\";\n\n/** FaTable 暴露的组件实例类型。 */\nexport type FaTableInstance = InstanceType<typeof Table>;\n\n/** FaTable 的完整 Props 类型。 */\nexport type FaTableProps = ExtractPropTypes<typeof faTableProps>;\n\n/** FaTable 的 Emits 类型。 */\nexport type FaTableEmits = typeof faTableEmits;\n\n/** FaTableColumn 暴露的组件实例类型。 */\nexport type FaTableColumnInstance = InstanceType<typeof TableColumn>;\n\nexport * from \"./utils/table\";\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,UAMT,YAAYA,eAAO;CACtB,aAAA;CACA,2BAAA;CACA,iBAAA;CACA,iBAAA;CACA,qBAAA;AACD,CAAC;;AAID,MAAa,gBAAoD,gBAAgBC,mBAAW"}
1
+ {"version":3,"file":"index.mjs","names":["Table","TableColumn"],"sources":["../../../src/components/table/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from \"../../utils\";\nimport Table, { type FaTableSlots, faTableEmits, faTableProps, tableProps } from \"./src/table\";\nimport TableColumn, { tableColumnProps } from \"./src/tableColumn\";\nimport TableColumnsSettingDialog from \"./src/tableColumnSettingDialog\";\nimport TablePagination from \"./src/tablePagination\";\nimport TableSearchForm from \"./src/tableSearchForm\";\nimport TableSearchFormItem from \"./src/tableSearchFormItem\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 集成查询、分页、列配置和枚举映射的业务表格组件。 */\nexport const FaTable: TSXWithInstall<typeof Table> & {\n\tTableColumn: typeof TableColumn;\n\tTableColumnsSettingDialog: typeof TableColumnsSettingDialog;\n\tTablePagination: typeof TablePagination;\n\tTableSearchForm: typeof TableSearchForm;\n\tTableSearchFormItem: typeof TableSearchFormItem;\n} = withInstall(Table, {\n\tTableColumn,\n\tTableColumnsSettingDialog,\n\tTablePagination,\n\tTableSearchForm,\n\tTableSearchFormItem,\n});\nexport default FaTable;\n\n/** 可独立注册的 FaTable 列组件。 */\nexport const FaTableColumn: TSXWithInstall<typeof TableColumn> = withNoopInstall(TableColumn);\n\nexport type * from \"./src/page.type\";\nexport type * from \"./src/table.state\";\nexport type * from \"./src/table.type\";\n\nexport { faTableEmits, faTableProps, tableColumnProps, tableProps };\nexport type { FaTableSlots };\nexport type { FaTableColumnSlots, FaTableColumnSlotsResult } from \"./src/tableColumn\";\n\n/** FaTable 暴露的组件实例类型。 */\nexport type FaTableInstance = InstanceType<typeof Table>;\n\n/** FaTable 的完整 Props 类型。 */\nexport type FaTableProps = ExtractPropTypes<typeof faTableProps>;\n\n/** FaTable 的 Emits 类型。 */\nexport type FaTableEmits = typeof faTableEmits;\n\n/** FaTableColumn 暴露的组件实例类型。 */\nexport type FaTableColumnInstance = InstanceType<typeof TableColumn>;\n\nexport * from \"./utils/table\";\n"],"mappings":";;;;;;;;;;AAWA,MAAa,UAMT,YAAYA,eAAO;CACtB,aAAA;CACA,2BAAA;CACA,iBAAA;CACA,iBAAA;CACA,qBAAA;AACD,CAAC;;AAID,MAAa,gBAAoD,gBAAgBC,mBAAW"}