fast-element-plus 1.0.7 → 1.0.10

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 (182) hide show
  1. package/dist/index.full.js +894 -757
  2. package/dist/index.full.js.map +1 -1
  3. package/dist/index.full.min.js +1 -1
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +1 -1
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +894 -757
  8. package/dist/index.full.mjs.map +1 -1
  9. package/dist/styles/index.css +41 -23
  10. package/dist/styles/index.css.map +1 -1
  11. package/es/components/avatar/src/avatar.d.ts +4 -4
  12. package/es/components/avatar/src/avatar.mjs +1 -1
  13. package/es/components/avatar/src/avatar.mjs.map +1 -1
  14. package/es/components/button/src/button.mjs.map +1 -1
  15. package/es/components/carNumber/src/carNumber.d.ts +13 -5
  16. package/es/components/carNumber/src/carNumber.mjs +1 -1
  17. package/es/components/carNumber/src/carNumber.mjs.map +1 -1
  18. package/es/components/contextMenu/src/contextMenu.mjs +1 -1
  19. package/es/components/contextMenu/src/contextMenu.mjs.map +1 -1
  20. package/es/components/dialog/src/dialog.d.ts +4 -4
  21. package/es/components/dialog/src/dialog.mjs +1 -1
  22. package/es/components/dialog/src/dialog.mjs.map +1 -1
  23. package/es/components/drawer/src/drawer.d.ts +12 -4
  24. package/es/components/drawer/src/drawer.mjs +1 -1
  25. package/es/components/drawer/src/drawer.mjs.map +1 -1
  26. package/es/components/form/src/form.mjs +1 -1
  27. package/es/components/form/src/form.mjs.map +1 -1
  28. package/es/components/form/src/formItem.mjs +1 -1
  29. package/es/components/form/src/formItem.mjs.map +1 -1
  30. package/es/components/formItemTip/src/formItemTip.mjs +1 -1
  31. package/es/components/formItemTip/src/formItemTip.mjs.map +1 -1
  32. package/es/components/icon/src/icon.mjs +1 -1
  33. package/es/components/icon/src/icon.mjs.map +1 -1
  34. package/es/components/iconSelector/src/iconSelector.mjs +1 -1
  35. package/es/components/iconSelector/src/iconSelector.mjs.map +1 -1
  36. package/es/components/image/src/image.mjs +1 -1
  37. package/es/components/image/src/image.mjs.map +1 -1
  38. package/es/components/index.d.ts +1 -0
  39. package/es/components/index.mjs +1 -1
  40. package/es/components/inputDialogPage/index.d.ts +14 -0
  41. package/es/components/inputDialogPage/index.mjs +2 -0
  42. package/es/components/inputDialogPage/index.mjs.map +1 -0
  43. package/es/components/inputDialogPage/src/inputDialogPage.d.ts +131 -0
  44. package/es/components/inputDialogPage/src/inputDialogPage.mjs +2 -0
  45. package/es/components/inputDialogPage/src/inputDialogPage.mjs.map +1 -0
  46. package/es/components/layoutGrid/src/layoutGrid.mjs +1 -1
  47. package/es/components/layoutGrid/src/layoutGrid.mjs.map +1 -1
  48. package/es/components/layoutGrid/src/layoutGridItem.d.ts +6 -6
  49. package/es/components/layoutGrid/src/layoutGridItem.mjs +1 -1
  50. package/es/components/layoutGrid/src/layoutGridItem.mjs.map +1 -1
  51. package/es/components/select/src/select.d.ts +39 -34
  52. package/es/components/select/src/select.mjs +1 -1
  53. package/es/components/select/src/select.mjs.map +1 -1
  54. package/es/components/select/src/selectOption.mjs +1 -1
  55. package/es/components/select/src/selectOption.mjs.map +1 -1
  56. package/es/components/selectPage/src/selectPage.d.ts +39 -25
  57. package/es/components/selectPage/src/selectPage.mjs +1 -1
  58. package/es/components/selectPage/src/selectPage.mjs.map +1 -1
  59. package/es/components/selectV2/src/selectV2.d.ts +36 -44
  60. package/es/components/selectV2/src/selectV2.mjs +1 -1
  61. package/es/components/selectV2/src/selectV2.mjs.map +1 -1
  62. package/es/components/table/src/table.d.ts +6 -6
  63. package/es/components/table/src/table.mjs +1 -1
  64. package/es/components/table/src/table.mjs.map +1 -1
  65. package/es/components/table/src/table.type.d.ts +1 -1
  66. package/es/components/table/src/table.type.mjs.map +1 -1
  67. package/es/components/table/src/tableColumn.mjs +1 -1
  68. package/es/components/table/src/tableColumn.mjs.map +1 -1
  69. package/es/components/table/src/tableColumnSettingDialog.mjs +1 -1
  70. package/es/components/table/src/tableColumnSettingDialog.mjs.map +1 -1
  71. package/es/components/table/src/useTable.mjs +1 -1
  72. package/es/components/table/src/useTable.mjs.map +1 -1
  73. package/es/components/table/utils/table.mjs +1 -1
  74. package/es/components/table/utils/table.mjs.map +1 -1
  75. package/es/components/tree/src/tree.d.ts +68 -174
  76. package/es/components/tree/src/tree.mjs +1 -1
  77. package/es/components/tree/src/tree.mjs.map +1 -1
  78. package/es/components/treeSelect/src/treeSelect.d.ts +123 -221
  79. package/es/components/treeSelect/src/treeSelect.mjs +1 -1
  80. package/es/components/treeSelect/src/treeSelect.mjs.map +1 -1
  81. package/es/directives/click-copy/index.mjs.map +1 -1
  82. package/es/directives/click-debounce/index.mjs.map +1 -1
  83. package/es/directives/click-draggable/index.mjs.map +1 -1
  84. package/es/directives/click-icon-copy/index.mjs.map +1 -1
  85. package/es/directives/click-longpress/index.mjs.map +1 -1
  86. package/es/directives/click-throttle/index.mjs.map +1 -1
  87. package/es/index.mjs +1 -1
  88. package/es/index.mjs.map +1 -1
  89. package/es/make-installer.mjs +1 -1
  90. package/es/make-installer.mjs.map +1 -1
  91. package/es/version.d.ts +1 -1
  92. package/es/version.mjs +1 -1
  93. package/es/version.mjs.map +1 -1
  94. package/lib/components/avatar/src/avatar.d.ts +4 -4
  95. package/lib/components/avatar/src/avatar.js +1 -1
  96. package/lib/components/avatar/src/avatar.js.map +1 -1
  97. package/lib/components/button/src/button.js.map +1 -1
  98. package/lib/components/carNumber/src/carNumber.d.ts +13 -5
  99. package/lib/components/carNumber/src/carNumber.js +1 -1
  100. package/lib/components/carNumber/src/carNumber.js.map +1 -1
  101. package/lib/components/contextMenu/src/contextMenu.js +1 -1
  102. package/lib/components/contextMenu/src/contextMenu.js.map +1 -1
  103. package/lib/components/dialog/src/dialog.d.ts +4 -4
  104. package/lib/components/dialog/src/dialog.js +1 -1
  105. package/lib/components/dialog/src/dialog.js.map +1 -1
  106. package/lib/components/drawer/src/drawer.d.ts +12 -4
  107. package/lib/components/drawer/src/drawer.js +1 -1
  108. package/lib/components/drawer/src/drawer.js.map +1 -1
  109. package/lib/components/form/src/form.js +1 -1
  110. package/lib/components/form/src/form.js.map +1 -1
  111. package/lib/components/form/src/formItem.js +1 -1
  112. package/lib/components/form/src/formItem.js.map +1 -1
  113. package/lib/components/formItemTip/src/formItemTip.js +1 -1
  114. package/lib/components/formItemTip/src/formItemTip.js.map +1 -1
  115. package/lib/components/icon/src/icon.js +1 -1
  116. package/lib/components/icon/src/icon.js.map +1 -1
  117. package/lib/components/iconSelector/src/iconSelector.js +1 -1
  118. package/lib/components/iconSelector/src/iconSelector.js.map +1 -1
  119. package/lib/components/image/src/image.js +1 -1
  120. package/lib/components/image/src/image.js.map +1 -1
  121. package/lib/components/index.d.ts +1 -0
  122. package/lib/components/index.js +1 -1
  123. package/lib/components/inputDialogPage/index.d.ts +14 -0
  124. package/lib/components/inputDialogPage/index.js +2 -0
  125. package/lib/components/inputDialogPage/index.js.map +1 -0
  126. package/lib/components/inputDialogPage/src/inputDialogPage.d.ts +131 -0
  127. package/lib/components/inputDialogPage/src/inputDialogPage.js +2 -0
  128. package/lib/components/inputDialogPage/src/inputDialogPage.js.map +1 -0
  129. package/lib/components/layoutGrid/src/layoutGrid.js +1 -1
  130. package/lib/components/layoutGrid/src/layoutGrid.js.map +1 -1
  131. package/lib/components/layoutGrid/src/layoutGridItem.d.ts +6 -6
  132. package/lib/components/layoutGrid/src/layoutGridItem.js +1 -1
  133. package/lib/components/layoutGrid/src/layoutGridItem.js.map +1 -1
  134. package/lib/components/select/src/select.d.ts +39 -34
  135. package/lib/components/select/src/select.js +1 -1
  136. package/lib/components/select/src/select.js.map +1 -1
  137. package/lib/components/select/src/selectOption.js +1 -1
  138. package/lib/components/select/src/selectOption.js.map +1 -1
  139. package/lib/components/selectPage/src/selectPage.d.ts +39 -25
  140. package/lib/components/selectPage/src/selectPage.js +1 -1
  141. package/lib/components/selectPage/src/selectPage.js.map +1 -1
  142. package/lib/components/selectV2/src/selectV2.d.ts +36 -44
  143. package/lib/components/selectV2/src/selectV2.js +1 -1
  144. package/lib/components/selectV2/src/selectV2.js.map +1 -1
  145. package/lib/components/table/src/table.d.ts +6 -6
  146. package/lib/components/table/src/table.js +1 -1
  147. package/lib/components/table/src/table.js.map +1 -1
  148. package/lib/components/table/src/table.type.d.ts +1 -1
  149. package/lib/components/table/src/table.type.js.map +1 -1
  150. package/lib/components/table/src/tableColumn.js +1 -1
  151. package/lib/components/table/src/tableColumn.js.map +1 -1
  152. package/lib/components/table/src/tableColumnSettingDialog.js +1 -1
  153. package/lib/components/table/src/tableColumnSettingDialog.js.map +1 -1
  154. package/lib/components/table/src/useTable.js.map +1 -1
  155. package/lib/components/table/utils/table.js +1 -1
  156. package/lib/components/table/utils/table.js.map +1 -1
  157. package/lib/components/tree/src/tree.d.ts +68 -174
  158. package/lib/components/tree/src/tree.js +1 -1
  159. package/lib/components/tree/src/tree.js.map +1 -1
  160. package/lib/components/treeSelect/src/treeSelect.d.ts +123 -221
  161. package/lib/components/treeSelect/src/treeSelect.js +1 -1
  162. package/lib/components/treeSelect/src/treeSelect.js.map +1 -1
  163. package/lib/directives/click-copy/index.js.map +1 -1
  164. package/lib/directives/click-debounce/index.js.map +1 -1
  165. package/lib/directives/click-draggable/index.js.map +1 -1
  166. package/lib/directives/click-icon-copy/index.js.map +1 -1
  167. package/lib/directives/click-longpress/index.js.map +1 -1
  168. package/lib/directives/click-throttle/index.js.map +1 -1
  169. package/lib/index.js +1 -1
  170. package/lib/index.js.map +1 -1
  171. package/lib/make-installer.js.map +1 -1
  172. package/lib/version.d.ts +1 -1
  173. package/lib/version.js +1 -1
  174. package/lib/version.js.map +1 -1
  175. package/package.json +3 -3
  176. package/styles/components/dialog.scss +1 -1
  177. package/styles/components/select.scss +35 -0
  178. package/styles/components/selectPage.scss +0 -30
  179. package/styles/components/table.scss +1 -1
  180. package/styles/components/tree.scss +17 -2
  181. package/styles/index.scss +1 -0
  182. package/types/components.d.ts +110 -1
@@ -1 +1 @@
1
- {"version":3,"file":"treeSelect.js","sources":["../../../../../packages/components/treeSelect/src/treeSelect.tsx"],"sourcesContent":["import { computed, defineComponent, onMounted, reactive, ref, watch } from \"vue\";\nimport { ElTreeSelect } from \"element-plus\";\nimport { type SelectComponentProps, SelectProps } from \"@fast-element-plus/components/select/src/select\";\nimport { treeProps } from \"@fast-element-plus/components/tree/src/tree.props\";\nimport { addUnit, consoleError, definePropType, makeSlots, useExpose, useProps, useRender, withDefineType } from \"@fast-china/utils\";\nimport { useVModel } from \"@vueuse/core\";\nimport { isArray, isBoolean, isEqual, isFunction, isNil, isNull, isNumber, isObject, isString } from \"lodash-unified\";\nimport type { ElSelectorOutput } from \"@fast-element-plus/components/select\";\nimport type { FilterValue, NodeDropType, TreeKey, TreeNodeData } from \"@fast-element-plus/components/tree/src/tree.props\";\nimport type { ComponentInternalInstance, VNode } from \"vue\";\n\nexport const faTreeSelectProps = {\n\t...SelectProps,\n\t...treeProps,\n\t/** @description displayed text while loading data from server, default is 'Loading' */\n\tloadingText: {\n\t\ttype: String,\n\t\tdefault: \"加载中...\",\n\t},\n\t/** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */\n\tnoMatchText: {\n\t\ttype: String,\n\t\tdefault: \"暂无匹配的数据\",\n\t},\n\t/** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */\n\tnoDataText: {\n\t\ttype: String,\n\t\tdefault: \"暂无数据\",\n\t},\n\t/** @description whether to collapse tags to a text when multiple selecting */\n\tcollapseTags: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true */\n\tcollapseTagsTooltip: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** 每个树节点用来作为唯一标识的属性,整棵树应该是唯一的 */\n\tnodeKey: {\n\t\ttype: String,\n\t\tdefault: \"value\",\n\t},\n\t/** @description 是否默认展开所有节点 */\n\tdefaultExpandAll: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否在点击节点的时候选中节点 */\n\tcheckOnClickNode: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否高亮当前选中节点 */\n\thighlightCurrent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否在点击节点的时候展开或者收缩节点, 默认值为 true,如果为 false,则只有点箭头图标的时候才会展开或者收缩节点。 */\n\texpandOnClickNode: Boolean,\n\t/** @description 点击折叠节点,需要开启 'expandOnClickNode' */\n\tcollapseOnClickNode: Boolean,\n\t/**\n\t * 懒加载节点的缓存数据,结构与数据相同,用于获取未加载数据的标签\n\t * @description The cached data of the lazy node, the structure is the same as the data, used to get the label of the unloaded data\n\t */\n\tcacheData: {\n\t\ttype: Array,\n\t\tdefault: (): [] => [],\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<string | number | boolean | object | (string | number | boolean | object)[]>([String, Number, Boolean, Object, Array]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: definePropType<string | string[]>([String, Array]),\n\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"100%\",\n\t},\n\t/** @description 更多细节,只有使用slot的时候有用 */\n\tmoreDetail: Boolean,\n\t/** @description 懒加载远程数据,默认 true。当下拉框第一次显示的时候才会加载远程数据*/\n\tlazy: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 默认选中。不能和懒加载一起使用 */\n\tdefaultSelected: Boolean,\n\t/** @description 配置选项 */\n\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[] | any[]>(Array),\n\t\tdefault: (): ElSelectorOutput[] | any[] => [],\n\t},\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: any) => Promise<ElSelectorOutput[] | any[]>>(Function),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | any>([String, Number, Object]),\n};\n\nexport const faTreeSelectEmits = {\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string | number | boolean | object | (string | number | boolean | object)[]): boolean =>\n\t\tisString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isArray(value) || isNull(value),\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string | string[]): boolean => isString(value) || isArray(value) || isNull(value),\n\n\t/** @description 数据改变 */\n\tdataChangeCallBack: (data: ElSelectorOutput[] | any[]): boolean => isArray(data),\n\t/** @description 改变 */\n\tchange: (\n\t\tdata: ElSelectorOutput | ElSelectorOutput[] | any | any[],\n\t\tvalue?: string | number | boolean | object | (string | number | boolean | object)[]\n\t): boolean =>\n\t\t(isObject(data) || isArray(data) || isNull(data)) &&\n\t\t(isString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isArray(value) || isNull(value)),\n\t/** @description 下拉框出现/隐藏时触发 */\n\tvisibleChange: (visible: boolean): boolean => isBoolean(visible),\n\t/** @description 多选模式下移除tag时触发 */\n\tremoveTag: (tagValue: any): boolean => isString(tagValue) || isNumber(tagValue) || isBoolean(tagValue) || isObject(tagValue) || isArray(tagValue),\n\t/** @description 可清空的单选模式下用户点击清空按钮时触发 */\n\tclear: (): boolean => true,\n\t/** @description 当 input 失去焦点时触发 */\n\tblur: (event: FocusEvent): boolean => event instanceof FocusEvent,\n\t/** @description 当 input 获得焦点时触发 */\n\tfocus: (event: FocusEvent): boolean => event instanceof FocusEvent,\n\n\t/** @description 当节点被点击的时候触发 */\n\tnodeClick: (data: ElSelectorOutput, node?: any, instance?: ComponentInternalInstance): boolean =>\n\t\tisObject(data) && isObject(node) && isObject(instance),\n\t/** @description 当某一节点被鼠标右键点击时会触发该事件 */\n\tnodeContextmenu: (event: Event, data: ElSelectorOutput, node?: any, instance?: ComponentInternalInstance): boolean =>\n\t\tevent instanceof Event && isObject(data) && isObject(node) && isObject(instance),\n\t/** @description 当复选框被点击的时候触发 */\n\tcheckChange: (data: ElSelectorOutput, checked: boolean, indeterminate: boolean): boolean =>\n\t\tisObject(data) && isBoolean(checked) && isBoolean(indeterminate),\n\t/** @description 点击节点复选框之后触发 */\n\tcheck: (\n\t\tdata: ElSelectorOutput,\n\t\tnode: {\n\t\t\tcheckedNodes: ElSelectorOutput[];\n\t\t\tcheckedKeys: TreeKey[];\n\t\t\thalfCheckedNodes: ElSelectorOutput[];\n\t\t\thalfCheckedKeys: TreeKey[];\n\t\t}\n\t): boolean => isObject(data) && isObject(node),\n\t/** @description 当前选中节点变化时触发的事件 */\n\tcurrentChange: (data: ElSelectorOutput, node: any): boolean => isObject(data) && isObject(node),\n\t/** @description 节点被展开时触发的事件 */\n\tnodeExpand: (data: ElSelectorOutput, node: any, instance: ComponentInternalInstance): boolean =>\n\t\tisObject(data) && isObject(node) && isObject(instance),\n\t/** @description 节点被关闭时触发的事件 */\n\tnodeCollapse: (data: ElSelectorOutput, node: any, instance: ComponentInternalInstance): boolean =>\n\t\tisObject(data) && isObject(node) && isObject(instance),\n\t/** @description 节点开始拖拽时触发的事件 */\n\tnodeDragStart: (node: any, event: DragEvent): boolean => isObject(node) && event instanceof DragEvent,\n\t/** @description 拖拽进入其他节点时触发的事件 */\n\tnodeDragEnter: (node: any, enterNode: any, event: DragEvent): boolean => isObject(node) && isObject(enterNode) && event instanceof DragEvent,\n\t/** @description 拖拽离开某个节点时触发的事件 */\n\tnodeDragLeave: (node: any, leaveNode: any, event: DragEvent): boolean => isObject(node) && isObject(leaveNode) && event instanceof DragEvent,\n\t/** @description 在拖拽节点时触发的事件(类似浏览器的 mouseover 事件) */\n\tnodeDragOver: (node: any, dropNode: any, event: DragEvent): boolean => isObject(node) && isObject(dropNode) && event instanceof DragEvent,\n\t/** @description 拖拽结束时(可能未成功)触发的事件 */\n\tnodeDragEnd: (node: any, dropNode: any, dropType: NodeDropType, event: DragEvent): boolean =>\n\t\tisObject(node) && isObject(dropNode) && isString(dropType) && event instanceof DragEvent,\n\t/** @description 拖拽成功完成时触发的事件 */\n\tnodeDrop: (node: any, dropNode: any, dropType: NodeDropType, event: DragEvent): boolean =>\n\t\tisObject(node) && isObject(dropNode) && isString(dropType) && event instanceof DragEvent,\n};\n\ntype FaTreeSelectSlots = {\n\t/** @description 默认内容插槽 */\n\tdefault: { node: any; data: ElSelectorOutput };\n\n\t/** @description 下拉列表顶部的内容 */\n\theader: never;\n\t/** @description 下拉列表底部的内容 */\n\tfooter: never;\n\t/** @description Select 组件头部内容 */\n\tprefix: never;\n\t/** @description 无选项时的列表 */\n\tempty: never;\n\t/** @description select 组件自定义标签内容 */\n\ttag: never;\n\t/** @description select 组件自定义 loading内容 */\n\tloading: never;\n\t/** @description select 组件自定义标签内容 */\n\tlabel: { label: string; value: string | number | boolean | object };\n};\n\nexport default defineComponent({\n\tname: \"FaTreeSelect\",\n\tprops: faTreeSelectProps,\n\temits: faTreeSelectEmits,\n\tslots: makeSlots<FaTreeSelectSlots>(),\n\tsetup(props, { attrs, slots, emit, expose }) {\n\t\tconst selectedLabel = useVModel(props, \"label\", emit, { passive: true });\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<string | number | boolean | object | (string | number | boolean | object)[]>(),\n\t\t\tloading: false,\n\t\t\tselectorData: withDefineType<ElSelectorOutput[]>([]),\n\t\t\t/** 首次出现 */\n\t\t\tdebut: true,\n\t\t\t/** 回显 */\n\t\t\techo: props.data?.length > 0 ? false : true,\n\t\t\t/** 下次刷新 */\n\t\t\tnextRefresh: false,\n\t\t});\n\n\t\tconst treeSelectRef = ref<InstanceType<typeof ElTreeSelect>>();\n\n\t\tconst handleData = (data: ElSelectorOutput[] | any[]): ElSelectorOutput[] => {\n\t\t\treturn data\n\t\t\t\t?.map((m) => ({\n\t\t\t\t\t...m,\n\t\t\t\t\tvalue: m[props.nodeKey],\n\t\t\t\t\tlabel: isFunction(props.props.label) ? props.props.label(m) : m[props.props.label ?? \"label\"],\n\t\t\t\t\thide: isFunction(props.props.hide) ? props.props.hide(m) : m[props.props.hide ?? \"hide\"],\n\t\t\t\t\tdisabled: isFunction(props.props.disabled) ? props.props.disabled(m) : m[props.props.disabled ?? \"disabled\"],\n\t\t\t\t\tchildren: isFunction(props.props.children)\n\t\t\t\t\t\t? handleData(props.props.children(m))\n\t\t\t\t\t\t: handleData(m[props.props.children ?? \"children\"]),\n\t\t\t\t}))\n\t\t\t\t.filter((f) => !f.hide);\n\t\t};\n\n\t\tconst loadData = async (): Promise<void> => {\n\t\t\t// 判断是否需要自动请求\n\t\t\tif (props.requestApi) {\n\t\t\t\tstate.loading = true;\n\t\t\t\tconst params = props.initParam ?? {};\n\t\t\t\ttry {\n\t\t\t\t\tconst resData = await props.requestApi(params);\n\t\t\t\t\t// 这里不允许回显了\n\t\t\t\t\tstate.echo = false;\n\t\t\t\t\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\tconsoleError(\"FaTreeSelect\", error);\n\t\t\t\t\tstate.selectorData = [];\n\t\t\t\t} finally {\n\t\t\t\t\tstate.loading = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// 这里不允许回显了\n\t\t\t\tstate.echo = false;\n\t\t\t\tstate.selectorData = handleData(props.data);\n\t\t\t}\n\t\t};\n\n\t\tconst handleFilterNode = (value: FilterValue, data: TreeNodeData, child: any): boolean => {\n\t\t\tif (!value) return true;\n\t\t\tlet parentNode = child.parent,\n\t\t\t\tlabels = [child.label],\n\t\t\t\tlevel = 1;\n\t\t\twhile (level < child.level) {\n\t\t\t\tlabels = [...labels, parentNode.label];\n\t\t\t\tparentNode = parentNode.parent;\n\t\t\t\tlevel++;\n\t\t\t}\n\t\t\tconst result = labels.some((label) => label.indexOf(value) !== -1);\n\t\t\tif (props.filterNodeMethod) {\n\t\t\t\treturn result && props.filterNodeMethod(value, data, child);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\n\t\tconst handleChange = (value?: string | number | boolean | object | (string | number | boolean | object)[], data?: ElSelectorOutput): void => {\n\t\t\t// 判断是否为多选\n\t\t\tif (props.multiple) {\n\t\t\t\t// value 必然是数组\n\t\t\t\tconst valueArr = value as (string | number | boolean | object)[];\n\t\t\t\tif (valueArr?.length === 0) {\n\t\t\t\t\tstate.value = null;\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\temit(\"update:modelValue\", null);\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst dataList = state.selectorData.filter((f) => valueArr.includes(f.value));\n\t\t\t\tstate.value = value;\n\t\t\t\tselectedLabel.value = dataList.map((m) => m.label);\n\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\temit(\"change\", dataList, value);\n\t\t\t} else {\n\t\t\t\t// value 必然不是数组\n\t\t\t\tif (isNil(value)) {\n\t\t\t\t\tstate.value = null;\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\temit(\"update:modelValue\", null);\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tdata ??= state.selectorData.find((f) => f.value === value);\n\t\t\t\tstate.value = value;\n\t\t\t\tselectedLabel.value = data.label;\n\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\temit(\"change\", data, value);\n\t\t\t}\n\t\t};\n\n\t\tconst handleClear = (): void => {\n\t\t\tstate.value = null;\n\t\t\tselectedLabel.value = null;\n\t\t\temit(\"clear\");\n\t\t};\n\n\t\tconst handleNodeClick = (data: ElSelectorOutput, node: any, instance: ComponentInternalInstance, event: MouseEvent): void => {\n\t\t\t// 判断是否开启点击展开节点,并且节点是折叠状态,则自动展开,否则需要点击箭头图标才能折叠或开启 'collapseOnClickNode'\n\t\t\tif (props.expandOnClickNode) {\n\t\t\t\tif (!node.expanded) {\n\t\t\t\t\tnode.expand();\n\t\t\t\t} else if (node.expanded && props.collapseOnClickNode) {\n\t\t\t\t\tnode.collapse();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// 判断是否开启了 checkStrictly\n\t\t\tif (props.checkStrictly) {\n\t\t\t\thandleChange(data.value, data);\n\t\t\t} else {\n\t\t\t\tif (node.isLeaf) {\n\t\t\t\t\thandleChange(data.value, data);\n\t\t\t\t}\n\t\t\t}\n\t\t\temit(\"nodeClick\", data, node, instance);\n\t\t};\n\n\t\t/**\n\t\t * 下拉框出现/隐藏时触发\n\t\t */\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\tprops.lazy && (await loadData());\n\t\t\t\t} else {\n\t\t\t\t\t// 判断再次出现是否需要刷新数据\n\t\t\t\t\tif (state.nextRefresh) {\n\t\t\t\t\t\tstate.nextRefresh = false;\n\t\t\t\t\t\tawait loadData();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\temit(\"visibleChange\", visible);\n\t\t};\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t(newValue) => {\n\t\t\t\tif (state.echo && !isNil(newValue)) {\n\t\t\t\t\tconst hasLabel = !isNil(props.label);\n\t\t\t\t\t// 判断是否为多选\n\t\t\t\t\tif (props.multiple) {\n\t\t\t\t\t\t// 判断是否为数组\n\t\t\t\t\t\tif (!isArray(newValue)) {\n\t\t\t\t\t\t\tconsoleError(\"FaTreeSelect\", \"当启用 multiple 时,传入的 modelValue 必须是Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && !isArray(props.label)) {\n\t\t\t\t\t\t\tconsoleError(\"FaTreeSelect\", \"当启用 multiple 时,传入的 modelValue:label 必须是Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = newValue\n\t\t\t\t\t\t\t// 最大选项截取\n\t\t\t\t\t\t\t.slice(0, props.multipleLimit > 0 ? props.multipleLimit : newValue.length)\n\t\t\t\t\t\t\t.map((item, index) => ({\n\t\t\t\t\t\t\t\tvalue: item,\n\t\t\t\t\t\t\t\tlabel: hasLabel ? props.label[index] : undefined,\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (isArray(newValue)) {\n\t\t\t\t\t\t\tconsoleError(\"FaTreeSelect\", \"当禁用 multiple 时,传入的 modelValue 不能是Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && isArray(props.label)) {\n\t\t\t\t\t\t\tconsoleError(\"FaTreeSelect\", \"当禁用 multiple 时,传入的 modelValue:label 不能是Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: newValue,\n\t\t\t\t\t\t\t\tlabel: props.label,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstate.value = newValue;\n\t\t\t},\n\t\t\t{\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\tonMounted(async () => {\n\t\t\tif (props.defaultSelected) {\n\t\t\t\tawait loadData();\n\t\t\t\tif (state.selectorData.length > 0) {\n\t\t\t\t\tif (props.multiple) {\n\t\t\t\t\t\thandleChange([state.selectorData[0].value]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\thandleChange(state.selectorData[0].value, state.selectorData[0]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// 判断是否为本地数据\n\t\t\telse if (!props.requestApi && props.data?.length > 0) {\n\t\t\t\tstate.debut = false;\n\t\t\t\tawait loadData();\n\t\t\t}\n\t\t\t// 判断是否非默认选中,且未启用懒加载\n\t\t\telse if (!props.lazy) {\n\t\t\t\tawait loadData();\n\t\t\t}\n\t\t\twatch(\n\t\t\t\t() => props.initParam,\n\t\t\t\t(newValue, oldValue) => {\n\t\t\t\t\tif (!isEqual(newValue, oldValue)) {\n\t\t\t\t\t\tstate.nextRefresh = true;\n\t\t\t\t\t\tif (!isNil(state.value)) {\n\t\t\t\t\t\t\thandleChange();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t\twatch(\n\t\t\t\t() => props.data,\n\t\t\t\tasync () => {\n\t\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\t\tawait loadData();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ deep: true }\n\t\t\t);\n\t\t});\n\n\t\tconst elTreeSelectProps = useProps(props, { ...SelectProps, ...treeProps }, [\n\t\t\t\"modelValue\",\n\t\t\t\"popperClass\",\n\t\t\t\"loading\",\n\t\t\t\"expandOnClickNode\",\n\t\t\t\"filterNodeMethod\",\n\t\t]);\n\n\t\tuseRender(() => (\n\t\t\t<ElTreeSelect\n\t\t\t\t{...elTreeSelectProps.value}\n\t\t\t\tref={treeSelectRef}\n\t\t\t\tclass=\"fa-tree-select\"\n\t\t\t\tpopperClass={`fa-tree-select-dropdown ${props.popperClass}`}\n\t\t\t\tstyle={{ width: addUnit(props.width) }}\n\t\t\t\tvModel={state.value}\n\t\t\t\tloading={state.loading}\n\t\t\t\tdata={state.selectorData}\n\t\t\t\texpandOnClickNode={props.checkOnClickNode ? false : props.expandOnClickNode}\n\t\t\t\tfilterNodeMethod={handleFilterNode}\n\t\t\t\tonNodeClick={handleNodeClick}\n\t\t\t\tonClear={handleClear}\n\t\t\t\tonVisibleChange={handleVisibleChange}\n\t\t\t\tonRemoveTag={(tagValue: any) => emit(\"removeTag\", tagValue)}\n\t\t\t\tonBlur={(event: FocusEvent) => emit(\"blur\", event)}\n\t\t\t\tonFocus={(event: FocusEvent) => emit(\"focus\", event)}\n\t\t\t\tonNodeContextmenu={(event: Event, data: ElSelectorOutput, node?: any, instance?: ComponentInternalInstance) =>\n\t\t\t\t\temit(\"nodeContextmenu\", event, data, node, instance)\n\t\t\t\t}\n\t\t\t\tonCheckChange={(data: ElSelectorOutput, checked: boolean, indeterminate: boolean) =>\n\t\t\t\t\temit(\"checkChange\", data, checked, indeterminate)\n\t\t\t\t}\n\t\t\t\tonCheck={(\n\t\t\t\t\tdata: ElSelectorOutput,\n\t\t\t\t\tnode: {\n\t\t\t\t\t\tcheckedNodes: ElSelectorOutput[];\n\t\t\t\t\t\tcheckedKeys: TreeKey[];\n\t\t\t\t\t\thalfCheckedNodes: ElSelectorOutput[];\n\t\t\t\t\t\thalfCheckedKeys: TreeKey[];\n\t\t\t\t\t}\n\t\t\t\t) => emit(\"check\", data, node)}\n\t\t\t\tonCurrentChange={(data: ElSelectorOutput, node: any) => emit(\"currentChange\", data, node)}\n\t\t\t\tonNodeExpand={(data: ElSelectorOutput, node: any, instance: ComponentInternalInstance) => emit(\"nodeExpand\", data, node, instance)}\n\t\t\t\tonNodeCollapse={(data: ElSelectorOutput, node: any, instance: ComponentInternalInstance) =>\n\t\t\t\t\temit(\"nodeCollapse\", data, node, instance)\n\t\t\t\t}\n\t\t\t\tonNodeDragStart={(node: any, event: DragEvent) => emit(\"nodeDragStart\", node, event)}\n\t\t\t\tonNodeDragEnter={(node: any, enterNode: any, event: DragEvent) => emit(\"nodeDragEnter\", node, enterNode, event)}\n\t\t\t\tonNodeDragLeave={(node: any, leaveNode: any, event: DragEvent) => emit(\"nodeDragLeave\", node, leaveNode, event)}\n\t\t\t\tonNodeDragOver={(node: any, dropNode: any, event: DragEvent) => emit(\"nodeDragOver\", node, dropNode, event)}\n\t\t\t\tonNodeDragEnd={(node: any, dropNode: any, dropType: NodeDropType, event: DragEvent) =>\n\t\t\t\t\temit(\"nodeDragEnd\", node, dropNode, dropType, event)\n\t\t\t\t}\n\t\t\t\tonNodeDrop={(node: any, dropNode: any, dropType: NodeDropType, event: DragEvent) => emit(\"nodeDrop\", node, dropNode, dropType, event)}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\t...(slots.default && {\n\t\t\t\t\t\tdefault: ({ node, data }: { node: any; data: ElSelectorOutput }): VNode[] => slots.default({ node, data }),\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</ElTreeSelect>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 使选择器的输入框获取焦点 */\n\t\t\tfocus: computed(() => treeSelectRef.value?.focus),\n\t\t\t/** @description 使选择器的输入框失去焦点,并隐藏下拉框 */\n\t\t\tblur: computed(() => treeSelectRef.value?.blur),\n\t\t\t/** @description 获取当前选中的标签 */\n\t\t\tselectedLabel: computed(() => treeSelectRef.value?.selectedLabel),\n\n\t\t\t/** @description 过滤所有树节点,过滤后的节点将被隐藏 */\n\t\t\tfilter: computed(() => treeSelectRef.value?.filter),\n\t\t\t/** @description 为节点设置新数据,只有当设置 node-key 属性的时候才可用 */\n\t\t\tupdateKeyChildren: computed(() => treeSelectRef.value?.updateKeyChildren),\n\t\t\t/** @description 如果节点可以被选中,(show-checkbox 为 true), 本方法将返回当前选中节点的数组 */\n\t\t\tgetCheckedNodes: computed(() => treeSelectRef.value?.getCheckedNodes),\n\t\t\t/** @description 设置目前勾选的节点,使用此方法必须提前设置 node-key 属性 */\n\t\t\tsetCheckedNodes: computed(() => treeSelectRef.value?.setCheckedNodes),\n\t\t\t/** @description 若节点可用被选中 (show-checkbox 为 true), 它将返回当前选中节点 key 的数组 */\n\t\t\tgetCheckedKeys: computed(() => treeSelectRef.value?.getCheckedKeys),\n\t\t\t/** @description 设置目前选中的节点,使用此方法必须设置 node-key 属性 */\n\t\t\tsetCheckedKeys: computed(() => treeSelectRef.value?.setCheckedKeys),\n\t\t\t/** @description 设置节点是否被选中, 使用此方法必须设置 node-key 属性 */\n\t\t\tsetChecked: computed(() => treeSelectRef.value?.setChecked),\n\t\t\t/** @description 如果节点可用被选中 (show-checkbox 为 true), 它将返回当前半选中的节点组成的数组 */\n\t\t\tgetHalfCheckedNodes: computed(() => treeSelectRef.value?.getHalfCheckedNodes),\n\t\t\t/** @description 若节点可被选中(show-checkbox 为 true),则返回目前半选中的节点的 key 所组成的数组 */\n\t\t\tgetHalfCheckedKeys: computed(() => treeSelectRef.value?.getHalfCheckedKeys),\n\t\t\t/** @description 返回当前被选中节点的数据 (如果没有则返回 null) */\n\t\t\tgetCurrentKey: computed(() => treeSelectRef.value?.getCurrentKey),\n\t\t\t/** @description 返回当前被选中节点的数据 (如果没有则返回 null) */\n\t\t\tgetCurrentNode: computed(() => treeSelectRef.value?.getCurrentNode),\n\t\t\t/** @description 通过 key 设置某个节点的当前选中状态,使用此方法必须设置 node-key 属性 */\n\t\t\tsetCurrentKey: computed(() => treeSelectRef.value?.setCurrentKey),\n\t\t\t/** @description 设置节点为选中状态,使用此方法必须设置 node-key 属性 */\n\t\t\tsetCurrentNode: computed(() => treeSelectRef.value?.setCurrentNode),\n\t\t\t/** @description 根据 data 或者 key 拿到 Tree 组件中的 node */\n\t\t\tgetNode: computed(() => treeSelectRef.value?.getNode),\n\t\t\t/** @description 删除 Tree 中的一个节点,使用此方法必须设置 node-key 属性 */\n\t\t\tremove: computed(() => treeSelectRef.value?.remove),\n\t\t\t/** @description 为 Tree 中的一个节点追加一个子节点 */\n\t\t\tappend: computed(() => treeSelectRef.value?.append),\n\t\t\t/** @description 在 Tree 中给定节点前插入一个节点 */\n\t\t\tinsertBefore: computed(() => treeSelectRef.value?.insertBefore),\n\t\t\t/** @description 在 Tree 中给定节点后插入一个节点 */\n\t\t\tinsertAfter: computed(() => treeSelectRef.value?.insertAfter),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading: computed(() => state.loading),\n\t\t\t/** @description 刷新 */\n\t\t\trefresh: loadData,\n\t\t\t/** @description 设置选择 */\n\t\t\tsetSelection: (value: string | number | boolean | object | (string | number | boolean | object)[]) => handleChange(value),\n\t\t\t/** @description 清除选择 */\n\t\t\tclearSelection: () => handleChange(null),\n\t\t});\n\t},\n});\n"],"names":["faTreeSelectProps","SelectProps","treeProps","loadingText","type","String","default","noMatchText","noDataText","collapseTags","Boolean","collapseTagsTooltip","nodeKey","defaultExpandAll","checkOnClickNode","highlightCurrent","expandOnClickNode","collapseOnClickNode","cacheData","Array","modelValue","definePropType","Number","Object","undefined","label","width","moreDetail","lazy","defaultSelected","props","hide","disabled","children","data","requestApi","Function","initParam","faTreeSelectEmits","value","isString","isNumber","isBoolean","isObject","isArray","isNull","dataChangeCallBack","change","visibleChange","visible","removeTag","tagValue","clear","blur","event","FocusEvent","focus","nodeClick","node","instance","nodeContextmenu","Event","checkChange","checked","indeterminate","check","currentChange","nodeExpand","nodeCollapse","nodeDragStart","DragEvent","nodeDragEnter","enterNode","nodeDragLeave","leaveNode","nodeDragOver","dropNode","nodeDragEnd","dropType","nodeDrop","TreeSelect","name","emits","slots","makeSlots","setup","attrs","emit","expose","selectedLabel","useVModel","passive","state","reactive","withDefineType","loading","selectorData","debut","echo","length","nextRefresh","treeSelectRef","ref","handleData","map","m","isFunction","filter","f","loadData","async","params","resData","error","consoleError","handleFilterNode","child","parentNode","parent","labels","level","result","some","indexOf","filterNodeMethod","handleChange","multiple","valueArr","dataList","includes","isNil","find","handleClear","handleNodeClick","expanded","collapse","expand","checkStrictly","isLeaf","handleVisibleChange","watch","newValue","hasLabel","slice","multipleLimit","item","index","immediate","onMounted","oldValue","isEqual","deep","elTreeSelectProps","useProps","useRender","_createVNode","ElTreeSelect","_mergeProps","class","popperClass","style","addUnit","$event","onNodeClick","onClear","onVisibleChange","onRemoveTag","onBlur","onFocus","onNodeContextmenu","onCheckChange","onCheck","onCurrentChange","onNodeExpand","onNodeCollapse","onNodeDragStart","onNodeDragEnter","onNodeDragLeave","onNodeDragOver","onNodeDragEnd","onNodeDrop","header","footer","prefix","empty","tag","useExpose","computed","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter","refresh","setSelection","clearSelection"],"mappings":"oUAWaA,EAAoB,IAC7BC,EAAAA,eACAC,EAAAA,UAEHC,YAAa,CACZC,KAAMC,OACNC,QAAS,UAGVC,YAAa,CACZH,KAAMC,OACNC,QAAS,WAGVE,WAAY,CACXJ,KAAMC,OACNC,QAAS,QAGVG,aAAc,CACbL,KAAMM,QACNJ,SAAS,GAGVK,oBAAqB,CACpBP,KAAMM,QACNJ,SAAS,GAGVM,QAAS,CACRR,KAAMC,OACNC,QAAS,SAGVO,iBAAkB,CACjBT,KAAMM,QACNJ,SAAS,GAGVQ,iBAAkB,CACjBV,KAAMM,QACNJ,SAAS,GAGVS,iBAAkB,CACjBX,KAAMM,QACNJ,SAAS,GAGVU,kBAAmBN,QAEnBO,oBAAqBP,QAKrBQ,UAAW,CACVd,KAAMe,MACNb,QAASA,IAAU,IAGpBc,WAAY,CACXhB,KAAMiB,EAAAA,eAA4F,CAAChB,OAAQi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AAMtF,EAAc9D,OAAOgK,gBAEpDC,QAASb,EAAAA,SAAS,IAAMtF,EAAc9D,OAAOiK,SAE7CC,OAAQd,EAAAA,SAAS,IAAMtF,EAAc9D,OAAOkK,QAE5CC,OAAQf,EAAAA,SAAS,IAAMtF,EAAc9D,OAAOmK,QAE5CC,aAAchB,EAAAA,SAAS,IAAMtF,EAAc9D,OAAOoK,cAElDC,YAAajB,EAAAA,SAAS,IAAMtF,EAAc9D,OAAOqK,aAEjD7G,QAAS4F,EAAAA,SAAS,IAAM/F,EAAMG,SAE9B8G,QAAShG,EAETiG,aAAevK,GAAuFsF,EAAatF,GAEnHwK,eAAgBA,IAAMlF,EAAa,OAErC"}
1
+ {"version":3,"file":"treeSelect.js","sources":["../../../../../packages/components/treeSelect/src/treeSelect.tsx"],"sourcesContent":["import { computed, defineComponent, onMounted, reactive, ref, watch } from \"vue\";\nimport { ElTreeSelect, selectEmits, treeEmits } from \"element-plus\";\nimport { type SelectComponentProps, SelectProps } from \"@fast-element-plus/components/select/src/select\";\nimport { treeProps } from \"@fast-element-plus/components/tree/src/tree.props\";\nimport { addUnit, consoleError, definePropType, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"@fast-china/utils\";\nimport { useVModel } from \"@vueuse/core\";\nimport { isArray, isBoolean, isEqual, isFunction, isNil, isNull, isNumber, isObject, isString } from \"lodash-unified\";\nimport type { ElSelectorOutput } from \"@fast-element-plus/components/select\";\nimport type { FilterValue, TreeNodeData } from \"@fast-element-plus/components/tree/src/tree.props\";\nimport type { ComponentInternalInstance, VNode } from \"vue\";\n\nexport const faTreeSelectProps = {\n\t...SelectProps,\n\t...treeProps,\n\t/** @description whether Select is disabled 重载使其支持 ElForm*/\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: undefined,\n\t},\n\t/** @description displayed text while loading data from server, default is 'Loading' */\n\tloadingText: {\n\t\ttype: String,\n\t\tdefault: \"加载中...\",\n\t},\n\t/** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */\n\tnoMatchText: {\n\t\ttype: String,\n\t\tdefault: \"暂无匹配的数据\",\n\t},\n\t/** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */\n\tnoDataText: {\n\t\ttype: String,\n\t\tdefault: \"暂无数据\",\n\t},\n\t/** @description whether to collapse tags to a text when multiple selecting */\n\tcollapseTags: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true */\n\tcollapseTagsTooltip: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** 每个树节点用来作为唯一标识的属性,整棵树应该是唯一的 */\n\tnodeKey: {\n\t\ttype: String,\n\t\tdefault: \"value\",\n\t},\n\t/** @description 是否默认展开所有节点 */\n\tdefaultExpandAll: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否在点击节点的时候选中节点 */\n\tcheckOnClickNode: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否高亮当前选中节点 */\n\thighlightCurrent: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 是否在点击节点的时候展开或者收缩节点, 默认值为 true,如果为 false,则只有点箭头图标的时候才会展开或者收缩节点。 */\n\texpandOnClickNode: Boolean,\n\t/** @description 点击折叠节点,需要开启 'expandOnClickNode' */\n\tcollapseOnClickNode: Boolean,\n\t/**\n\t * 懒加载节点的缓存数据,结构与数据相同,用于获取未加载数据的标签\n\t * @description The cached data of the lazy node, the structure is the same as the data, used to get the label of the unloaded data\n\t */\n\tcacheData: {\n\t\ttype: definePropType<\n\t\t\t{\n\t\t\t\tvalue: string | number | boolean | object;\n\t\t\t\tcurrentLabel: string | number;\n\t\t\t\tisDisabled: boolean;\n\t\t\t}[]\n\t\t>(Array),\n\t\tdefault: [] as {\n\t\t\tvalue: string | number | boolean | object;\n\t\t\tcurrentLabel: string | number;\n\t\t\tisDisabled: boolean;\n\t\t}[],\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<string | number | boolean | object | (string | number | boolean | object)[]>([String, Number, Boolean, Object, Array]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: definePropType<string | string[]>([String, Array]),\n\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"100%\",\n\t},\n\t/** @description 更多细节,只有使用slot的时候有用 */\n\tmoreDetail: Boolean,\n\t/** @description 懒加载远程数据,默认 true。当下拉框第一次显示的时候才会加载远程数据*/\n\tlazy: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 默认选中。不能和懒加载一起使用 */\n\tdefaultSelected: Boolean,\n\t/** @description 配置选项 */\n\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[] | any[]>(Array),\n\t\tdefault: (): ElSelectorOutput[] | any[] => [],\n\t},\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: any) => Promise<ElSelectorOutput[] | any[]>>(Function),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | any>([String, Number, Object]),\n};\n\nexport const faTreeSelectEmits = {\n\t...selectEmits,\n\t...treeEmits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string | number | boolean | object | (string | number | boolean | object)[]): boolean =>\n\t\tisString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isArray(value) || isNull(value),\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string | string[]): boolean => isString(value) || isArray(value) || isNull(value),\n\n\t/** @description 数据改变 */\n\tdataChangeCallBack: (data: ElSelectorOutput[] | any[]): boolean => isArray(data),\n\t/** @description 改变 */\n\tchange: (\n\t\tdata: ElSelectorOutput | ElSelectorOutput[] | any | any[],\n\t\tvalue?: string | number | boolean | object | (string | number | boolean | object)[]\n\t): boolean => true,\n};\n\ntype FaTreeSelectSlots = {\n\t/** @description 默认内容插槽 */\n\tdefault: { node: any; data: ElSelectorOutput };\n\n\t/** @description 下拉列表顶部的内容 */\n\theader: never;\n\t/** @description 下拉列表底部的内容 */\n\tfooter: never;\n\t/** @description Select 组件头部内容 */\n\tprefix: never;\n\t/** @description 无选项时的列表 */\n\tempty: never;\n\t/** @description select 组件自定义标签内容 */\n\ttag: never;\n\t/** @description select 组件自定义 loading内容 */\n\tloading: never;\n\t/** @description select 组件自定义标签内容 */\n\tlabel: { label: string; value: string | number | boolean | object };\n};\n\nexport default defineComponent({\n\tname: \"FaTreeSelect\",\n\tprops: faTreeSelectProps,\n\temits: faTreeSelectEmits,\n\tslots: makeSlots<FaTreeSelectSlots>(),\n\tsetup(props, { attrs, slots, emit, expose }) {\n\t\tconst selectedLabel = useVModel(props, \"label\", emit);\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<string | number | boolean | object | (string | number | boolean | object)[]>(),\n\t\t\tloading: false,\n\t\t\tselectorData: withDefineType<ElSelectorOutput[]>([]),\n\t\t\t/** 首次出现 */\n\t\t\tdebut: true,\n\t\t\t/** 回显 */\n\t\t\techo: props.data?.length > 0 ? false : true,\n\t\t\t/** 下次刷新 */\n\t\t\tnextRefresh: false,\n\t\t});\n\n\t\tconst treeSelectRef = ref<InstanceType<typeof ElTreeSelect>>();\n\n\t\tconst handleData = (data: ElSelectorOutput[] | any[]): ElSelectorOutput[] => {\n\t\t\treturn data\n\t\t\t\t?.map((m) => ({\n\t\t\t\t\t...m,\n\t\t\t\t\tvalue: m[props.nodeKey],\n\t\t\t\t\tlabel: isFunction(props.props.label) ? props.props.label(m) : m[props.props.label ?? \"label\"],\n\t\t\t\t\thide: isFunction(props.props.hide) ? props.props.hide(m) : m[props.props.hide ?? \"hide\"],\n\t\t\t\t\tdisabled: isFunction(props.props.disabled) ? props.props.disabled(m) : m[props.props.disabled ?? \"disabled\"],\n\t\t\t\t\tchildren: isFunction(props.props.children)\n\t\t\t\t\t\t? handleData(props.props.children(m))\n\t\t\t\t\t\t: handleData(m[props.props.children ?? \"children\"]),\n\t\t\t\t}))\n\t\t\t\t.filter((f) => !f.hide);\n\t\t};\n\n\t\tconst loadData = async (): Promise<void> => {\n\t\t\t// 判断是否需要自动请求\n\t\t\tif (props.requestApi) {\n\t\t\t\tstate.loading = true;\n\t\t\t\tconst params = props.initParam ?? {};\n\t\t\t\ttry {\n\t\t\t\t\tconst resData = await props.requestApi(params);\n\t\t\t\t\t// 这里不允许回显了\n\t\t\t\t\tstate.echo = false;\n\t\t\t\t\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\tconsoleError(\"FaTreeSelect\", error);\n\t\t\t\t\tstate.selectorData = [];\n\t\t\t\t} finally {\n\t\t\t\t\tstate.loading = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// 这里不允许回显了\n\t\t\t\tstate.echo = false;\n\t\t\t\tstate.selectorData = handleData(props.data);\n\t\t\t}\n\t\t};\n\n\t\tconst handleFilterNode = (value: FilterValue, data: TreeNodeData, child: any): boolean => {\n\t\t\tif (!value) return true;\n\t\t\tlet parentNode = child.parent,\n\t\t\t\tlabels = [child.label],\n\t\t\t\tlevel = 1;\n\t\t\twhile (level < child.level) {\n\t\t\t\tlabels = [...labels, parentNode.label];\n\t\t\t\tparentNode = parentNode.parent;\n\t\t\t\tlevel++;\n\t\t\t}\n\t\t\tconst result = labels.some((label) => label.indexOf(value) !== -1);\n\t\t\tif (props.filterNodeMethod) {\n\t\t\t\treturn result && props.filterNodeMethod(value, data, child);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\n\t\tconst handleChange = (value?: string | number | boolean | object | (string | number | boolean | object)[], data?: ElSelectorOutput): void => {\n\t\t\t// 判断是否为多选\n\t\t\tif (props.multiple) {\n\t\t\t\t// value 必然是数组\n\t\t\t\tconst valueArr = value as (string | number | boolean | object)[];\n\t\t\t\tif (valueArr?.length === 0) {\n\t\t\t\t\tstate.value = null;\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\temit(\"update:modelValue\", null);\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst dataList = state.selectorData.filter((f) => valueArr.includes(f.value));\n\t\t\t\tstate.value = value;\n\t\t\t\tselectedLabel.value = dataList.map((m) => m.label);\n\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\temit(\"change\", dataList, value);\n\t\t\t} else {\n\t\t\t\t// value 必然不是数组\n\t\t\t\tif (isNil(value)) {\n\t\t\t\t\tstate.value = null;\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\temit(\"update:modelValue\", null);\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tdata ??= state.selectorData.find((f) => f.value === value);\n\t\t\t\tstate.value = value;\n\t\t\t\tselectedLabel.value = data.label;\n\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\temit(\"change\", data, value);\n\t\t\t}\n\t\t};\n\n\t\tconst handleClear = (): void => {\n\t\t\tstate.value = null;\n\t\t\tselectedLabel.value = null;\n\t\t\temit(\"update:modelValue\", null);\n\t\t\temit(\"clear\");\n\t\t};\n\n\t\tconst handleNodeClick = (data: ElSelectorOutput, node: any, instance: ComponentInternalInstance, event: MouseEvent): void => {\n\t\t\t// 判断是否开启点击展开节点,并且节点是折叠状态,则自动展开,否则需要点击箭头图标才能折叠或开启 'collapseOnClickNode'\n\t\t\tif (props.expandOnClickNode) {\n\t\t\t\tif (!node.expanded) {\n\t\t\t\t\tnode.expand();\n\t\t\t\t} else if (node.expanded && props.collapseOnClickNode) {\n\t\t\t\t\tnode.collapse();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// 判断是否开启了 checkStrictly\n\t\t\tif (props.checkStrictly) {\n\t\t\t\thandleChange(data.value, data);\n\t\t\t} else {\n\t\t\t\tif (node.isLeaf) {\n\t\t\t\t\thandleChange(data.value, data);\n\t\t\t\t}\n\t\t\t}\n\t\t\temit(\"node-click\", data, node, instance, event);\n\t\t};\n\n\t\t/**\n\t\t * 下拉框出现/隐藏时触发\n\t\t */\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\tprops.lazy && (await loadData());\n\t\t\t\t} else {\n\t\t\t\t\t// 判断再次出现是否需要刷新数据\n\t\t\t\t\tif (state.nextRefresh) {\n\t\t\t\t\t\tstate.nextRefresh = false;\n\t\t\t\t\t\tawait loadData();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\temit(\"visible-change\", visible);\n\t\t};\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t(newValue) => {\n\t\t\t\tif (state.echo && !isNil(newValue)) {\n\t\t\t\t\tconst hasLabel = !isNil(props.label);\n\t\t\t\t\t// 判断是否为多选\n\t\t\t\t\tif (props.multiple) {\n\t\t\t\t\t\t// 判断是否为数组\n\t\t\t\t\t\tif (!isArray(newValue)) {\n\t\t\t\t\t\t\tconsoleError(\"FaTreeSelect\", \"当启用 multiple 时,传入的 modelValue 必须是Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && !isArray(props.label)) {\n\t\t\t\t\t\t\tconsoleError(\"FaTreeSelect\", \"当启用 multiple 时,传入的 modelValue:label 必须是Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = newValue\n\t\t\t\t\t\t\t// 最大选项截取\n\t\t\t\t\t\t\t.slice(0, props.multipleLimit > 0 ? props.multipleLimit : newValue.length)\n\t\t\t\t\t\t\t.map((item, index) => ({\n\t\t\t\t\t\t\t\tvalue: item,\n\t\t\t\t\t\t\t\tlabel: hasLabel ? props.label[index] : undefined,\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (isArray(newValue)) {\n\t\t\t\t\t\t\tconsoleError(\"FaTreeSelect\", \"当禁用 multiple 时,传入的 modelValue 不能是Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && isArray(props.label)) {\n\t\t\t\t\t\t\tconsoleError(\"FaTreeSelect\", \"当禁用 multiple 时,传入的 modelValue:label 不能是Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectorData = [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: newValue,\n\t\t\t\t\t\t\t\tlabel: props.label,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstate.value = newValue;\n\t\t\t},\n\t\t\t{\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\tonMounted(async () => {\n\t\t\tif (props.defaultSelected) {\n\t\t\t\tawait loadData();\n\t\t\t\tif (state.selectorData.length > 0) {\n\t\t\t\t\tif (props.multiple) {\n\t\t\t\t\t\thandleChange([state.selectorData[0].value]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\thandleChange(state.selectorData[0].value, state.selectorData[0]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// 判断是否为本地数据\n\t\t\telse if (!props.requestApi && props.data?.length > 0) {\n\t\t\t\tstate.debut = false;\n\t\t\t\tawait loadData();\n\t\t\t}\n\t\t\t// 判断是否非默认选中,且未启用懒加载\n\t\t\telse if (!props.lazy) {\n\t\t\t\tawait loadData();\n\t\t\t}\n\t\t\twatch(\n\t\t\t\t() => props.initParam,\n\t\t\t\t(newValue, oldValue) => {\n\t\t\t\t\tif (!isEqual(newValue, oldValue)) {\n\t\t\t\t\t\tstate.nextRefresh = true;\n\t\t\t\t\t\tif (!isNil(state.value)) {\n\t\t\t\t\t\t\thandleChange();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t\twatch(\n\t\t\t\t() => props.data,\n\t\t\t\tasync () => {\n\t\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\t\tawait loadData();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ deep: true }\n\t\t\t);\n\t\t});\n\n\t\tconst elTreeSelectProps = useProps(props, { ...SelectProps, ...treeProps }, [\n\t\t\t\"modelValue\",\n\t\t\t\"popperClass\",\n\t\t\t\"loading\",\n\t\t\t\"expandOnClickNode\",\n\t\t\t\"filterNodeMethod\",\n\t\t]);\n\t\tconst elTreeSelectEmits = useEmits({ ...selectEmits, ...treeEmits }, emit, [\"update:modelValue\", \"clear\", \"visible-change\", \"node-click\"]);\n\n\t\tuseRender(() => (\n\t\t\t<ElTreeSelect\n\t\t\t\t{...elTreeSelectProps.value}\n\t\t\t\t{...elTreeSelectEmits.value}\n\t\t\t\tref={treeSelectRef}\n\t\t\t\tclass=\"fa-tree-select\"\n\t\t\t\tpopperClass={`fa-tree-select-dropdown ${props.popperClass}`}\n\t\t\t\tstyle={{ width: addUnit(props.width) }}\n\t\t\t\tvModel={state.value}\n\t\t\t\tloading={state.loading}\n\t\t\t\tdata={state.selectorData}\n\t\t\t\texpandOnClickNode={props.checkOnClickNode ? false : props.expandOnClickNode}\n\t\t\t\tfilterNodeMethod={handleFilterNode}\n\t\t\t\tonNodeClick={handleNodeClick}\n\t\t\t\tonClear={handleClear}\n\t\t\t\tonVisibleChange={handleVisibleChange}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\t...(slots.default && {\n\t\t\t\t\t\tdefault: ({ node, data }: { node: any; data: ElSelectorOutput }): VNode[] => slots.default({ node, data }),\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</ElTreeSelect>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t// TODO:这里 EL 没有返回类型,等待下一个版本修复\n\t\t\t// /** @description 使选择器的输入框获取焦点 */\n\t\t\t// focus: computed(() => treeSelectRef.value?.focus),\n\t\t\t// /** @description 使选择器的输入框失去焦点,并隐藏下拉框 */\n\t\t\t// blur: computed(() => treeSelectRef.value?.blur),\n\t\t\t// /** @description 获取当前选中的标签 */\n\t\t\t// selectedLabel: computed(() => treeSelectRef.value?.selectedLabel),\n\n\t\t\t// /** @description 过滤所有树节点,过滤后的节点将被隐藏 */\n\t\t\t// filter: computed(() => treeSelectRef.value?.filter),\n\t\t\t// /** @description 为节点设置新数据,只有当设置 node-key 属性的时候才可用 */\n\t\t\t// updateKeyChildren: computed(() => treeSelectRef.value?.updateKeyChildren),\n\t\t\t// /** @description 如果节点可以被选中,(show-checkbox 为 true), 本方法将返回当前选中节点的数组 */\n\t\t\t// getCheckedNodes: computed(() => treeSelectRef.value?.getCheckedNodes),\n\t\t\t// /** @description 设置目前勾选的节点,使用此方法必须提前设置 node-key 属性 */\n\t\t\t// setCheckedNodes: computed(() => treeSelectRef.value?.setCheckedNodes),\n\t\t\t// /** @description 若节点可用被选中 (show-checkbox 为 true), 它将返回当前选中节点 key 的数组 */\n\t\t\t// getCheckedKeys: computed(() => treeSelectRef.value?.getCheckedKeys),\n\t\t\t// /** @description 设置目前选中的节点,使用此方法必须设置 node-key 属性 */\n\t\t\t// setCheckedKeys: computed(() => treeSelectRef.value?.setCheckedKeys),\n\t\t\t// /** @description 设置节点是否被选中, 使用此方法必须设置 node-key 属性 */\n\t\t\t// setChecked: computed(() => treeSelectRef.value?.setChecked),\n\t\t\t// /** @description 如果节点可用被选中 (show-checkbox 为 true), 它将返回当前半选中的节点组成的数组 */\n\t\t\t// getHalfCheckedNodes: computed(() => treeSelectRef.value?.getHalfCheckedNodes),\n\t\t\t// /** @description 若节点可被选中(show-checkbox 为 true),则返回目前半选中的节点的 key 所组成的数组 */\n\t\t\t// getHalfCheckedKeys: computed(() => treeSelectRef.value?.getHalfCheckedKeys),\n\t\t\t// /** @description 返回当前被选中节点的数据 (如果没有则返回 null) */\n\t\t\t// getCurrentKey: computed(() => treeSelectRef.value?.getCurrentKey),\n\t\t\t// /** @description 返回当前被选中节点的数据 (如果没有则返回 null) */\n\t\t\t// getCurrentNode: computed(() => treeSelectRef.value?.getCurrentNode),\n\t\t\t// /** @description 通过 key 设置某个节点的当前选中状态,使用此方法必须设置 node-key 属性 */\n\t\t\t// setCurrentKey: computed(() => treeSelectRef.value?.setCurrentKey),\n\t\t\t// /** @description 设置节点为选中状态,使用此方法必须设置 node-key 属性 */\n\t\t\t// setCurrentNode: computed(() => treeSelectRef.value?.setCurrentNode),\n\t\t\t// /** @description 根据 data 或者 key 拿到 Tree 组件中的 node */\n\t\t\t// getNode: computed(() => treeSelectRef.value?.getNode),\n\t\t\t// /** @description 删除 Tree 中的一个节点,使用此方法必须设置 node-key 属性 */\n\t\t\t// remove: computed(() => treeSelectRef.value?.remove),\n\t\t\t// /** @description 为 Tree 中的一个节点追加一个子节点 */\n\t\t\t// append: computed(() => treeSelectRef.value?.append),\n\t\t\t// /** @description 在 Tree 中给定节点前插入一个节点 */\n\t\t\t// insertBefore: computed(() => treeSelectRef.value?.insertBefore),\n\t\t\t// /** @description 在 Tree 中给定节点后插入一个节点 */\n\t\t\t// insertAfter: computed(() => treeSelectRef.value?.insertAfter),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading: computed(() => state.loading),\n\t\t\t/** @description 刷新 */\n\t\t\trefresh: loadData,\n\t\t\t/** @description 设置选择 */\n\t\t\tsetSelection: (value: string | number | boolean | object | (string | number | boolean | object)[]) => handleChange(value),\n\t\t\t/** @description 清除选择 */\n\t\t\tclearSelection: () => handleChange(null),\n\t\t});\n\t},\n});\n"],"names":["faTreeSelectProps","SelectProps","treeProps","disabled","type","Boolean","default","undefined","loadingText","String","noMatchText","noDataText","collapseTags","collapseTagsTooltip","nodeKey","defaultExpandAll","checkOnClickNode","highlightCurrent","expandOnClickNode","collapseOnClickNode","cacheData","definePropType","Array","modelValue","Number","Object","label","width","moreDetail","lazy","defaultSelected","props","hide","children","data","requestApi","Function","initParam","faTreeSelectEmits","selectEmits","treeEmits","value","isString","isNumber","isBoolean","isObject","isArray","isNull","dataChangeCallBack","change","TreeSelect","name","emits","slots","makeSlots","setup","attrs","emit","expose","selectedLabel","useVModel","state","reactive","withDefineType","loading","selectorData","debut","echo","length","nextRefresh","treeSelectRef","ref","handleData","map","m","isFunction","filter","f","loadData","async","params","resData","error","consoleError","handleFilterNode","child","parentNode","parent","labels","level","result","some","indexOf","filterNodeMethod","handleChange","multiple","valueArr","dataList","includes","isNil","find","handleClear","handleNodeClick","node","instance","event","expanded","collapse","expand","checkStrictly","isLeaf","handleVisibleChange","visible","watch","newValue","hasLabel","slice","multipleLimit","item","index","immediate","onMounted","oldValue","isEqual","deep","elTreeSelectProps","useProps","elTreeSelectEmits","useEmits","useRender","_createVNode","ElTreeSelect","_mergeProps","class","popperClass","style","addUnit","$event","onNodeClick","onClear","onVisibleChange","header","footer","prefix","emp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MACpD,CAAE5G,MAAO6G,EAAAA,QAAQzG,EAAMJ,QAAQJ,WAC9BsC,EAAMpB,MAAK,sBAAAgG,GAAX5E,EAAMpB,MAAKgG,EAAAzE,QACVH,EAAMG,QAAO9B,KAChB2B,EAAMI,aAAY/C,mBACLa,EAAMf,kBAA2Be,EAAMb,kBAAiB2E,iBACzDT,EAAgBsD,YACrBpC,EAAeqC,QACnBtC,EAAWuC,gBACH7B,IAAmB,IAG/B1D,EAAM/C,SAAW,CACpBA,QAASA,EAAGiG,OAAMrE,UAA2DmB,EAAM/C,QAAQ,CAAEiG,OAAMrE,aAEhGmB,EAAMwF,QAAU,CAAEA,OAAQA,IAAexF,EAAMwF,aAC/CxF,EAAMyF,QAAU,CAAEA,OAAQA,IAAezF,EAAMyF,aAC/CzF,EAAM0F,QAAU,CAAEA,OAAQA,IAAe1F,EAAM0F,aAC/C1F,EAAM2F,OAAS,CAAEA,MAAOA,IAAe3F,EAAM2F,YAC7C3F,EAAM4F,KAAO,CAAEA,IAAKA,IAAe5F,EAAM4F,UACzC5F,EAAMW,SAAW,CAAEA,QAASA,IAAeX,EAAMW,cACjDX,EAAM3B,OAAS,CAClBA,MAAOA,EAAGA,QAAOe,WAChBY,EAAM3B,MAAM,CAAEA,QAAOe,cAMnByG,EAAAA,UAAUxF,EAAQ,CA8CxBM,QAASmF,EAAAA,SAAS,IAAMtF,EAAMG,SAE9BoF,QAAStE,EAETuE,aAAe5G,GAAuFqD,EAAarD,GAEnH6G,eAAgBA,IAAMxD,EAAa,OAErC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../packages/directives/click-copy/index.ts"],"sourcesContent":["/**\n * v-copy\n * 复制某个值至剪贴板\n * 接收参数:string类型/Ref<string>类型/Reactive<string>类型\n */\nimport { ElMessage } from \"element-plus\";\nimport { stringUtil, withInstallDirective } from \"@fast-china/utils\";\nimport type { Directive, DirectiveBinding } from \"vue\";\n\ninterface ElType extends HTMLElement {\n\tcopyData: string | number;\n\t__handleClick__: () => void;\n}\n\nconst CopyDirective: Directive = {\n\tmounted(el: ElType, binding: DirectiveBinding) {\n\t\tel.copyData = binding.value;\n\n\t\tel.__handleClick__ = async (): Promise<void> => {\n\t\t\tif (!el.copyData) return;\n\t\t\ttry {\n\t\t\t\tawait stringUtil.copy(String(el.copyData));\n\t\t\t\tElMessage({\n\t\t\t\t\ttype: \"success\",\n\t\t\t\t\tmessage: \"复制成功\",\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tElMessage({\n\t\t\t\t\ttype: \"error\",\n\t\t\t\t\tmessage: \"复制失败\",\n\t\t\t\t});\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t};\n\t\tel.addEventListener(\"click\", el.__handleClick__);\n\t},\n\tupdated(el: ElType, binding: DirectiveBinding) {\n\t\tel.copyData = binding.value;\n\t},\n\tbeforeUnmount(el: ElType) {\n\t\tel.removeEventListener(\"click\", el.__handleClick__);\n\t},\n};\n\nexport const vCopy = withInstallDirective(CopyDirective, \"copy\");\nexport default vCopy;\n"],"names":["CopyDirective","mounted","el","binding","copyData","value","__handleClick__","async","stringUtil","copy","String","ElMessage","type","message","error","addEventListener","updated","beforeUnmount","removeEventListener","vCopy","withInstallDirective"],"mappings":"2KAcMA,EAA2B,CAChC,OAAAC,CAAQC,EAAYC,GACnBD,EAAGE,SAAWD,EAAQE,MAEtBH,EAAGI,gBAAkBC,UACpB,GAAKL,EAAGE,SACR,UACOI,EAAAA,WAAWC,KAAKC,OAAOR,EAAGE,WAChCO,YAAU,CACTC,KAAM,UACNC,QAAS,QAEX,OAASC,GAKR,MAJAH,YAAU,CACTC,KAAM,QACNC,QAAS,SAEJC,CACP,GAEDZ,EAAGa,iBAAiB,QAASb,EAAGI,gBACjC,EACA,OAAAU,CAAQd,EAAYC,GACnBD,EAAGE,SAAWD,EAAQE,KACvB,EACA,aAAAY,CAAcf,GACbA,EAAGgB,oBAAoB,QAAShB,EAAGI,gBACpC,GAGYa,EAAQC,EAAAA,qBAAqBpB,EAAe"}
1
+ {"version":3,"file":"index.js","sources":["../../../../packages/directives/click-copy/index.ts"],"sourcesContent":["/**\n * v-copy\n * 复制某个值至剪贴板\n * 接收参数:string类型/Ref<string>类型/Reactive<string>类型\n */\nimport { ElMessage } from \"element-plus\";\nimport { stringUtil, withInstallDirective } from \"@fast-china/utils\";\nimport type { Directive, DirectiveBinding } from \"vue\";\n\ninterface CopyElement extends HTMLElement {\n\tcopyData: string | number;\n\t__handleClick__: () => void;\n}\n\nconst CopyDirective: Directive = {\n\tmounted(el: CopyElement, binding: DirectiveBinding<string | number>) {\n\t\tel.copyData = binding.value;\n\n\t\tel.__handleClick__ = async (): Promise<void> => {\n\t\t\tif (!el.copyData) return;\n\t\t\ttry {\n\t\t\t\tawait stringUtil.copy(String(el.copyData));\n\t\t\t\tElMessage({\n\t\t\t\t\ttype: \"success\",\n\t\t\t\t\tmessage: \"复制成功\",\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tElMessage({\n\t\t\t\t\ttype: \"error\",\n\t\t\t\t\tmessage: \"复制失败\",\n\t\t\t\t});\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t};\n\t\tel.addEventListener(\"click\", el.__handleClick__);\n\t},\n\tupdated(el: CopyElement, binding: DirectiveBinding) {\n\t\tel.copyData = binding.value;\n\t},\n\tbeforeUnmount(el: CopyElement) {\n\t\tel.removeEventListener(\"click\", el.__handleClick__);\n\t},\n};\n\nexport const vCopy = withInstallDirective(CopyDirective, \"copy\");\nexport default vCopy;\n"],"names":["CopyDirective","mounted","el","binding","copyData","value","__handleClick__","async","stringUtil","copy","String","ElMessage","type","message","error","addEventListener","updated","beforeUnmount","removeEventListener","vCopy","withInstallDirective"],"mappings":"2KAcMA,EAA2B,CAChC,OAAAC,CAAQC,EAAiBC,GACxBD,EAAGE,SAAWD,EAAQE,MAEtBH,EAAGI,gBAAkBC,UACpB,GAAKL,EAAGE,SACR,UACOI,EAAAA,WAAWC,KAAKC,OAAOR,EAAGE,WAChCO,YAAU,CACTC,KAAM,UACNC,QAAS,QAEX,OAASC,GAKR,MAJAH,YAAU,CACTC,KAAM,QACNC,QAAS,SAEJC,CACP,GAEDZ,EAAGa,iBAAiB,QAASb,EAAGI,gBACjC,EACA,OAAAU,CAAQd,EAAiBC,GACxBD,EAAGE,SAAWD,EAAQE,KACvB,EACA,aAAAY,CAAcf,GACbA,EAAGgB,oBAAoB,QAAShB,EAAGI,gBACpC,GAGYa,EAAQC,EAAAA,qBAAqBpB,EAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../packages/directives/click-debounce/index.ts"],"sourcesContent":["/**\n * v-debounce\n * 按钮防抖指令\n */\nimport { withInstallDirective } from \"@fast-china/utils\";\nimport type { Directive, DirectiveBinding, VNode } from \"vue\";\n\ninterface ElType extends HTMLElement {\n\t__debounce_timer__: NodeJS.Timeout;\n\t__debounce_originClick__: () => any;\n}\n\nconst DebounceDirective: Directive = {\n\tcreated(el: ElType, binding: DirectiveBinding, vNode: VNode) {\n\t\t// 记录原来的点击事件方法\n\t\tel.__debounce_originClick__ = vNode.props.onClick;\n\n\t\t// 替换原来的点击事件\n\t\tvNode.props.onClick = (): void => {\n\t\t\tif (el.__debounce_timer__) {\n\t\t\t\tclearInterval(el.__debounce_timer__);\n\t\t\t}\n\t\t\t// 防抖处理\n\t\t\tel.__debounce_timer__ = setTimeout(() => {\n\t\t\t\tel.__debounce_originClick__();\n\t\t\t}, 500);\n\t\t};\n\t},\n};\n\nexport const vDebounce = withInstallDirective(DebounceDirective, \"debounce\");\nexport default vDebounce;\n"],"names":["DebounceDirective","created","el","binding","vNode","__debounce_originClick__","props","onClick","__debounce_timer__","clearInterval","setTimeout","vDebounce","withInstallDirective"],"mappings":"iJAYMA,EAA+B,CACpC,OAAAC,CAAQC,EAAYC,EAA2BC,GAE9CF,EAAGG,yBAA2BD,EAAME,MAAMC,QAG1CH,EAAME,MAAMC,QAAU,KACjBL,EAAGM,oBACNC,cAAcP,EAAGM,oBAGlBN,EAAGM,mBAAqBE,WAAW,KAClCR,EAAGG,4BACD,KAEL,GAGYM,EAAYC,EAAAA,qBAAqBZ,EAAmB"}
1
+ {"version":3,"file":"index.js","sources":["../../../../packages/directives/click-debounce/index.ts"],"sourcesContent":["/**\n * v-debounce\n * 按钮防抖指令\n */\nimport { withInstallDirective } from \"@fast-china/utils\";\nimport type { Directive, DirectiveBinding, VNode } from \"vue\";\n\ninterface DebounceElement extends HTMLElement {\n\t__debounce_timer__: NodeJS.Timeout;\n\t__debounce_originClick__: () => any;\n}\n\ninterface DebounceVNode extends VNode {\n\tprops: {\n\t\t/** @description 点击事件 */\n\t\tonClick?: (...args) => any;\n\t\t[key: string]: any;\n\t};\n}\n\nconst DebounceDirective: Directive = {\n\tcreated(el: DebounceElement, binding: DirectiveBinding, vNode: DebounceVNode) {\n\t\t// 记录原来的点击事件方法\n\t\tel.__debounce_originClick__ = vNode.props.onClick;\n\n\t\t// 替换原来的点击事件\n\t\tvNode.props.onClick = (): void => {\n\t\t\tif (el.__debounce_timer__) {\n\t\t\t\tclearInterval(el.__debounce_timer__);\n\t\t\t}\n\t\t\t// 防抖处理\n\t\t\tel.__debounce_timer__ = setTimeout(() => {\n\t\t\t\tel.__debounce_originClick__();\n\t\t\t}, 500);\n\t\t};\n\t},\n};\n\nexport const vDebounce = withInstallDirective(DebounceDirective, \"debounce\");\nexport default vDebounce;\n"],"names":["DebounceDirective","created","el","binding","vNode","__debounce_originClick__","props","onClick","__debounce_timer__","clearInterval","setTimeout","vDebounce","withInstallDirective"],"mappings":"iJAoBMA,EAA+B,CACpC,OAAAC,CAAQC,EAAqBC,EAA2BC,GAEvDF,EAAGG,yBAA2BD,EAAME,MAAMC,QAG1CH,EAAME,MAAMC,QAAU,KACjBL,EAAGM,oBACNC,cAAcP,EAAGM,oBAGlBN,EAAGM,mBAAqBE,WAAW,KAClCR,EAAGG,4BACD,KAEL,GAGYM,EAAYC,EAAAA,qBAAqBZ,EAAmB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../packages/directives/click-draggable/index.ts"],"sourcesContent":["/*\n\t需求:实现一个拖拽指令,可在父元素区域任意拖拽元素。\n\n\t思路:\n\t\t1、设置需要拖拽的元素为absolute,其父元素为relative。\n\t\t2、鼠标按下(onmousedown)时记录目标元素当前的 left 和 top 值。\n\t\t3、鼠标移动(onmousemove)时计算每次移动的横向距离和纵向距离的变化值,并改变元素的 left 和 top 值\n\t\t4、鼠标松开(onmouseup)时完成一次拖拽\n\n\t使用:在 Dom 上加上 v-draggable 即可\n\t<div class=\"dialog-model\" v-draggable></div>\n*/\nimport { withInstallDirective } from \"@fast-china/utils\";\nimport type { Directive } from \"vue\";\n\ninterface ElType extends HTMLElement {\n\tparentNode: any;\n}\n\nconst DraggableDirective: Directive = {\n\tmounted(el: ElType) {\n\t\tel.style.cursor = \"move\";\n\t\tel.style.position = \"absolute\";\n\t\tel.onmousedown = (e): void => {\n\t\t\tconst disX = e.pageX - el.offsetLeft;\n\t\t\tconst disY = e.pageY - el.offsetTop;\n\t\t\tdocument.onmousemove = (e): void => {\n\t\t\t\tlet x = e.pageX - disX;\n\t\t\t\tlet y = e.pageY - disY;\n\t\t\t\tconst maxX = el.parentNode.offsetWidth - el.offsetWidth;\n\t\t\t\tconst maxY = el.parentNode.offsetHeight - el.offsetHeight;\n\t\t\t\tif (x < 0) {\n\t\t\t\t\tx = 0;\n\t\t\t\t} else if (x > maxX) {\n\t\t\t\t\tx = maxX;\n\t\t\t\t}\n\n\t\t\t\tif (y < 0) {\n\t\t\t\t\ty = 0;\n\t\t\t\t} else if (y > maxY) {\n\t\t\t\t\ty = maxY;\n\t\t\t\t}\n\t\t\t\tel.style.left = `${x}px`;\n\t\t\t\tel.style.top = `${y}px`;\n\t\t\t};\n\t\t\tdocument.onmouseup = (): void => {\n\t\t\t\tdocument.onmousemove = document.onmouseup = null;\n\t\t\t};\n\t\t};\n\t},\n};\n\nexport const vDraggable = withInstallDirective(DraggableDirective, \"draggable\");\nexport default vDraggable;\n"],"names":["DraggableDirective","mounted","el","style","cursor","position","onmousedown","e","disX","pageX","offsetLeft","disY","pageY","offsetTop","document","onmousemove","x","y","maxX","parentNode","offsetWidth","maxY","offsetHeight","left","top","onmouseup","vDraggable","withInstallDirective"],"mappings":"iJAmBMA,EAAgC,CACrC,OAAAC,CAAQC,GACPA,EAAGC,MAAMC,OAAS,OAClBF,EAAGC,MAAME,SAAW,WACpBH,EAAGI,YAAeC,IACjB,MAAMC,EAAOD,EAAEE,MAAQP,EAAGQ,WACpBC,EAAOJ,EAAEK,MAAQV,EAAGW,UAC1BC,SAASC,YAAeR,IACvB,IAAIS,EAAIT,EAAEE,MAAQD,EACdS,EAAIV,EAAEK,MAAQD,EAClB,MAAMO,EAAOhB,EAAGiB,WAAWC,YAAclB,EAAGkB,YACtCC,EAAOnB,EAAGiB,WAAWG,aAAepB,EAAGoB,aACzCN,EAAI,EACPA,EAAI,EACMA,EAAIE,IACdF,EAAIE,GAGDD,EAAI,EACPA,EAAI,EACMA,EAAII,IACdJ,EAAII,GAELnB,EAAGC,MAAMoB,KAAO,GAAGP,MACnBd,EAAGC,MAAMqB,IAAM,GAAGP,OAEnBH,SAASW,UAAY,KACpBX,SAASC,YAAcD,SAASW,UAAY,MAG/C,GAGYC,EAAaC,EAAAA,qBAAqB3B,EAAoB"}
1
+ {"version":3,"file":"index.js","sources":["../../../../packages/directives/click-draggable/index.ts"],"sourcesContent":["/*\n\t需求:实现一个拖拽指令,可在父元素区域任意拖拽元素。\n\n\t思路:\n\t\t1、设置需要拖拽的元素为absolute,其父元素为relative。\n\t\t2、鼠标按下(onmousedown)时记录目标元素当前的 left 和 top 值。\n\t\t3、鼠标移动(onmousemove)时计算每次移动的横向距离和纵向距离的变化值,并改变元素的 left 和 top 值\n\t\t4、鼠标松开(onmouseup)时完成一次拖拽\n\n\t使用:在 Dom 上加上 v-draggable 即可\n\t<div class=\"dialog-model\" v-draggable></div>\n*/\nimport { withInstallDirective } from \"@fast-china/utils\";\nimport type { Directive } from \"vue\";\n\ninterface DraggableElement extends HTMLElement {\n\tparentNode: any;\n}\n\nconst DraggableDirective: Directive = {\n\tmounted(el: DraggableElement) {\n\t\tel.style.cursor = \"move\";\n\t\tel.style.position = \"absolute\";\n\t\tel.onmousedown = (e): void => {\n\t\t\tconst disX = e.pageX - el.offsetLeft;\n\t\t\tconst disY = e.pageY - el.offsetTop;\n\t\t\tdocument.onmousemove = (e): void => {\n\t\t\t\tlet x = e.pageX - disX;\n\t\t\t\tlet y = e.pageY - disY;\n\t\t\t\tconst maxX = el.parentNode.offsetWidth - el.offsetWidth;\n\t\t\t\tconst maxY = el.parentNode.offsetHeight - el.offsetHeight;\n\t\t\t\tif (x < 0) {\n\t\t\t\t\tx = 0;\n\t\t\t\t} else if (x > maxX) {\n\t\t\t\t\tx = maxX;\n\t\t\t\t}\n\n\t\t\t\tif (y < 0) {\n\t\t\t\t\ty = 0;\n\t\t\t\t} else if (y > maxY) {\n\t\t\t\t\ty = maxY;\n\t\t\t\t}\n\t\t\t\tel.style.left = `${x}px`;\n\t\t\t\tel.style.top = `${y}px`;\n\t\t\t};\n\t\t\tdocument.onmouseup = (): void => {\n\t\t\t\tdocument.onmousemove = document.onmouseup = null;\n\t\t\t};\n\t\t};\n\t},\n};\n\nexport const vDraggable = withInstallDirective(DraggableDirective, \"draggable\");\nexport default vDraggable;\n"],"names":["DraggableDirective","mounted","el","style","cursor","position","onmousedown","e","disX","pageX","offsetLeft","disY","pageY","offsetTop","document","onmousemove","x","y","maxX","parentNode","offsetWidth","maxY","offsetHeight","left","top","onmouseup","vDraggable","withInstallDirective"],"mappings":"iJAmBMA,EAAgC,CACrC,OAAAC,CAAQC,GACPA,EAAGC,MAAMC,OAAS,OAClBF,EAAGC,MAAME,SAAW,WACpBH,EAAGI,YAAeC,IACjB,MAAMC,EAAOD,EAAEE,MAAQP,EAAGQ,WACpBC,EAAOJ,EAAEK,MAAQV,EAAGW,UAC1BC,SAASC,YAAeR,IACvB,IAAIS,EAAIT,EAAEE,MAAQD,EACdS,EAAIV,EAAEK,MAAQD,EAClB,MAAMO,EAAOhB,EAAGiB,WAAWC,YAAclB,EAAGkB,YACtCC,EAAOnB,EAAGiB,WAAWG,aAAepB,EAAGoB,aACzCN,EAAI,EACPA,EAAI,EACMA,EAAIE,IACdF,EAAIE,GAGDD,EAAI,EACPA,EAAI,EACMA,EAAII,IACdJ,EAAII,GAELnB,EAAGC,MAAMoB,KAAO,GAAGP,MACnBd,EAAGC,MAAMqB,IAAM,GAAGP,OAEnBH,SAASW,UAAY,KACpBX,SAASC,YAAcD,SAASW,UAAY,MAG/C,GAGYC,EAAaC,EAAAA,qBAAqB3B,EAAoB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../packages/directives/click-icon-copy/index.ts"],"sourcesContent":["/**\n * v-iconCopy\n * 左侧插入复制图标,复制某个值至剪贴板\n * 接收参数:string类型/Ref<string>类型/Reactive<string>类型\n */\nimport { type Directive, type DirectiveBinding, h, render } from \"vue\";\nimport { ElIcon, ElMessage } from \"element-plus\";\nimport { CopyDocument } from \"@element-plus/icons-vue\";\nimport { stringUtil, withInstallDirective } from \"@fast-china/utils\";\n\ninterface ElType extends HTMLElement {\n\tcopyData: string | number;\n\t__iconElement__: Node;\n}\n\nconst IconCopyDirective: Directive = {\n\tmounted(el: ElType, binding: DirectiveBinding) {\n\t\tel.copyData = binding.value;\n\n\t\tif (!el.copyData) return;\n\n\t\tconst handleCopyClick = async (): Promise<void> => {\n\t\t\ttry {\n\t\t\t\tawait stringUtil.copy(String(el.copyData));\n\t\t\t\tElMessage({\n\t\t\t\t\ttype: \"success\",\n\t\t\t\t\tmessage: \"复制成功\",\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tElMessage({\n\t\t\t\t\ttype: \"error\",\n\t\t\t\t\tmessage: \"复制失败\",\n\t\t\t\t});\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t};\n\n\t\t// 创建 ELIcon 组件\n\t\tconst iconEl = h(\n\t\t\tElIcon,\n\t\t\t{\n\t\t\t\tclass: \"fa__copy-icon\",\n\t\t\t\ttitle: \"复制\",\n\t\t\t\tonClick: handleCopyClick,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdefault: () => h(CopyDocument),\n\t\t\t}\n\t\t);\n\n\t\tconst tempDiv = document.createElement(\"div\");\n\t\trender(iconEl, tempDiv);\n\n\t\tel.__iconElement__ = tempDiv.firstChild;\n\t\tel.parentElement.insertBefore(tempDiv.firstChild, el);\n\t},\n\tupdated(el: ElType, binding: DirectiveBinding) {\n\t\tel.copyData = binding.value;\n\t},\n\tbeforeUnmount(el: ElType) {\n\t\tif (el.__iconElement__) {\n\t\t\tel.parentElement.removeChild(el.__iconElement__);\n\t\t}\n\t},\n};\n\nexport const vIconCopy = withInstallDirective(IconCopyDirective, \"iconCopy\");\nexport default vIconCopy;\n"],"names":["IconCopyDirective","mounted","el","binding","copyData","value","iconEl","h","ElIcon","class","title","onClick","async","stringUtil","copy","String","ElMessage","type","message","error","default","CopyDocument","tempDiv","document","createElement","render","__iconElement__","firstChild","parentElement","insertBefore","updated","beforeUnmount","removeChild","vIconCopy","withInstallDirective"],"mappings":"iOAeMA,EAA+B,CACpC,OAAAC,CAAQC,EAAYC,GAGnB,GAFAD,EAAGE,SAAWD,EAAQE,OAEjBH,EAAGE,SAAU,OAElB,MAiBME,EAASC,EAAAA,EACdC,EAAAA,OACA,CACCC,MAAO,gBACPC,MAAO,KACPC,QAtBsBC,UACvB,UACOC,EAAAA,WAAWC,KAAKC,OAAOb,EAAGE,WAChCY,YAAU,CACTC,KAAM,UACNC,QAAS,QAEX,OAASC,GAKR,MAJAH,YAAU,CACTC,KAAM,QACNC,QAAS,SAEJC,CACP,IAWA,CACCC,QAAS,IAAMb,EAAAA,EAAEc,EAAAA,gBAIbC,EAAUC,SAASC,cAAc,OACvCC,EAAAA,OAAOnB,EAAQgB,GAEfpB,EAAGwB,gBAAkBJ,EAAQK,WAC7BzB,EAAG0B,cAAcC,aAAaP,EAAQK,WAAYzB,EACnD,EACA,OAAA4B,CAAQ5B,EAAYC,GACnBD,EAAGE,SAAWD,EAAQE,KACvB,EACA,aAAA0B,CAAc7B,GACTA,EAAGwB,iBACNxB,EAAG0B,cAAcI,YAAY9B,EAAGwB,gBAElC,GAGYO,EAAYC,EAAAA,qBAAqBlC,EAAmB"}
1
+ {"version":3,"file":"index.js","sources":["../../../../packages/directives/click-icon-copy/index.ts"],"sourcesContent":["/**\n * v-iconCopy\n * 左侧插入复制图标,复制某个值至剪贴板\n * 接收参数:string类型/Ref<string>类型/Reactive<string>类型\n */\nimport { type Directive, type DirectiveBinding, h, render } from \"vue\";\nimport { ElIcon, ElMessage } from \"element-plus\";\nimport { CopyDocument } from \"@element-plus/icons-vue\";\nimport { stringUtil, withInstallDirective } from \"@fast-china/utils\";\n\ninterface IconCopyElement extends HTMLElement {\n\tcopyData: string | number;\n\t__iconElement__: Node;\n}\n\nconst IconCopyDirective: Directive = {\n\tmounted(el: IconCopyElement, binding: DirectiveBinding<string | number>) {\n\t\tel.copyData = binding.value;\n\n\t\tif (!el.copyData) return;\n\n\t\tconst handleCopyClick = async (): Promise<void> => {\n\t\t\ttry {\n\t\t\t\tawait stringUtil.copy(String(el.copyData));\n\t\t\t\tElMessage({\n\t\t\t\t\ttype: \"success\",\n\t\t\t\t\tmessage: \"复制成功\",\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tElMessage({\n\t\t\t\t\ttype: \"error\",\n\t\t\t\t\tmessage: \"复制失败\",\n\t\t\t\t});\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t};\n\n\t\t// 创建 ELIcon 组件\n\t\tconst iconEl = h(\n\t\t\tElIcon,\n\t\t\t{\n\t\t\t\tclass: \"fa__copy-icon\",\n\t\t\t\ttitle: \"复制\",\n\t\t\t\tonClick: handleCopyClick,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdefault: () => h(CopyDocument),\n\t\t\t}\n\t\t);\n\n\t\tconst tempDiv = document.createElement(\"div\");\n\t\trender(iconEl, tempDiv);\n\n\t\tel.__iconElement__ = tempDiv.firstChild;\n\t\tel.parentElement.insertBefore(tempDiv.firstChild, el);\n\t},\n\tupdated(el: IconCopyElement, binding: DirectiveBinding) {\n\t\tel.copyData = binding.value;\n\t},\n\tbeforeUnmount(el: IconCopyElement) {\n\t\tif (el.__iconElement__) {\n\t\t\tel.parentElement.removeChild(el.__iconElement__);\n\t\t}\n\t},\n};\n\nexport const vIconCopy = withInstallDirective(IconCopyDirective, \"iconCopy\");\nexport default vIconCopy;\n"],"names":["IconCopyDirective","mounted","el","binding","copyData","value","iconEl","h","ElIcon","class","title","onClick","async","stringUtil","copy","String","ElMessage","type","message","error","default","CopyDocument","tempDiv","document","createElement","render","__iconElement__","firstChild","parentElement","insertBefore","updated","beforeUnmount","removeChild","vIconCopy","withInstallDirective"],"mappings":"iOAeMA,EAA+B,CACpC,OAAAC,CAAQC,EAAqBC,GAG5B,GAFAD,EAAGE,SAAWD,EAAQE,OAEjBH,EAAGE,SAAU,OAElB,MAiBME,EAASC,EAAAA,EACdC,EAAAA,OACA,CACCC,MAAO,gBACPC,MAAO,KACPC,QAtBsBC,UACvB,UACOC,EAAAA,WAAWC,KAAKC,OAAOb,EAAGE,WAChCY,YAAU,CACTC,KAAM,UACNC,QAAS,QAEX,OAASC,GAKR,MAJAH,YAAU,CACTC,KAAM,QACNC,QAAS,SAEJC,CACP,IAWA,CACCC,QAAS,IAAMb,EAAAA,EAAEc,EAAAA,gBAIbC,EAAUC,SAASC,cAAc,OACvCC,EAAAA,OAAOnB,EAAQgB,GAEfpB,EAAGwB,gBAAkBJ,EAAQK,WAC7BzB,EAAG0B,cAAcC,aAAaP,EAAQK,WAAYzB,EACnD,EACA,OAAA4B,CAAQ5B,EAAqBC,GAC5BD,EAAGE,SAAWD,EAAQE,KACvB,EACA,aAAA0B,CAAc7B,GACTA,EAAGwB,iBACNxB,EAAG0B,cAAcI,YAAY9B,EAAGwB,gBAElC,GAGYO,EAAYC,EAAAA,qBAAqBlC,EAAmB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../packages/directives/click-longpress/index.ts"],"sourcesContent":["/**\n * v-longpress\n * 长按指令,长按时触发事件\n */\nimport { withInstallDirective } from \"@fast-china/utils\";\nimport type { Directive, DirectiveBinding } from \"vue\";\n\nconst LongpressDirective: Directive = {\n\tmounted(el: HTMLElement, binding: DirectiveBinding) {\n\t\tif (typeof binding.value !== \"function\") {\n\t\t\tthrow \"callback must be a function\";\n\t\t}\n\n\t\t// 运行函数\n\t\tconst handler = (e: MouseEvent | TouchEvent): void => {\n\t\t\tbinding.value(e);\n\t\t};\n\n\t\t// 定义变量\n\t\tlet pressTimer: any = null;\n\t\t// 创建计时器( 2秒后执行函数 )\n\t\tconst start = (e: any): void => {\n\t\t\tif (e.button) {\n\t\t\t\tif (e.type === \"click\" && e.button !== 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pressTimer === null) {\n\t\t\t\tpressTimer = setTimeout(() => {\n\t\t\t\t\thandler(e);\n\t\t\t\t}, 1000);\n\t\t\t}\n\t\t};\n\t\t// 取消计时器\n\t\tconst cancel = (): void => {\n\t\t\tif (pressTimer !== null) {\n\t\t\t\tclearTimeout(pressTimer);\n\t\t\t\tpressTimer = null;\n\t\t\t}\n\t\t};\n\t\t// 添加事件监听器\n\t\tel.addEventListener(\"mousedown\", start);\n\t\tel.addEventListener(\"touchstart\", start);\n\t\t// 取消计时器\n\t\tel.addEventListener(\"click\", cancel);\n\t\tel.addEventListener(\"mouseout\", cancel);\n\t\tel.addEventListener(\"touchend\", cancel);\n\t\tel.addEventListener(\"touchcancel\", cancel);\n\t},\n};\n\nexport const vLongpress = withInstallDirective(LongpressDirective, \"longpress\");\nexport default vLongpress;\n"],"names":["LongpressDirective","mounted","el","binding","value","pressTimer","start","e","button","type","setTimeout","handler","cancel","clearTimeout","addEventListener","vLongpress","withInstallDirective"],"mappings":"iJAOMA,EAAgC,CACrC,OAAAC,CAAQC,EAAiBC,GACxB,GAA6B,mBAAlBA,EAAQC,MAClB,KAAM,8BASP,IAAIC,EAAkB,KAEtB,MAAMC,EAASC,IACVA,EAAEC,QACU,UAAXD,EAAEE,MAAiC,IAAbF,EAAEC,QAIV,OAAfH,IACHA,EAAaK,WAAW,KAdV,CAACH,IAChBJ,EAAQC,MAAMG,IAcZI,CAAQJ,IACN,OAICK,EAAS,KACK,OAAfP,IACHQ,aAAaR,GACbA,EAAa,OAIfH,EAAGY,iBAAiB,YAAaR,GACjCJ,EAAGY,iBAAiB,aAAcR,GAElCJ,EAAGY,iBAAiB,QAASF,GAC7BV,EAAGY,iBAAiB,WAAYF,GAChCV,EAAGY,iBAAiB,WAAYF,GAChCV,EAAGY,iBAAiB,cAAeF,EACpC,GAGYG,EAAaC,EAAAA,qBAAqBhB,EAAoB"}
1
+ {"version":3,"file":"index.js","sources":["../../../../packages/directives/click-longpress/index.ts"],"sourcesContent":["/**\n * v-longpress\n * 长按指令,长按时触发事件\n */\nimport { withInstallDirective } from \"@fast-china/utils\";\nimport type { Directive, DirectiveBinding } from \"vue\";\n\nconst LongpressDirective: Directive = {\n\tmounted(el: HTMLElement, binding: DirectiveBinding<(event: MouseEvent | TouchEvent) => void>) {\n\t\tif (typeof binding.value !== \"function\") {\n\t\t\tthrow \"callback must be a function\";\n\t\t}\n\n\t\t// 运行函数\n\t\tconst handler = (e: MouseEvent | TouchEvent): void => {\n\t\t\tbinding.value(e);\n\t\t};\n\n\t\t// 定义变量\n\t\tlet pressTimer: any = null;\n\t\t// 创建计时器( 2秒后执行函数 )\n\t\tconst start = (e: any): void => {\n\t\t\tif (e.button) {\n\t\t\t\tif (e.type === \"click\" && e.button !== 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pressTimer === null) {\n\t\t\t\tpressTimer = setTimeout(() => {\n\t\t\t\t\thandler(e);\n\t\t\t\t}, 1000);\n\t\t\t}\n\t\t};\n\t\t// 取消计时器\n\t\tconst cancel = (): void => {\n\t\t\tif (pressTimer !== null) {\n\t\t\t\tclearTimeout(pressTimer);\n\t\t\t\tpressTimer = null;\n\t\t\t}\n\t\t};\n\t\t// 添加事件监听器\n\t\tel.addEventListener(\"mousedown\", start);\n\t\tel.addEventListener(\"touchstart\", start);\n\t\t// 取消计时器\n\t\tel.addEventListener(\"click\", cancel);\n\t\tel.addEventListener(\"mouseout\", cancel);\n\t\tel.addEventListener(\"touchend\", cancel);\n\t\tel.addEventListener(\"touchcancel\", cancel);\n\t},\n};\n\nexport const vLongpress = withInstallDirective(LongpressDirective, \"longpress\");\nexport default vLongpress;\n"],"names":["LongpressDirective","mounted","el","binding","value","pressTimer","start","e","button","type","setTimeout","handler","cancel","clearTimeout","addEventListener","vLongpress","withInstallDirective"],"mappings":"iJAOMA,EAAgC,CACrC,OAAAC,CAAQC,EAAiBC,GACxB,GAA6B,mBAAlBA,EAAQC,MAClB,KAAM,8BASP,IAAIC,EAAkB,KAEtB,MAAMC,EAASC,IACVA,EAAEC,QACU,UAAXD,EAAEE,MAAiC,IAAbF,EAAEC,QAIV,OAAfH,IACHA,EAAaK,WAAW,KAdV,CAACH,IAChBJ,EAAQC,MAAMG,IAcZI,CAAQJ,IACN,OAICK,EAAS,KACK,OAAfP,IACHQ,aAAaR,GACbA,EAAa,OAIfH,EAAGY,iBAAiB,YAAaR,GACjCJ,EAAGY,iBAAiB,aAAcR,GAElCJ,EAAGY,iBAAiB,QAASF,GAC7BV,EAAGY,iBAAiB,WAAYF,GAChCV,EAAGY,iBAAiB,WAAYF,GAChCV,EAAGY,iBAAiB,cAAeF,EACpC,GAGYG,EAAaC,EAAAA,qBAAqBhB,EAAoB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../packages/directives/click-throttle/index.ts"],"sourcesContent":["/*\n 需求:防止按钮在短时间内被多次点击,使用节流函数限制规定时间内只能点击一次。\n\n 思路:\n 1、第一次点击,立即调用方法并禁用按钮,等延迟结束再次激活按钮\n 2、将需要触发的方法绑定在指令上\n\n 使用:给 Dom 加上 v-throttle 及回调函数即可\n <button v-throttle=\"debounceClick\">节流提交</button>\n*/\nimport { withInstallDirective } from \"@fast-china/utils\";\nimport type { Directive, DirectiveBinding } from \"vue\";\n\ninterface ElType extends HTMLElement {\n\t__handleClick__: () => any;\n\tdisabled: boolean;\n}\n\nconst ThrottleDirective: Directive = {\n\tmounted(el: ElType, binding: DirectiveBinding) {\n\t\tif (typeof binding.value !== \"function\") {\n\t\t\tthrow \"callback must be a function\";\n\t\t}\n\t\tlet timer: NodeJS.Timeout | null = null;\n\t\tel.__handleClick__ = (): void => {\n\t\t\tif (timer) {\n\t\t\t\tclearTimeout(timer);\n\t\t\t}\n\t\t\tif (!el.disabled) {\n\t\t\t\tel.disabled = true;\n\t\t\t\tbinding.value();\n\t\t\t\ttimer = setTimeout(() => {\n\t\t\t\t\tel.disabled = false;\n\t\t\t\t}, 1000);\n\t\t\t}\n\t\t};\n\t\tel.addEventListener(\"click\", el.__handleClick__);\n\t},\n\tbeforeUnmount(el: ElType) {\n\t\tel.removeEventListener(\"click\", el.__handleClick__);\n\t},\n};\n\nexport const vThrottle = withInstallDirective(ThrottleDirective, \"throttle\");\nexport default vThrottle;\n"],"names":["ThrottleDirective","mounted","el","binding","value","timer","__handleClick__","clearTimeout","disabled","setTimeout","addEventListener","beforeUnmount","removeEventListener","vThrottle","withInstallDirective"],"mappings":"iJAkBMA,EAA+B,CACpC,OAAAC,CAAQC,EAAYC,GACnB,GAA6B,mBAAlBA,EAAQC,MAClB,KAAM,8BAEP,IAAIC,EAA+B,KACnCH,EAAGI,gBAAkB,KAChBD,GACHE,aAAaF,GAETH,EAAGM,WACPN,EAAGM,UAAW,EACdL,EAAQC,QACRC,EAAQI,WAAW,KAClBP,EAAGM,UAAW,GACZ,OAGLN,EAAGQ,iBAAiB,QAASR,EAAGI,gBACjC,EACA,aAAAK,CAAcT,GACbA,EAAGU,oBAAoB,QAASV,EAAGI,gBACpC,GAGYO,EAAYC,EAAAA,qBAAqBd,EAAmB"}
1
+ {"version":3,"file":"index.js","sources":["../../../../packages/directives/click-throttle/index.ts"],"sourcesContent":["/*\n 需求:防止按钮在短时间内被多次点击,使用节流函数限制规定时间内只能点击一次。\n\n 思路:\n 1、第一次点击,立即调用方法并禁用按钮,等延迟结束再次激活按钮\n 2、将需要触发的方法绑定在指令上\n\n 使用:给 Dom 加上 v-throttle 及回调函数即可\n <button v-throttle=\"debounceClick\">节流提交</button>\n*/\nimport { withInstallDirective } from \"@fast-china/utils\";\nimport type { Directive, DirectiveBinding } from \"vue\";\n\ninterface ThrottleElement extends HTMLElement {\n\t__handleClick__: () => any;\n\tdisabled: boolean;\n}\n\nconst ThrottleDirective: Directive = {\n\tmounted(el: ThrottleElement, binding: DirectiveBinding<(...args: any[]) => void>) {\n\t\tif (typeof binding.value !== \"function\") {\n\t\t\tthrow \"callback must be a function\";\n\t\t}\n\t\tlet timer: NodeJS.Timeout | null = null;\n\t\tel.__handleClick__ = (): void => {\n\t\t\tif (timer) {\n\t\t\t\tclearTimeout(timer);\n\t\t\t}\n\t\t\tif (!el.disabled) {\n\t\t\t\tel.disabled = true;\n\t\t\t\tbinding.value();\n\t\t\t\ttimer = setTimeout(() => {\n\t\t\t\t\tel.disabled = false;\n\t\t\t\t}, 1000);\n\t\t\t}\n\t\t};\n\t\tel.addEventListener(\"click\", el.__handleClick__);\n\t},\n\tbeforeUnmount(el: ThrottleElement) {\n\t\tel.removeEventListener(\"click\", el.__handleClick__);\n\t},\n};\n\nexport const vThrottle = withInstallDirective(ThrottleDirective, \"throttle\");\nexport default vThrottle;\n"],"names":["ThrottleDirective","mounted","el","binding","value","timer","__handleClick__","clearTimeout","disabled","setTimeout","addEventListener","beforeUnmount","removeEventListener","vThrottle","withInstallDirective"],"mappings":"iJAkBMA,EAA+B,CACpC,OAAAC,CAAQC,EAAqBC,GAC5B,GAA6B,mBAAlBA,EAAQC,MAClB,KAAM,8BAEP,IAAIC,EAA+B,KACnCH,EAAGI,gBAAkB,KAChBD,GACHE,aAAaF,GAETH,EAAGM,WACPN,EAAGM,UAAW,EACdL,EAAQC,QACRC,EAAQI,WAAW,KAClBP,EAAGM,UAAW,GACZ,OAGLN,EAAGQ,iBAAiB,QAASR,EAAGI,gBACjC,EACA,aAAAK,CAAcT,GACbA,EAAGU,oBAAoB,QAASV,EAAGI,gBACpC,GAGYO,EAAYC,EAAAA,qBAAqBd,EAAmB"}
package/lib/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./make-installer.js"),r=require("./components/index.js");require("./constants/index.js"),require("./directives/index.js"),require("./hooks/index.js");const o=require("decimal.js"),s=require("./components/avatar/index.js"),t=require("./components/button/index.js"),a=require("./components/button/src/button.js"),p=require("./components/carNumber/src/common.js"),i=require("./components/carNumber/index.js"),n=require("./components/contextMenu/index.js"),l=require("./components/dialog/index.js"),c=require("./components/dialog/src/dialog.js"),m=require("./components/drawer/index.js"),u=require("./components/form/utils/form.js"),x=require("./components/form/index.js"),d=require("./components/form/src/form.js"),F=require("./components/form/src/formItem.js"),g=require("./components/formItemTip/index.js"),f=require("./components/formItemTip/src/formItemTip.js"),j=require("./components/icon/index.js"),q=require("./components/iconSelector/index.js"),P=require("./components/image/index.js"),b=require("./components/image/src/image.js"),S=require("./components/layoutGrid/index.js"),I=require("./components/select/index.js"),T=require("./components/select/src/select.js"),v=require("./components/selectPage/index.js"),E=require("./components/selectPage/src/selectPage.js"),y=require("./components/selectV2/index.js"),D=require("./components/selectV2/src/selectV2.js"),C=require("./components/table/src/page.type.js"),U=require("./components/table/src/table.type.js"),L=require("./components/table/utils/table.js"),k=require("./components/table/index.js"),N=require("./components/table/src/table.js"),h=require("./components/table/src/tableColumn.js"),V=require("./components/tree/index.js"),M=require("./components/tree/src/tree.js"),A=require("./components/treeSelect/index.js"),B=require("./components/treeSelect/src/treeSelect.js"),O=require("./components/upload/index.js"),G=require("./components/upload/src/upload.js"),_=require("./components/uploadImage/index.js"),w=require("./components/uploadImage/src/uploadImage.js"),K=require("./components/uploadImages/index.js"),R=require("./constants/mime.js"),Y=require("./constants/regex.js"),z=require("./directives/click-copy/index.js"),H=require("./directives/click-debounce/index.js"),J=require("./directives/click-draggable/index.js"),Q=require("./directives/click-icon-copy/index.js"),W=require("./directives/click-longpress/index.js"),X=require("./directives/click-throttle/index.js"),Z=require("./hooks/use-loading/index.js"),$=require("./hooks/use-overlay/index.js"),ee=require("./hooks/use-screenFull/index.js"),re=e.makeInstaller(),oe=re.install,se=re.version;exports.INSTALLED_KEY=e.INSTALLED_KEY,exports.FastElementPlus=r,Object.defineProperty(exports,"Decimal",{enumerable:!0,get:()=>o.Decimal}),exports.FaAvatar=s.FaAvatar,exports.FaButton=t.FaButton,exports.faButtonEmits=a.faButtonEmits,exports.faButtonProps=a.faButtonProps,exports.CarNumberArea=p.CarNumberArea,exports.CarNumberDigit=p.CarNumberDigit,exports.CarNumberLetter=p.CarNumberLetter,exports.FaCarNumber=i.FaCarNumber,exports.FaContextMenu=n.FaContextMenu,exports.FaDialog=l.FaDialog,exports.faDialogEmits=c.faDialogEmits,exports.faDialogProps=c.faDialogProps,exports.FaDrawer=m.FaDrawer,exports.formUtil=u.formUtil,exports.FaForm=x.FaForm,exports.FaFormItem=x.FaFormItem,exports.faFormProps=d.faFormProps,exports.faFormItemProps=F.faFormItemProps,exports.FaFormItemTip=g.FaFormItemTip,exports.faFormItemTipProps=f.faFormItemTipProps,exports.FaIcon=j.FaIcon,exports.FaIconSelector=q.FaIconSelector,exports.FaImage=P.FaImage,exports.faImageProps=b.faImageProps,exports.FaLayoutGrid=S.FaLayoutGrid,exports.FaLayoutGridItem=S.FaLayoutGridItem,exports.FaSelect=I.FaSelect,exports.FaSelectOption=I.FaSelectOption,exports.SelectProps=T.SelectProps,exports.faSelectProps=T.faSelectProps,exports.FaSelectPage=v.FaSelectPage,exports.faSelectPageEmits=E.faSelectPageEmits,exports.faSelectPageProps=E.faSelectPageProps,exports.FaSelectV2=y.FaSelectV2,exports.SelectV2Props=D.SelectV2Props,exports.faSelectV2Props=D.faSelectV2Props,exports.PagedSearchTypeEnum=C.PagedSearchTypeEnum,exports.getTableDefaultSlots=U.getTableDefaultSlots,exports.tableUtil=L.tableUtil,exports.FaTable=k.FaTable,exports.FaTableColumn=k.FaTableColumn,exports.faTableEmits=N.faTableEmits,exports.faTableProps=N.faTableProps,exports.tableProps=N.tableProps,exports.tableColumnProps=h.tableColumnProps,exports.FaTree=V.FaTree,exports.faTreeEmits=M.faTreeEmits,exports.faTreeProps=M.faTreeProps,exports.FaTreeSelect=A.FaTreeSelect,exports.faTreeSelectEmits=B.faTreeSelectEmits,exports.faTreeSelectProps=B.faTreeSelectProps,exports.FaUpload=O.FaUpload,exports.faUploadEmits=G.faUploadEmits,exports.faUploadProps=G.faUploadProps,exports.FaUploadImage=_.FaUploadImage,exports.faUploadImageEmits=w.faUploadImageEmits,exports.faUploadImageProps=w.faUploadImageProps,exports.FaUploadImages=K.FaUploadImages,exports.FaMimeType=R.FaMimeType,exports.RegExps=Y.RegExps,exports.vCopy=z.vCopy,exports.vDebounce=H.vDebounce,exports.vDraggable=J.vDraggable,exports.vIconCopy=Q.vIconCopy,exports.vLongpress=W.vLongpress,exports.vThrottle=X.vThrottle,exports.useLoading=Z.useLoading,exports.useOverlay=$.useOverlay,exports.useScreenFull=ee.useScreenFull,exports.default=re,exports.install=oe,exports.version=se;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./make-installer.js"),r=require("./components/index.js");require("./constants/index.js"),require("./directives/index.js"),require("./hooks/index.js");const o=require("decimal.js"),s=require("./components/avatar/index.js"),t=require("./components/button/index.js"),a=require("./components/button/src/button.js"),p=require("./components/carNumber/src/common.js"),i=require("./components/carNumber/index.js"),n=require("./components/contextMenu/index.js"),l=require("./components/dialog/index.js"),c=require("./components/dialog/src/dialog.js"),m=require("./components/drawer/index.js"),u=require("./components/form/utils/form.js"),x=require("./components/form/index.js"),d=require("./components/form/src/form.js"),g=require("./components/form/src/formItem.js"),F=require("./components/formItemTip/index.js"),f=require("./components/formItemTip/src/formItemTip.js"),j=require("./components/icon/index.js"),P=require("./components/iconSelector/index.js"),q=require("./components/image/index.js"),b=require("./components/image/src/image.js"),I=require("./components/inputDialogPage/index.js"),S=require("./components/inputDialogPage/src/inputDialogPage.js"),T=require("./components/layoutGrid/index.js"),v=require("./components/select/index.js"),D=require("./components/select/src/select.js"),E=require("./components/selectPage/index.js"),y=require("./components/selectPage/src/selectPage.js"),C=require("./components/selectV2/index.js"),U=require("./components/selectV2/src/selectV2.js"),L=require("./components/table/src/page.type.js"),k=require("./components/table/src/table.type.js"),N=require("./components/table/utils/table.js"),h=require("./components/table/index.js"),V=require("./components/table/src/table.js"),M=require("./components/table/src/tableColumn.js"),A=require("./components/tree/index.js"),B=require("./components/tree/src/tree.js"),O=require("./components/treeSelect/index.js"),G=require("./components/treeSelect/src/treeSelect.js"),_=require("./components/upload/index.js"),w=require("./components/upload/src/upload.js"),K=require("./components/uploadImage/index.js"),R=require("./components/uploadImage/src/uploadImage.js"),Y=require("./components/uploadImages/index.js"),z=require("./constants/mime.js"),H=require("./constants/regex.js"),J=require("./directives/click-copy/index.js"),Q=require("./directives/click-debounce/index.js"),W=require("./directives/click-draggable/index.js"),X=require("./directives/click-icon-copy/index.js"),Z=require("./directives/click-longpress/index.js"),$=require("./directives/click-throttle/index.js"),ee=require("./hooks/use-loading/index.js"),re=require("./hooks/use-overlay/index.js"),oe=require("./hooks/use-screenFull/index.js"),se=e.makeInstaller(),te=se.install,ae=se.version;exports.INSTALLED_KEY=e.INSTALLED_KEY,exports.FastElementPlus=r,Object.defineProperty(exports,"Decimal",{enumerable:!0,get:()=>o.Decimal}),exports.FaAvatar=s.FaAvatar,exports.FaButton=t.FaButton,exports.faButtonEmits=a.faButtonEmits,exports.faButtonProps=a.faButtonProps,exports.CarNumberArea=p.CarNumberArea,exports.CarNumberDigit=p.CarNumberDigit,exports.CarNumberLetter=p.CarNumberLetter,exports.FaCarNumber=i.FaCarNumber,exports.FaContextMenu=n.FaContextMenu,exports.FaDialog=l.FaDialog,exports.faDialogEmits=c.faDialogEmits,exports.faDialogProps=c.faDialogProps,exports.FaDrawer=m.FaDrawer,exports.formUtil=u.formUtil,exports.FaForm=x.FaForm,exports.FaFormItem=x.FaFormItem,exports.faFormProps=d.faFormProps,exports.faFormItemProps=g.faFormItemProps,exports.FaFormItemTip=F.FaFormItemTip,exports.faFormItemTipProps=f.faFormItemTipProps,exports.FaIcon=j.FaIcon,exports.FaIconSelector=P.FaIconSelector,exports.FaImage=q.FaImage,exports.faImageProps=b.faImageProps,exports.FaInputDialogPage=I.FaInputDialogPage,exports.faInputDialogPageEmits=S.faInputDialogPageEmits,exports.faInputDialogPageProps=S.faInputDialogPageProps,exports.FaLayoutGrid=T.FaLayoutGrid,exports.FaLayoutGridItem=T.FaLayoutGridItem,exports.FaSelect=v.FaSelect,exports.FaSelectOption=v.FaSelectOption,exports.SelectProps=D.SelectProps,exports.faSelectProps=D.faSelectProps,exports.FaSelectPage=E.FaSelectPage,exports.faSelectPageEmits=y.faSelectPageEmits,exports.faSelectPageProps=y.faSelectPageProps,exports.FaSelectV2=C.FaSelectV2,exports.SelectV2Props=U.SelectV2Props,exports.faSelectV2Props=U.faSelectV2Props,exports.PagedSearchTypeEnum=L.PagedSearchTypeEnum,exports.getTableDefaultSlots=k.getTableDefaultSlots,exports.tableUtil=N.tableUtil,exports.FaTable=h.FaTable,exports.FaTableColumn=h.FaTableColumn,exports.faTableEmits=V.faTableEmits,exports.faTableProps=V.faTableProps,exports.tableProps=V.tableProps,exports.tableColumnProps=M.tableColumnProps,exports.FaTree=A.FaTree,exports.faTreeEmits=B.faTreeEmits,exports.faTreeProps=B.faTreeProps,exports.FaTreeSelect=O.FaTreeSelect,exports.faTreeSelectEmits=G.faTreeSelectEmits,exports.faTreeSelectProps=G.faTreeSelectProps,exports.FaUpload=_.FaUpload,exports.faUploadEmits=w.faUploadEmits,exports.faUploadProps=w.faUploadProps,exports.FaUploadImage=K.FaUploadImage,exports.faUploadImageEmits=R.faUploadImageEmits,exports.faUploadImageProps=R.faUploadImageProps,exports.FaUploadImages=Y.FaUploadImages,exports.FaMimeType=z.FaMimeType,exports.RegExps=H.RegExps,exports.vCopy=J.vCopy,exports.vDebounce=Q.vDebounce,exports.vDraggable=W.vDraggable,exports.vIconCopy=X.vIconCopy,exports.vLongpress=Z.vLongpress,exports.vThrottle=$.vThrottle,exports.useLoading=ee.useLoading,exports.useOverlay=re.useOverlay,exports.useScreenFull=oe.useScreenFull,exports.default=se,exports.install=te,exports.version=ae;
2
2
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../packages/index.ts"],"sourcesContent":["import { makeInstaller } from \"./make-installer\";\n\nexport { INSTALLED_KEY } from \"./make-installer\";\nexport * as FastElementPlus from \"@fast-element-plus/components\";\n\nexport * from \"@fast-element-plus/components\";\nexport * from \"@fast-element-plus/constants\";\nexport * from \"@fast-element-plus/directives\";\nexport * from \"@fast-element-plus/hooks\";\n\nexport { Decimal } from \"decimal.js\";\n\nconst installer = makeInstaller();\n\nexport const install = installer.install;\nexport const version = installer.version;\nexport default installer;\n"],"names":["installer","makeInstaller","install","version"],"mappings":"yoFAYMA,GAAYC,EAAAA,gBAELC,GAAUF,GAAUE,QACpBC,GAAUH,GAAUG"}
1
+ {"version":3,"file":"index.js","sources":["../../packages/index.ts"],"sourcesContent":["import { makeInstaller } from \"./make-installer\";\n\nexport { INSTALLED_KEY } from \"./make-installer\";\nexport * as FastElementPlus from \"@fast-element-plus/components\";\n\nexport * from \"@fast-element-plus/components\";\nexport * from \"@fast-element-plus/constants\";\nexport * from \"@fast-element-plus/directives\";\nexport * from \"@fast-element-plus/hooks\";\n\nexport { Decimal } from \"decimal.js\";\n\nconst installer = makeInstaller();\n\nexport const install = installer.install;\nexport const version = installer.version;\nexport default installer;\n"],"names":["installer","makeInstaller","install","version"],"mappings":"+vFAYMA,GAAYC,EAAAA,gBAELC,GAAUF,GAAUE,QACpBC,GAAUH,GAAUG"}
@@ -1 +1 @@
1
- {"version":3,"file":"make-installer.js","sources":["../../packages/make-installer.ts"],"sourcesContent":["import * as FastElementPlusIconsVue from \"@fast-element-plus/icons-vue\";\nimport FastElementPlusComponents from \"./component\";\nimport FastElementPlusDirectives from \"./directive\";\nimport { installElementPlus } from \"./element-plus\";\nimport { version } from \"./version\";\nimport type { App } from \"vue\";\n\nexport const INSTALLED_KEY = Symbol(\"INSTALLED_KEY\");\n\nexport const makeInstaller = (): {\n\tversion: string;\n\tinstall: (app: App) => void;\n} => {\n\tconst install = (app: App): void => {\n\t\tif (app[INSTALLED_KEY]) return;\n\n\t\tapp[INSTALLED_KEY] = true;\n\n\t\tinstallElementPlus(app);\n\n\t\t/** 注册所有 Fast Element Plus Icon */\n\t\tfor (const [key, component] of Object.entries(FastElementPlusIconsVue)) {\n\t\t\t// 这里是给 FaIcon 使用的\n\t\t\tapp.component(`fa-icon-${key}`, component);\n\t\t}\n\n\t\tFastElementPlusComponents.forEach((c) => app.use(c));\n\n\t\tFastElementPlusDirectives.forEach((d) => app.use(d));\n\t};\n\n\treturn {\n\t\tversion,\n\t\tinstall,\n\t};\n};\n"],"names":["INSTALLED_KEY","Symbol","version","install","app","installElementPlus","key","component","Object","entries","FastElementPlusIconsVue","FastElementPlusComponents","forEach","c","use","FastElementPlusDirectives","d"],"mappings":"ygBAOaA,EAAgBC,OAAO,+DAEP,KAsBrB,CAAAC,QACNA,EAAAA,QACAC,QApBgBC,IAChB,IAAIA,EAAIJ,GAAR,CAEAI,EAAIJ,IAAiB,EAErBK,EAAAA,mBAAmBD,GAGnB,IAAA,MAAYE,EAAKC,KAAcC,OAAOC,QAAQC,GAE7CN,EAAIG,UAAU,WAAWD,IAAOC,GAGjCI,EAAAA,QAA0BC,QAASC,GAAMT,EAAIU,IAAID,IAEjDE,EAAAA,QAA0BH,QAASI,GAAMZ,EAAIU,IAAIE,GAdzB"}
1
+ {"version":3,"file":"make-installer.js","sources":["../../packages/make-installer.ts"],"sourcesContent":["import * as FastElementPlusIconsVue from \"@fast-element-plus/icons-vue\";\nimport FastElementPlusComponents from \"./component\";\nimport FastElementPlusDirectives from \"./directive\";\nimport { installElementPlus } from \"./element-plus\";\nimport { version } from \"./version\";\nimport type { App } from \"vue\";\n\nexport const INSTALLED_KEY = Symbol(\"INSTALLED_KEY\");\n\nexport const makeInstaller = (): {\n\tversion: string;\n\tinstall: (app: App) => void;\n} => {\n\tconst install = (app: App): void => {\n\t\tif (app[INSTALLED_KEY]) return;\n\n\t\tapp[INSTALLED_KEY] = true;\n\n\t\tinstallElementPlus(app);\n\n\t\t/** 注册所有 Fast Element Plus Icon */\n\t\tfor (const [key, component] of Object.entries(FastElementPlusIconsVue)) {\n\t\t\t// 这里是给 FaIcon 使用的\n\t\t\tapp.component(`fa-icon-${key}`, component);\n\t\t}\n\n\t\tFastElementPlusComponents.forEach((c) => app.use(c));\n\n\t\tFastElementPlusDirectives.forEach((d) => app.use(d));\n\t};\n\n\treturn {\n\t\tversion,\n\t\tinstall,\n\t};\n};\n"],"names":["INSTALLED_KEY","version","install","app","installElementPlus","key","component","Object","entries","FastElementPlusIconsVue","FastElementPlusComponents","forEach","c","use","FastElementPlusDirectives","d"],"mappings":"ygBAOaA,SAAuB,+DAEP,KAsBrB,CAAAC,QACNA,EAAAA,QACAC,QApBgBC,IAChB,IAAIA,EAAIH,GAAR,CAEAG,EAAIH,IAAiB,EAErBI,EAAAA,mBAAmBD,GAGnB,IAAA,MAAYE,EAAKC,KAAcC,OAAOC,QAAQC,GAE7CN,EAAIG,UAAU,WAAWD,IAAOC,GAGjCI,EAAAA,QAA0BC,QAASC,GAAMT,EAAIU,IAAID,IAEjDE,EAAAA,QAA0BH,QAASI,GAAMZ,EAAIU,IAAIE,GAdzB"}
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "1.0.7";
1
+ export declare const version = "1.0.10";
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.version="1.0.7";
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.version="1.0.10";
2
2
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sources":["../../packages/version.ts"],"sourcesContent":["export const version = \"1.0.7\";\n"],"names":[],"mappings":"gGAAuB"}
1
+ {"version":3,"file":"version.js","sources":["../../packages/version.ts"],"sourcesContent":["export const version = \"1.0.10\";\n"],"names":[],"mappings":"gGAAuB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fast-element-plus",
3
- "version": "1.0.7",
3
+ "version": "1.0.10",
4
4
  "description": "Fast 组件库.",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -89,7 +89,7 @@
89
89
  "peerDependencies": {
90
90
  "@element-plus/icons-vue": "^2.3",
91
91
  "@fast-china/utils": "^1",
92
- "@fast-element-plus/icons-vue": "^1.0.17",
92
+ "@fast-element-plus/icons-vue": "^1",
93
93
  "element-plus": "^2",
94
94
  "vue": "^3.5"
95
95
  },
@@ -106,7 +106,7 @@
106
106
  "@element-plus/icons-vue": "^2.3",
107
107
  "@fast-china/eslint-config": "^1",
108
108
  "@fast-china/utils": "^1",
109
- "@fast-element-plus/icons-vue": "^1.0.17",
109
+ "@fast-element-plus/icons-vue": "^1",
110
110
  "@rollup/plugin-terser": "^0.4",
111
111
  "@types/lodash": "^4.17",
112
112
  "@types/lodash-es": "^4.17",
@@ -61,7 +61,7 @@
61
61
  border-top: 1px solid var(--el-border-color-lighter);
62
62
  }
63
63
  // 撑满
64
- &.fa-dialog__fill-height {
64
+ &.fa-dialog__full-height {
65
65
  height: var(--height);
66
66
  }
67
67
  // 全屏
@@ -0,0 +1,35 @@
1
+ .fa-select-dropdown__more-detail {
2
+ .el-scrollbar {
3
+ .el-select-dropdown__wrap {
4
+ .el-select-dropdown__list {
5
+ .fa-select-dropdown__selector__more-detail {
6
+ display: flex;
7
+ flex-direction: column;
8
+ justify-content: center;
9
+ height: 42px;
10
+ > :first-child {
11
+ line-height: normal;
12
+ }
13
+ > :nth-child(2) {
14
+ line-height: normal;
15
+ margin-left: auto;
16
+ color: var(--el-text-color-secondary);
17
+ font-size: var(--el-font-size-extra-small);
18
+ }
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }
24
+
25
+ .fa-select-dropdown__more-detail-small {
26
+ .el-scrollbar {
27
+ .el-select-dropdown__wrap {
28
+ .el-select-dropdown__list {
29
+ .fa-select-dropdown__selector__more-detail {
30
+ height: 34px;
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
@@ -20,27 +20,6 @@
20
20
  width: 100%;
21
21
  }
22
22
  }
23
- .el-scrollbar {
24
- .el-select-dropdown__wrap {
25
- .el-select-dropdown__list {
26
- .fa-select-page-dropdown__selector__more-detail {
27
- display: flex;
28
- flex-direction: column;
29
- justify-content: center;
30
- height: 42px;
31
- > :first-child {
32
- line-height: normal;
33
- }
34
- > :nth-child(2) {
35
- line-height: normal;
36
- margin-left: auto;
37
- color: var(--el-text-color-secondary);
38
- font-size: var(--el-font-size-extra-small);
39
- }
40
- }
41
- }
42
- }
43
- }
44
23
  .el-select-dropdown__footer {
45
24
  padding: 5px;
46
25
  display: flex;
@@ -62,13 +41,4 @@
62
41
  }
63
42
  }
64
43
  }
65
- .el-scrollbar {
66
- .el-select-dropdown__wrap {
67
- .el-select-dropdown__list {
68
- .fa-select-page-dropdown__selector__more-detail {
69
- height: 34px;
70
- }
71
- }
72
- }
73
- }
74
44
  }
@@ -262,12 +262,12 @@
262
262
  vertical-align: middle !important;
263
263
  .cell {
264
264
  padding: 0;
265
- line-height: 0;
266
265
  }
267
266
  }
268
267
  .fa-table__image-column {
269
268
  vertical-align: middle !important;
270
269
  .cell {
270
+ line-height: 0;
271
271
  .fa-table__image-column__button {
272
272
  [class*="el-icon"] + span {
273
273
  margin-left: 0;
@@ -1,3 +1,9 @@
1
+ html.dark {
2
+ .fa-tree {
3
+ --el-input-bg-color: transparent;
4
+ --el-fill-color-blank: transparent;
5
+ }
6
+ }
1
7
  .fa-tree {
2
8
  display: flex;
3
9
  flex-direction: column;
@@ -58,10 +64,19 @@
58
64
  font-size: var(--el-font-size-medium);
59
65
  }
60
66
  }
61
- span:first-child {
67
+ > div {
68
+ display: flex;
69
+ align-items: center;
70
+ flex: 1;
71
+ overflow: hidden;
72
+ .el-avatar {
73
+ flex-shrink: 0;
74
+ }
75
+ }
76
+ > :first-child {
62
77
  flex: 1;
63
78
  }
64
- span:nth-child(2) {
79
+ > :nth-child(2) {
65
80
  margin-left: 10px;
66
81
  .el-icon:nth-child(n + 2) {
67
82
  margin-left: 5px;
package/styles/index.scss CHANGED
@@ -10,6 +10,7 @@
10
10
  @use "./components/form.scss";
11
11
  @use "./components/formItemTip.scss";
12
12
  @use "./components/image.scss";
13
+ @use "./components/select.scss";
13
14
  @use "./components/selectPage.scss";
14
15
  @use "./components/selectV2.scss";
15
16
  @use "./components/table.scss";