fast-element-plus 2.0.16 → 2.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/CONTRIBUTING.md +8 -0
  3. package/dist/component.d.ts +6564 -2
  4. package/dist/component.mjs.map +1 -1
  5. package/dist/components/avatar/src/avatar.d.ts +19 -7
  6. package/dist/components/avatar/src/avatar.mjs +5 -0
  7. package/dist/components/avatar/src/avatar.mjs.map +1 -1
  8. package/dist/components/button/src/button.d.ts +4 -4
  9. package/dist/components/button/src/button.mjs +3 -4
  10. package/dist/components/button/src/button.mjs.map +1 -1
  11. package/dist/components/carNumber/src/carNumber.mjs +7 -9
  12. package/dist/components/carNumber/src/carNumber.mjs.map +1 -1
  13. package/dist/components/contextMenu/src/contextMenu.mjs +8 -7
  14. package/dist/components/contextMenu/src/contextMenu.mjs.map +1 -1
  15. package/dist/components/dialog/src/dialog.d.ts +7 -4
  16. package/dist/components/dialog/src/dialog.mjs +6 -7
  17. package/dist/components/dialog/src/dialog.mjs.map +1 -1
  18. package/dist/components/drawer/src/drawer.mjs +14 -14
  19. package/dist/components/drawer/src/drawer.mjs.map +1 -1
  20. package/dist/components/form/src/form.d.ts +36 -24
  21. package/dist/components/form/src/form.mjs +8 -9
  22. package/dist/components/form/src/form.mjs.map +1 -1
  23. package/dist/components/form/src/formItem.d.ts +3 -3
  24. package/dist/components/form/src/formItem.mjs +18 -17
  25. package/dist/components/form/src/formItem.mjs.map +1 -1
  26. package/dist/components/form/utils/form.d.ts +2 -2
  27. package/dist/components/form/utils/form.mjs +2 -2
  28. package/dist/components/form/utils/form.mjs.map +1 -1
  29. package/dist/components/icon/src/icon.mjs.map +1 -1
  30. package/dist/components/iconSelector/src/iconSelector.d.ts +2 -2
  31. package/dist/components/iconSelector/src/iconSelector.mjs +4 -5
  32. package/dist/components/iconSelector/src/iconSelector.mjs.map +1 -1
  33. package/dist/components/image/src/image.d.ts +1 -1
  34. package/dist/components/image/src/image.mjs +2 -2
  35. package/dist/components/image/src/image.mjs.map +1 -1
  36. package/dist/components/inputDialogPage/src/inputDialogPage.mjs +10 -12
  37. package/dist/components/inputDialogPage/src/inputDialogPage.mjs.map +1 -1
  38. package/dist/components/layoutGrid/src/layoutGrid.d.ts +23 -11
  39. package/dist/components/layoutGrid/src/layoutGrid.mjs +42 -43
  40. package/dist/components/layoutGrid/src/layoutGrid.mjs.map +1 -1
  41. package/dist/components/layoutGrid/src/layoutGrid.type.d.ts +1 -1
  42. package/dist/components/layoutGrid/src/layoutGridItem.mjs +13 -14
  43. package/dist/components/layoutGrid/src/layoutGridItem.mjs.map +1 -1
  44. package/dist/components/select/src/select.d.ts +27 -12
  45. package/dist/components/select/src/select.mjs +46 -44
  46. package/dist/components/select/src/select.mjs.map +1 -1
  47. package/dist/components/select/src/selectOption.mjs +4 -5
  48. package/dist/components/select/src/selectOption.mjs.map +1 -1
  49. package/dist/components/selectPage/src/selectPage.d.ts +24 -9
  50. package/dist/components/selectPage/src/selectPage.mjs +45 -52
  51. package/dist/components/selectPage/src/selectPage.mjs.map +1 -1
  52. package/dist/components/selectV2/src/selectV2.d.ts +49 -29
  53. package/dist/components/selectV2/src/selectV2.mjs +64 -62
  54. package/dist/components/selectV2/src/selectV2.mjs.map +1 -1
  55. package/dist/components/table/src/table.d.ts +63 -29
  56. package/dist/components/table/src/table.mjs +77 -81
  57. package/dist/components/table/src/table.mjs.map +1 -1
  58. package/dist/components/table/src/table.type.d.ts +2 -2
  59. package/dist/components/table/src/table.type.mjs.map +1 -1
  60. package/dist/components/table/src/tableColumn.d.ts +13 -13
  61. package/dist/components/table/src/tableColumn.mjs +17 -30
  62. package/dist/components/table/src/tableColumn.mjs.map +1 -1
  63. package/dist/components/table/src/tableColumnSettingDialog.mjs +24 -14
  64. package/dist/components/table/src/tableColumnSettingDialog.mjs.map +1 -1
  65. package/dist/components/table/src/tablePagination.mjs +2 -3
  66. package/dist/components/table/src/tablePagination.mjs.map +1 -1
  67. package/dist/components/table/src/tableSearchForm.d.ts +4 -4
  68. package/dist/components/table/src/tableSearchForm.mjs +24 -27
  69. package/dist/components/table/src/tableSearchForm.mjs.map +1 -1
  70. package/dist/components/table/src/tableSearchFormItem.d.ts +1 -7
  71. package/dist/components/table/src/tableSearchFormItem.mjs +3 -6
  72. package/dist/components/table/src/tableSearchFormItem.mjs.map +1 -1
  73. package/dist/components/table/src/useTable.d.ts +4 -4
  74. package/dist/components/table/src/useTable.mjs +13 -14
  75. package/dist/components/table/src/useTable.mjs.map +1 -1
  76. package/dist/components/table/utils/table.mjs +5 -7
  77. package/dist/components/table/utils/table.mjs.map +1 -1
  78. package/dist/components/tree/src/tree.d.ts +6 -6
  79. package/dist/components/tree/src/tree.mjs +28 -26
  80. package/dist/components/tree/src/tree.mjs.map +1 -1
  81. package/dist/components/treeSelect/src/treeSelect.d.ts +30 -27
  82. package/dist/components/treeSelect/src/treeSelect.mjs +45 -43
  83. package/dist/components/treeSelect/src/treeSelect.mjs.map +1 -1
  84. package/dist/components/upload/src/upload.d.ts +1 -1
  85. package/dist/components/upload/src/upload.mjs +4 -5
  86. package/dist/components/upload/src/upload.mjs.map +1 -1
  87. package/dist/components/upload/src/useUpload.mjs +5 -7
  88. package/dist/components/upload/src/useUpload.mjs.map +1 -1
  89. package/dist/components/upload/utils/upload.mjs +1 -1
  90. package/dist/components/upload/utils/upload.mjs.map +1 -1
  91. package/dist/components/uploadImage/src/uploadImage.d.ts +4 -16
  92. package/dist/components/uploadImage/src/uploadImage.mjs +7 -13
  93. package/dist/components/uploadImage/src/uploadImage.mjs.map +1 -1
  94. package/dist/components/uploadImages/src/uploadImages.d.ts +1 -1
  95. package/dist/components/uploadImages/src/uploadImages.mjs +7 -8
  96. package/dist/components/uploadImages/src/uploadImages.mjs.map +1 -1
  97. package/dist/directives/click-copy/index.mjs +5 -9
  98. package/dist/directives/click-copy/index.mjs.map +1 -1
  99. package/dist/element-plus.mjs +5 -6
  100. package/dist/element-plus.mjs.map +1 -1
  101. package/dist/hooks/use-screenFull/index.mjs.map +1 -1
  102. package/dist/index.css +1 -1
  103. package/dist/index.css.map +1 -1
  104. package/dist/index.global.min.js +4 -4
  105. package/dist/index.global.min.js.map +1 -1
  106. package/dist/utils/async/index.mjs.map +1 -1
  107. package/dist/utils/date/index.mjs.map +1 -1
  108. package/dist/utils/index.d.ts +1 -0
  109. package/dist/utils/object/index.d.ts +30 -0
  110. package/dist/utils/object/index.mjs +159 -0
  111. package/dist/utils/object/index.mjs.map +1 -0
  112. package/dist/utils/string/index.mjs.map +1 -1
  113. package/dist/utils/vue/emits.mjs.map +1 -1
  114. package/dist/utils/vue/install.mjs.map +1 -1
  115. package/dist/utils/vue/render.mjs.map +1 -1
  116. package/dist/version.d.ts +1 -1
  117. package/dist/version.mjs +1 -1
  118. package/dist/version.mjs.map +1 -1
  119. package/package.json +7 -11
@@ -1,4 +1,3 @@
1
- import { isArray, isFunction, isString } from "lodash-unified";
2
1
  //#region src/components/table/utils/table.ts
3
2
  /**
4
3
  * 表格工具类
@@ -9,7 +8,7 @@ const tableUtil = {
9
8
  * @param {String} callValue 需要处理的值
10
9
  */
11
10
  formatValue(callValue) {
12
- if (isArray(callValue)) return callValue.length ? callValue.join(` , `) : null;
11
+ if (Array.isArray(callValue)) return callValue.length ? callValue.join(` , `) : null;
13
12
  return callValue;
14
13
  },
15
14
  /**
@@ -44,8 +43,7 @@ const tableUtil = {
44
43
  filterEnum(callValue, enumData, fieldNames, type) {
45
44
  const value = fieldNames?.value ?? "value";
46
45
  const label = fieldNames?.label ?? "label";
47
- let filterData;
48
- if (isArray(enumData)) filterData = enumData.find((item) => item[value] === callValue);
46
+ const filterData = enumData.find((item) => item[value] === callValue);
49
47
  if (type === "tag") return filterData?.type ?? "info";
50
48
  return filterData ? filterData[label] : null;
51
49
  },
@@ -84,8 +82,8 @@ const tableUtil = {
84
82
  */
85
83
  setEnumMap(columnEnum, prop, enumMap) {
86
84
  if (!columnEnum) return;
87
- if (isFunction(columnEnum)) enumMap.set(prop, columnEnum());
88
- else if (isArray(columnEnum)) enumMap.set(prop, columnEnum);
85
+ if (typeof columnEnum === "function") enumMap.set(prop, columnEnum());
86
+ else if (Array.isArray(columnEnum)) enumMap.set(prop, columnEnum);
89
87
  },
90
88
  /**
91
89
  * 扁平化 columns
@@ -97,7 +95,7 @@ const tableUtil = {
97
95
  flatArr.push(col);
98
96
  col.show ??= true;
99
97
  let enumKey = col.prop ?? col.search?.key;
100
- if (col.enum && isString(col.enum)) enumKey = col.enum;
98
+ if (col.enum && typeof col.enum === "string") enumKey = col.enum;
101
99
  if (col.enum && enumKey && enumMap) this.setEnumMap(col.enum, enumKey, enumMap);
102
100
  });
103
101
  return flatArr.filter((item) => !item._children?.length);
@@ -1 +1 @@
1
- {"version":3,"file":"table.mjs","names":[],"sources":["../../../../src/components/table/utils/table.ts"],"sourcesContent":["import { isArray, isFunction, isString } from \"lodash-unified\";\nimport type { PagedSortInput } from \"../src/page.type\";\nimport type { DefaultRow } from \"../src/table.state\";\nimport type { FaTableColumnCtx, FaTableEnumColumnCtx, FaTableEnumColumnType } from \"../src/table.type\";\n\n/**\n * 表格工具类\n */\nexport const tableUtil = {\n\t/**\n\t * @description 处理无数据情况\n\t * @param {String} callValue 需要处理的值\n\t */\n\tformatValue(callValue: unknown): unknown {\n\t\t// 如果当前值为数组,使用 / 拼接(根据需求自定义)\n\t\tif (isArray(callValue)) return callValue.length ? callValue.join(` , `) : null;\n\t\treturn callValue;\n\t},\n\t/**\n\t * @description 处理 prop 为多级嵌套的情况(列如: prop:user.name)\n\t * @param {Object} row 当前行数据\n\t * @param {String} prop 当前 prop\n\t */\n\thandleRowAccordingToProp(row: DefaultRow, prop: string): unknown {\n\t\tlet value: unknown = row;\n\t\tfor (const item of prop.split(\".\")) {\n\t\t\tif (typeof value !== \"object\" || value === null) return undefined;\n\t\t\tvalue = (value as Record<string, unknown>)[item];\n\t\t}\n\t\treturn value;\n\t},\n\t/**\n\t * @description 处理 prop,当 prop 为多级嵌套时 ==> 返回最后一级 prop\n\t * @param {String} prop 当前 prop\n\t */\n\thandleProp(prop: string): string {\n\t\tconst propArr = prop.split(\".\");\n\t\tif (propArr.length === 1) return prop;\n\t\treturn propArr.at(-1) ?? prop;\n\t},\n\t/**\n\t * @description 根据枚举列表查询当需要的数据(如果指定了 label 和 value 的 key值,会自动识别格式化)\n\t * @param {String} callValue 当前单元格值\n\t * @param {Array} enumData 字典列表\n\t * @param {Array} fieldNames 指定 label && value 的 key 值\n\t * @param {String} type 过滤类型(目前只有 tag)\n\t */\n\tfilterEnum(callValue: unknown, enumData: FaTableEnumColumnCtx[], fieldNames?: { label: string; value: string }, type?: \"tag\"): unknown {\n\t\tconst value = fieldNames?.value ?? \"value\";\n\t\tconst label = fieldNames?.label ?? \"label\";\n\t\tlet filterData: FaTableEnumColumnCtx | undefined;\n\t\tif (isArray(enumData)) {\n\t\t\tfilterData = enumData.find((item) => item[value] === callValue);\n\t\t}\n\t\tif (type === \"tag\") {\n\t\t\treturn filterData?.type ?? \"info\";\n\t\t}\n\t\treturn filterData ? filterData[label] : null;\n\t},\n\t/**\n\t * 数组动态排序\n\t */\n\tarrayDynamicSort(sortList: PagedSortInput[]): (a: DefaultRow, b: DefaultRow) => number {\n\t\treturn (a, b) => {\n\t\t\tif (sortList.length > 0) {\n\t\t\t\tfor (const condition of sortList) {\n\t\t\t\t\tconst property = condition.enField;\n\t\t\t\t\tconst order = condition.mode;\n\t\t\t\t\tif (!property) continue;\n\n\t\t\t\t\tconst aValue: unknown = a[property];\n\t\t\t\t\tconst bValue: unknown = b[property];\n\n\t\t\t\t\tif (typeof aValue === \"string\" && typeof bValue === \"string\") {\n\t\t\t\t\t\tif (order === \"ascending\") {\n\t\t\t\t\t\t\tconst comparison = aValue.localeCompare(bValue, \"zh-CN\");\n\t\t\t\t\t\t\tif (comparison !== 0) {\n\t\t\t\t\t\t\t\treturn comparison;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (order === \"descending\") {\n\t\t\t\t\t\t\tconst comparison = bValue.localeCompare(aValue, \"zh-CN\");\n\t\t\t\t\t\t\tif (comparison !== 0) {\n\t\t\t\t\t\t\t\treturn comparison;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (order === \"ascending\") {\n\t\t\t\t\t\t\tif ((aValue as string) < (bValue as string)) return -1;\n\t\t\t\t\t\t\tif ((aValue as string) > (bValue as string)) return 1;\n\t\t\t\t\t\t} else if (order === \"descending\") {\n\t\t\t\t\t\t\tif ((aValue as string) > (bValue as string)) return -1;\n\t\t\t\t\t\t\tif ((aValue as string) < (bValue as string)) return 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t};\n\t},\n\t/**\n\t * 设置枚举\n\t */\n\tsetEnumMap(columnEnum: FaTableEnumColumnType, prop: string, enumMap: Map<string, FaTableEnumColumnCtx[]>): void {\n\t\tif (!columnEnum) return;\n\t\tif (isFunction(columnEnum)) {\n\t\t\tenumMap.set(prop, columnEnum());\n\t\t} else if (isArray(columnEnum)) {\n\t\t\tenumMap.set(prop, columnEnum);\n\t\t}\n\t},\n\t/**\n\t * 扁平化 columns\n\t */\n\tflatColumns(columns: FaTableColumnCtx[], enumMap?: Map<string, FaTableEnumColumnCtx[]>): FaTableColumnCtx[] {\n\t\tconst flatArr: FaTableColumnCtx[] = [];\n\t\tcolumns.forEach((col) => {\n\t\t\tif (col._children?.length) {\n\t\t\t\tflatArr.push(...this.flatColumns(col._children));\n\t\t\t}\n\n\t\t\tflatArr.push(col);\n\n\t\t\t// 给每一项 column 添加 show && filterEnum 默认属性\n\t\t\tcol.show ??= true;\n\t\t\t// col.filterEnum = col.filterEnum ?? col.tag ?? false;\n\n\t\t\tlet enumKey = col.prop ?? col.search?.key;\n\n\t\t\tif (col.enum && isString(col.enum)) {\n\t\t\t\tenumKey = col.enum;\n\t\t\t}\n\n\t\t\t// 设置 enumMap\n\t\t\tif (col.enum && enumKey && enumMap) this.setEnumMap(col.enum, enumKey, enumMap);\n\t\t});\n\t\treturn flatArr.filter((item) => !item._children?.length);\n\t},\n};\n"],"mappings":";;;;;AAQA,MAAa,YAAY;;;;;CAKxB,YAAY,WAA6B;EAExC,IAAI,QAAQ,SAAS,GAAG,OAAO,UAAU,SAAS,UAAU,KAAK,KAAK,IAAI;EAC1E,OAAO;CACR;;;;;;CAMA,yBAAyB,KAAiB,MAAuB;EAChE,IAAI,QAAiB;EACrB,KAAK,MAAM,QAAQ,KAAK,MAAM,GAAG,GAAG;GACnC,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO,KAAA;GACxD,QAAS,MAAkC;EAC5C;EACA,OAAO;CACR;;;;;CAKA,WAAW,MAAsB;EAChC,MAAM,UAAU,KAAK,MAAM,GAAG;EAC9B,IAAI,QAAQ,WAAW,GAAG,OAAO;EACjC,OAAO,QAAQ,GAAG,EAAE,KAAK;CAC1B;;;;;;;;CAQA,WAAW,WAAoB,UAAkC,YAA+C,MAAuB;EACtI,MAAM,QAAQ,YAAY,SAAS;EACnC,MAAM,QAAQ,YAAY,SAAS;EACnC,IAAI;EACJ,IAAI,QAAQ,QAAQ,GACnB,aAAa,SAAS,MAAM,SAAS,KAAK,WAAW,SAAS;EAE/D,IAAI,SAAS,OACZ,OAAO,YAAY,QAAQ;EAE5B,OAAO,aAAa,WAAW,SAAS;CACzC;;;;CAIA,iBAAiB,UAAsE;EACtF,QAAQ,GAAG,MAAM;GAChB,IAAI,SAAS,SAAS,GACrB,KAAK,MAAM,aAAa,UAAU;IACjC,MAAM,WAAW,UAAU;IAC3B,MAAM,QAAQ,UAAU;IACxB,IAAI,CAAC,UAAU;IAEf,MAAM,SAAkB,EAAE;IAC1B,MAAM,SAAkB,EAAE;IAE1B,IAAI,OAAO,WAAW,YAAY,OAAO,WAAW,UAAU;KAC7D,IAAI,UAAU,aAAa;MAC1B,MAAM,aAAa,OAAO,cAAc,QAAQ,OAAO;MACvD,IAAI,eAAe,GAClB,OAAO;KAET,OAAO,IAAI,UAAU,cAAc;MAClC,MAAM,aAAa,OAAO,cAAc,QAAQ,OAAO;MACvD,IAAI,eAAe,GAClB,OAAO;KAET;IACD,OACC,IAAI,UAAU,aAAa;KAC1B,IAAK,SAAqB,QAAmB,OAAO;KACpD,IAAK,SAAqB,QAAmB,OAAO;IACrD,OAAO,IAAI,UAAU,cAAc;KAClC,IAAK,SAAqB,QAAmB,OAAO;KACpD,IAAK,SAAqB,QAAmB,OAAO;IACrD;GAEF;GAGD,OAAO;EACR;CACD;;;;CAIA,WAAW,YAAmC,MAAc,SAAoD;EAC/G,IAAI,CAAC,YAAY;EACjB,IAAI,WAAW,UAAU,GACxB,QAAQ,IAAI,MAAM,WAAW,CAAC;OACxB,IAAI,QAAQ,UAAU,GAC5B,QAAQ,IAAI,MAAM,UAAU;CAE9B;;;;CAIA,YAAY,SAA6B,SAAmE;EAC3G,MAAM,UAA8B,CAAC;EACrC,QAAQ,SAAS,QAAQ;GACxB,IAAI,IAAI,WAAW,QAClB,QAAQ,KAAK,GAAG,KAAK,YAAY,IAAI,SAAS,CAAC;GAGhD,QAAQ,KAAK,GAAG;GAGhB,IAAI,SAAS;GAGb,IAAI,UAAU,IAAI,QAAQ,IAAI,QAAQ;GAEtC,IAAI,IAAI,QAAQ,SAAS,IAAI,IAAI,GAChC,UAAU,IAAI;GAIf,IAAI,IAAI,QAAQ,WAAW,SAAS,KAAK,WAAW,IAAI,MAAM,SAAS,OAAO;EAC/E,CAAC;EACD,OAAO,QAAQ,QAAQ,SAAS,CAAC,KAAK,WAAW,MAAM;CACxD;AACD"}
1
+ {"version":3,"file":"table.mjs","names":[],"sources":["../../../../src/components/table/utils/table.ts"],"sourcesContent":["import type { PagedSortInput } from \"../src/page.type\";\nimport type { DefaultRow } from \"../src/table.state\";\nimport type { FaTableColumnCtx, FaTableEnumColumnCtx, FaTableEnumColumnType } from \"../src/table.type\";\n\n/**\n * 表格工具类\n */\nexport const tableUtil = {\n\t/**\n\t * @description 处理无数据情况\n\t * @param {String} callValue 需要处理的值\n\t */\n\tformatValue(callValue: unknown): unknown {\n\t\t// 如果当前值为数组,使用 / 拼接(根据需求自定义)\n\t\tif (Array.isArray(callValue)) return callValue.length ? callValue.join(` , `) : null;\n\t\treturn callValue;\n\t},\n\t/**\n\t * @description 处理 prop 为多级嵌套的情况(列如: prop:user.name)\n\t * @param {Object} row 当前行数据\n\t * @param {String} prop 当前 prop\n\t */\n\thandleRowAccordingToProp(row: DefaultRow, prop: string): unknown {\n\t\tlet value: unknown = row;\n\t\tfor (const item of prop.split(\".\")) {\n\t\t\tif (typeof value !== \"object\" || value === null) return undefined;\n\t\t\tvalue = (value as Record<string, unknown>)[item];\n\t\t}\n\t\treturn value;\n\t},\n\t/**\n\t * @description 处理 prop,当 prop 为多级嵌套时 ==> 返回最后一级 prop\n\t * @param {String} prop 当前 prop\n\t */\n\thandleProp(prop: string): string {\n\t\tconst propArr = prop.split(\".\");\n\t\tif (propArr.length === 1) return prop;\n\t\treturn propArr.at(-1) ?? prop;\n\t},\n\t/**\n\t * @description 根据枚举列表查询当需要的数据(如果指定了 label 和 value 的 key值,会自动识别格式化)\n\t * @param {String} callValue 当前单元格值\n\t * @param {Array} enumData 字典列表\n\t * @param {Array} fieldNames 指定 label && value 的 key 值\n\t * @param {String} type 过滤类型(目前只有 tag)\n\t */\n\tfilterEnum(callValue: unknown, enumData: FaTableEnumColumnCtx[], fieldNames?: { label: string; value: string }, type?: \"tag\"): unknown {\n\t\tconst value = fieldNames?.value ?? \"value\";\n\t\tconst label = fieldNames?.label ?? \"label\";\n\t\tconst filterData = enumData.find((item) => item[value] === callValue);\n\t\tif (type === \"tag\") {\n\t\t\treturn filterData?.type ?? \"info\";\n\t\t}\n\t\treturn filterData ? filterData[label] : null;\n\t},\n\t/**\n\t * 数组动态排序\n\t */\n\tarrayDynamicSort(sortList: PagedSortInput[]): (a: DefaultRow, b: DefaultRow) => number {\n\t\treturn (a, b) => {\n\t\t\tif (sortList.length > 0) {\n\t\t\t\tfor (const condition of sortList) {\n\t\t\t\t\tconst property = condition.enField;\n\t\t\t\t\tconst order = condition.mode;\n\t\t\t\t\tif (!property) continue;\n\n\t\t\t\t\tconst aValue: unknown = a[property];\n\t\t\t\t\tconst bValue: unknown = b[property];\n\n\t\t\t\t\tif (typeof aValue === \"string\" && typeof bValue === \"string\") {\n\t\t\t\t\t\tif (order === \"ascending\") {\n\t\t\t\t\t\t\tconst comparison = aValue.localeCompare(bValue, \"zh-CN\");\n\t\t\t\t\t\t\tif (comparison !== 0) {\n\t\t\t\t\t\t\t\treturn comparison;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (order === \"descending\") {\n\t\t\t\t\t\t\tconst comparison = bValue.localeCompare(aValue, \"zh-CN\");\n\t\t\t\t\t\t\tif (comparison !== 0) {\n\t\t\t\t\t\t\t\treturn comparison;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (order === \"ascending\") {\n\t\t\t\t\t\t\tif ((aValue as string) < (bValue as string)) return -1;\n\t\t\t\t\t\t\tif ((aValue as string) > (bValue as string)) return 1;\n\t\t\t\t\t\t} else if (order === \"descending\") {\n\t\t\t\t\t\t\tif ((aValue as string) > (bValue as string)) return -1;\n\t\t\t\t\t\t\tif ((aValue as string) < (bValue as string)) return 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t};\n\t},\n\t/**\n\t * 设置枚举\n\t */\n\tsetEnumMap(columnEnum: FaTableEnumColumnType, prop: string, enumMap: Map<string, FaTableEnumColumnCtx[]>): void {\n\t\tif (!columnEnum) return;\n\t\tif (typeof columnEnum === \"function\") {\n\t\t\tenumMap.set(prop, columnEnum());\n\t\t} else if (Array.isArray(columnEnum)) {\n\t\t\tenumMap.set(prop, columnEnum);\n\t\t}\n\t},\n\t/**\n\t * 扁平化 columns\n\t */\n\tflatColumns(columns: FaTableColumnCtx[], enumMap?: Map<string, FaTableEnumColumnCtx[]>): FaTableColumnCtx[] {\n\t\tconst flatArr: FaTableColumnCtx[] = [];\n\t\tcolumns.forEach((col) => {\n\t\t\tif (col._children?.length) {\n\t\t\t\tflatArr.push(...this.flatColumns(col._children));\n\t\t\t}\n\n\t\t\tflatArr.push(col);\n\n\t\t\t// 给每一项 column 添加 show && filterEnum 默认属性\n\t\t\tcol.show ??= true;\n\t\t\tlet enumKey = col.prop ?? col.search?.key;\n\n\t\t\tif (col.enum && typeof col.enum === \"string\") {\n\t\t\t\tenumKey = col.enum;\n\t\t\t}\n\n\t\t\t// 设置 enumMap\n\t\t\tif (col.enum && enumKey && enumMap) this.setEnumMap(col.enum, enumKey, enumMap);\n\t\t});\n\t\treturn flatArr.filter((item) => !item._children?.length);\n\t},\n};\n"],"mappings":";;;;AAOA,MAAa,YAAY;;;;;CAKxB,YAAY,WAA6B;EAExC,IAAI,MAAM,QAAQ,SAAS,GAAG,OAAO,UAAU,SAAS,UAAU,KAAK,KAAK,IAAI;EAChF,OAAO;CACR;;;;;;CAMA,yBAAyB,KAAiB,MAAuB;EAChE,IAAI,QAAiB;EACrB,KAAK,MAAM,QAAQ,KAAK,MAAM,GAAG,GAAG;GACnC,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO,KAAA;GACxD,QAAS,MAAkC;EAC5C;EACA,OAAO;CACR;;;;;CAKA,WAAW,MAAsB;EAChC,MAAM,UAAU,KAAK,MAAM,GAAG;EAC9B,IAAI,QAAQ,WAAW,GAAG,OAAO;EACjC,OAAO,QAAQ,GAAG,EAAE,KAAK;CAC1B;;;;;;;;CAQA,WAAW,WAAoB,UAAkC,YAA+C,MAAuB;EACtI,MAAM,QAAQ,YAAY,SAAS;EACnC,MAAM,QAAQ,YAAY,SAAS;EACnC,MAAM,aAAa,SAAS,MAAM,SAAS,KAAK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,IAAI,QAAQ;GAEtC,IAAI,IAAI,QAAQ,OAAO,IAAI,SAAS,UACnC,UAAU,IAAI;GAIf,IAAI,IAAI,QAAQ,WAAW,SAAS,KAAK,WAAW,IAAI,MAAM,SAAS,OAAO;EAC/E,CAAC;EACD,OAAO,QAAQ,QAAQ,SAAS,CAAC,KAAK,WAAW,MAAM;CACxD;AACD"}
@@ -66,7 +66,7 @@ export declare const faTreeProps: {
66
66
  /** @description 树形数据 */
67
67
  data: {
68
68
  type: import("vue").PropType<ElTreeOutput<import("./tree.type").ElTreeValue, any>[]>;
69
- default: () => ElTreeOutput[];
69
+ default: () => never[];
70
70
  };
71
71
  /** @description 请求api */
72
72
  requestApi: {
@@ -152,7 +152,7 @@ export declare const faTreeEmits: {
152
152
  /** @description v-model:label 回调 */
153
153
  "update:label": (value: string) => boolean;
154
154
  /** @description 数据改变 */
155
- dataChangeCallBack: (data: ElTreeOutput[]) => boolean;
155
+ dataChange: (data: ElTreeOutput[]) => boolean;
156
156
  /** @description 选中数据改变 */
157
157
  change: (_data: ElTreeOutput, _node: TreeNode, _instance: ComponentInternalInstance, _event: MouseEvent) => boolean;
158
158
  /** @description 节点点击 */
@@ -247,7 +247,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
247
247
  /** @description 树形数据 */
248
248
  data: {
249
249
  type: import("vue").PropType<ElTreeOutput<import("./tree.type").ElTreeValue, any>[]>;
250
- default: () => ElTreeOutput[];
250
+ default: () => never[];
251
251
  };
252
252
  /** @description 请求api */
253
253
  requestApi: {
@@ -376,7 +376,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
376
376
  /** @description v-model:label 回调 */
377
377
  "update:label": (value: string) => boolean;
378
378
  /** @description 数据改变 */
379
- dataChangeCallBack: (data: ElTreeOutput[]) => boolean;
379
+ dataChange: (data: ElTreeOutput[]) => boolean;
380
380
  /** @description 选中数据改变 */
381
381
  change: (_data: ElTreeOutput, _node: TreeNode, _instance: ComponentInternalInstance, _event: MouseEvent) => boolean;
382
382
  /** @description 节点点击 */
@@ -455,7 +455,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
455
455
  /** @description 树形数据 */
456
456
  data: {
457
457
  type: import("vue").PropType<ElTreeOutput<import("./tree.type").ElTreeValue, any>[]>;
458
- default: () => ElTreeOutput[];
458
+ default: () => never[];
459
459
  };
460
460
  /** @description 请求api */
461
461
  requestApi: {
@@ -538,7 +538,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
538
538
  "onUpdate:modelValue"?: ((value: string | number | boolean | object | null | undefined) => any) | undefined;
539
539
  "onCurrent-change"?: ((data: any, node: import("element-plus/es/components/tree/src/model/node.mjs").default | null) => any) | undefined;
540
540
  "onUpdate:label"?: ((value: string) => any) | undefined;
541
- onDataChangeCallBack?: ((data: ElTreeOutput<import("./tree.type").ElTreeValue, any>[]) => any) | undefined;
541
+ onDataChange?: ((data: ElTreeOutput<import("./tree.type").ElTreeValue, any>[]) => any) | undefined;
542
542
  "onNode-click"?: ((_data: ElTreeOutput<import("./tree.type").ElTreeValue, any>, _node: TreeNode, _instance: ComponentInternalInstance | null, _event: MouseEvent) => any) | undefined;
543
543
  "onCheck-change"?: ((data: any, checked: boolean, indeterminate: boolean) => any) | undefined;
544
544
  "onNode-contextmenu"?: ((evt: Event, data: any, node: import("element-plus/es/components/tree/src/model/node.mjs").default, nodeInstance: ComponentInternalInstance | null) => any) | undefined;
@@ -1,15 +1,14 @@
1
1
  import { addCssUnit } from "../../../utils/dom/index.mjs";
2
+ import { isEqual } from "../../../utils/object/index.mjs";
2
3
  import { useEmits } from "../../../utils/vue/emits.mjs";
3
4
  import { useExpose } from "../../../utils/vue/expose.mjs";
4
5
  import { definePropType, useProps } from "../../../utils/vue/props.mjs";
5
6
  import { useRender } from "../../../utils/vue/render.mjs";
6
7
  import { makeSlots } from "../../../utils/vue/slots.mjs";
7
8
  import { withDefineType } from "../../../utils/vue/with.mjs";
8
- import { computed, createTextVNode, createVNode, defineComponent, mergeProps, nextTick, onMounted, reactive, ref, resolveDirective, watch, withDirectives } from "vue";
9
+ import { computed, createTextVNode, createVNode, defineComponent, mergeProps, nextTick, onMounted, reactive, resolveDirective, shallowRef, useModel, watch, withDirectives } from "vue";
9
10
  import { Expand, Fold } from "@element-plus/icons-vue";
10
11
  import { ElIcon, ElInput, ElScrollbar, ElTree, treeEmits, treeProps, useGlobalSize } from "element-plus";
11
- import { isArray, isBoolean, isEqual, isNull, isNumber, isObject, isString, isUndefined } from "lodash-unified";
12
- import { useVModel } from "@vueuse/core";
13
12
  //#region src/components/tree/src/tree.tsx
14
13
  /** FaTree 的运行时 Props 定义。 */
15
14
  const faTreeProps = {
@@ -98,11 +97,11 @@ const faTreeProps = {
98
97
  const faTreeEmits = {
99
98
  ...treeEmits,
100
99
  /** @description v-model 回调 */
101
- "update:modelValue": (value) => isString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isNull(value) || isUndefined(value),
100
+ "update:modelValue": (value) => typeof value === "string" || typeof value === "number" || typeof value === "boolean" || typeof value === "object" && value !== null || value == null,
102
101
  /** @description v-model:label 回调 */
103
- "update:label": (value) => isString(value) || isNull(value),
102
+ "update:label": (value) => typeof value === "string" || value === null,
104
103
  /** @description 数据改变 */
105
- dataChangeCallBack: (data) => isArray(data),
104
+ dataChange: (data) => Array.isArray(data),
106
105
  /** @description 选中数据改变 */
107
106
  change: (_data, _node, _instance, _event) => true,
108
107
  /** @description 节点点击 */
@@ -114,31 +113,31 @@ var tree_default = defineComponent({
114
113
  emits: faTreeEmits,
115
114
  slots: makeSlots(),
116
115
  setup(props, { slots, emit, expose }) {
117
- const selectedLabel = useVModel(props, "label", emit, { passive: true });
118
- const _globalSize = useGlobalSize();
116
+ const selectedLabel = useModel(props, "label");
117
+ const globalSize = useGlobalSize();
118
+ const treeRef = shallowRef(null);
119
119
  const state = reactive({
120
- value: withDefineType(props.modelValue),
120
+ value: withDefineType(),
121
121
  loading: false,
122
122
  searchValue: withDefineType(),
123
- orgTreeData: withDefineType([]),
123
+ originalTreeData: withDefineType([]),
124
124
  treeData: withDefineType([]),
125
- hamburger: props.hamburger || false,
125
+ hamburger: false,
126
126
  width: computed(() => {
127
127
  if (state.hamburger) return "130px";
128
128
  else {
129
129
  const width = addCssUnit(props.width);
130
- if (_globalSize.value === "small") return `calc(${width} * 0.9)`;
130
+ if (globalSize.value === "small") return `calc(${width} * 0.9)`;
131
131
  else return width;
132
132
  }
133
133
  })
134
134
  });
135
+ let requestVersion = 0;
135
136
  /** @description 只有一层节点 */
136
137
  const fold = computed(() => {
137
138
  const childrenKey = props.props.children ?? "children";
138
- return state.orgTreeData.every((item) => !Array.isArray(item[childrenKey]) || item[childrenKey].length === 0);
139
+ return state.originalTreeData.every((item) => !Array.isArray(item[childrenKey]) || item[childrenKey].length === 0);
139
140
  });
140
- const treeRef = ref();
141
- let requestVersion = 0;
142
141
  const loadData = async () => {
143
142
  const currentRequestVersion = ++requestVersion;
144
143
  let curSelectedData;
@@ -169,17 +168,17 @@ var tree_default = defineComponent({
169
168
  value: null,
170
169
  all: true
171
170
  });
172
- state.orgTreeData = treeData;
171
+ state.originalTreeData = treeData;
173
172
  state.treeData = treeData;
174
- emit("dataChangeCallBack", state.treeData);
173
+ emit("dataChange", state.treeData);
175
174
  const selectedKey = curSelectedData ?? props.modelValue ?? props.defaultSelection;
176
175
  if (props.nodeKey && (typeof selectedKey === "string" || typeof selectedKey === "number")) nextTick(() => {
177
176
  treeRef.value?.setCurrentKey(selectedKey);
178
177
  });
179
178
  };
180
179
  const handleHamburgerClick = () => {
181
- if (state.hamburger) state.treeData = state.orgTreeData;
182
- else state.treeData = state.orgTreeData.map((item) => ({
180
+ if (state.hamburger) state.treeData = state.originalTreeData;
181
+ else state.treeData = state.originalTreeData.map((item) => ({
183
182
  ...item,
184
183
  [props.props.children ?? "children"]: []
185
184
  }));
@@ -217,15 +216,18 @@ var tree_default = defineComponent({
217
216
  }
218
217
  emit("node-click", data, node, instance, event);
219
218
  };
220
- onMounted(async () => {
221
- await loadData();
222
- watch(() => props.data, () => {
223
- if (!props.requestApi) return loadData();
224
- }, { deep: true });
225
- });
226
219
  watch(() => props.modelValue, (newValue) => {
227
220
  state.value = newValue;
228
221
  if (typeof newValue === "string" || typeof newValue === "number") treeRef.value?.setCurrentKey(newValue);
222
+ }, { immediate: true });
223
+ watch(() => props.hamburger, (newValue) => {
224
+ state.hamburger = newValue;
225
+ }, { immediate: true });
226
+ watch(() => props.data, () => {
227
+ if (!props.requestApi) return loadData();
228
+ }, { deep: true });
229
+ onMounted(async () => {
230
+ await loadData();
229
231
  });
230
232
  const elTreeProps = useProps(props, treeProps, [
231
233
  "data",
@@ -236,7 +238,7 @@ var tree_default = defineComponent({
236
238
  useRender(() => withDirectives(createVNode("div", {
237
239
  "class": [
238
240
  "el-card fa-tree",
239
- `fa-tree-${_globalSize.value}`,
241
+ `fa-tree-${globalSize.value}`,
240
242
  { "fa-tree__fold": state.hamburger || fold.value }
241
243
  ],
242
244
  "style": { width: state.width }
@@ -1 +1 @@
1
- {"version":3,"file":"tree.mjs","names":["update:modelValue","update:label","node-click"],"sources":["../../../../src/components/tree/src/tree.tsx"],"sourcesContent":["import { useVModel } from \"@vueuse/core\";\nimport { computed, defineComponent, nextTick, onMounted, reactive, ref, watch } from \"vue\";\nimport { Expand, Fold } from \"@element-plus/icons-vue\";\nimport { ElIcon, ElInput, ElScrollbar, ElTree, treeEmits, treeProps, useGlobalSize } from \"element-plus\";\nimport { isArray, isBoolean, isEqual, isNull, isNumber, isObject, isString, isUndefined } from \"lodash-unified\";\nimport { addCssUnit, definePropType, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport type { FilterValue, TreeNodeData } from \"element-plus\";\nimport type { ComponentInternalInstance, VNode } from \"vue\";\nimport type { PagedInput } from \"../../table\";\nimport type { FilterNodeMethodFunction, TreeNode } from \"./tree.props\";\nimport type { ElTreeOutput } from \"./tree.type\";\n\n/** FaTree 的运行时 Props 定义。 */\nexport const faTreeProps = {\n\t...treeProps,\n\t/** 树节点筛选方法。 */\n\tfilterNodeMethod: {\n\t\ttype: definePropType<FilterNodeMethodFunction>(Function),\n\t},\n\t/** @description whether Select is disabled 重载使其支持 ElForm*/\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: undefined,\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 点击折叠节点,需要开启 'expandOnClickNode' */\n\tcollapseOnClickNode: Boolean,\n\t/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<string | number | boolean | object | null>([String, Number, Boolean, Object]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: String,\n\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: 180,\n\t},\n\t/** @description 默认选择 */\n\tdefaultSelection: [String, Number],\n\t/** @description 标题 */\n\ttitle: String,\n\t/** @description 折叠 */\n\thamburger: Boolean,\n\t/** @description 隐藏全部 */\n\thideAll: Boolean,\n\t/** @description 隐藏过滤 */\n\thideFilter: Boolean,\n\t/** @description 全部值 */\n\tallValue: {\n\t\ttype: definePropType<string | number | boolean | object | null>([String, Number, Boolean, Object]),\n\t\tdefault: undefined,\n\t},\n\t/** @description 树形数据 */\n\tdata: {\n\t\ttype: definePropType<ElTreeOutput[]>(Array),\n\t\tdefault: (): ElTreeOutput[] => [],\n\t},\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: string | number | PagedInput) => Promise<ElTreeOutput[]>>(Function),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | PagedInput | null>([String, Number, Object]),\n};\n\n/** FaTree 的运行时 Emits 定义。 */\nexport const faTreeEmits = {\n\t...treeEmits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string | number | boolean | object | null | undefined): boolean =>\n\t\tisString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isNull(value) || isUndefined(value),\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string): boolean => isString(value) || isNull(value),\n\t/** @description 数据改变 */\n\tdataChangeCallBack: (data: ElTreeOutput[]): boolean => isArray(data),\n\t/** @description 选中数据改变 */\n\tchange: (_data: ElTreeOutput, _node: TreeNode, _instance: ComponentInternalInstance, _event: MouseEvent): boolean => true,\n\t/** @description 节点点击 */\n\t\"node-click\": (_data: ElTreeOutput, _node: TreeNode, _instance: ComponentInternalInstance | null, _event: MouseEvent): boolean => true,\n};\n\n/** FaTree 的插槽参数。 */\nexport interface FaTreeSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: { node: TreeNode; data: ElTreeOutput };\n\t/** @description 当数据为空时自定义的内容 */\n\tempty: never;\n\t/** @description 显示内容插槽 */\n\tlabel: { node: TreeNode; data: ElTreeOutput };\n}\n\nexport default defineComponent({\n\tname: \"FaTree\",\n\tprops: faTreeProps,\n\temits: faTreeEmits,\n\tslots: makeSlots<FaTreeSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst selectedLabel = useVModel(props, \"label\", emit, { passive: true });\n\t\tconst _globalSize = useGlobalSize();\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<string | number | boolean | object | null | undefined>(props.modelValue),\n\t\t\tloading: false,\n\t\t\tsearchValue: withDefineType<string>(),\n\t\t\torgTreeData: withDefineType<ElTreeOutput[]>([]),\n\t\t\ttreeData: withDefineType<ElTreeOutput[]>([]),\n\t\t\thamburger: props.hamburger || false,\n\t\t\twidth: computed(() => {\n\t\t\t\tif (state.hamburger) {\n\t\t\t\t\treturn \"130px\";\n\t\t\t\t} else {\n\t\t\t\t\tconst width = addCssUnit(props.width);\n\t\t\t\t\tif (_globalSize.value === \"small\") {\n\t\t\t\t\t\treturn `calc(${width} * 0.9)`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn width;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}),\n\t\t});\n\n\t\t/** @description 只有一层节点 */\n\t\tconst fold = computed<boolean>(() => {\n\t\t\tconst childrenKey = props.props.children ?? \"children\";\n\t\t\treturn state.orgTreeData.every((item) => !Array.isArray(item[childrenKey]) || item[childrenKey].length === 0);\n\t\t});\n\n\t\tconst treeRef = ref<InstanceType<typeof ElTree>>();\n\t\tlet requestVersion = 0;\n\n\t\tconst loadData = async (): Promise<void> => {\n\t\t\tconst currentRequestVersion = ++requestVersion;\n\t\t\tlet curSelectedData: string | number | undefined;\n\t\t\tif (props.nodeKey) {\n\t\t\t\t// 记录原本选中的值\n\t\t\t\tconst currentKey = treeRef.value?.getCurrentKey();\n\t\t\t\tif (typeof currentKey === \"string\" || typeof currentKey === \"number\") curSelectedData = currentKey;\n\t\t\t}\n\t\t\tlet treeData: ElTreeOutput[];\n\t\t\t// 判断是否需要自动请求\n\t\t\tif (props.requestApi) {\n\t\t\t\tstate.loading = true;\n\t\t\t\tconst params = {\n\t\t\t\t\t...(typeof props.initParam === \"object\" && props.initParam !== null ? props.initParam : {}),\n\t\t\t\t\tsearchValue: state.searchValue,\n\t\t\t\t};\n\t\t\t\ttry {\n\t\t\t\t\tconst responseData = await props.requestApi(params);\n\t\t\t\t\ttreeData = responseData.map((item) => ({ ...item }));\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\tthrow error;\n\t\t\t\t} finally {\n\t\t\t\t\tif (currentRequestVersion === requestVersion) state.loading = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttreeData = props.data.map((item) => ({ ...item }));\n\t\t\t}\n\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\tif (!props.hideAll) {\n\t\t\t\ttreeData.unshift({ [props.nodeKey]: props.allValue, label: \"全部\", value: null, all: true });\n\t\t\t}\n\t\t\tstate.orgTreeData = treeData;\n\t\t\tstate.treeData = treeData;\n\t\t\temit(\"dataChangeCallBack\", state.treeData);\n\t\t\tconst selectedKey = curSelectedData ?? props.modelValue ?? props.defaultSelection;\n\t\t\tif (props.nodeKey && (typeof selectedKey === \"string\" || typeof selectedKey === \"number\")) {\n\t\t\t\tnextTick(() => {\n\t\t\t\t\t// 设置原本选中的值\n\t\t\t\t\ttreeRef.value?.setCurrentKey(selectedKey);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tconst handleHamburgerClick = (): void => {\n\t\t\tif (state.hamburger) {\n\t\t\t\tstate.treeData = state.orgTreeData;\n\t\t\t} else {\n\t\t\t\t// 折叠只显示一级数据\n\t\t\t\tstate.treeData = state.orgTreeData.map((item) => ({ ...item, [props.props.children ?? \"children\"]: [] }));\n\t\t\t}\n\t\t\tstate.hamburger = !state.hamburger;\n\t\t};\n\n\t\tconst handleFilterNode = (value: FilterValue, data: TreeNodeData, child: TreeNode): boolean => {\n\t\t\tif (!value) return true;\n\t\t\tconst isAll: unknown = data[\"all\"];\n\t\t\tconst dataLabel: unknown = data[\"label\"];\n\t\t\tlet parentNode = child.parent,\n\t\t\t\tlabels: unknown[] = isAll ? [dataLabel] : [child.label],\n\t\t\t\tlevel = 1;\n\t\t\twhile (level < child.level && parentNode) {\n\t\t\t\tlabels = [...labels, parentNode.label];\n\t\t\t\tparentNode = parentNode.parent;\n\t\t\t\tlevel++;\n\t\t\t}\n\t\t\tconst filterText = typeof value === \"string\" || typeof value === \"number\" ? String(value) : \"\";\n\t\t\tconst result = labels.some((label) =>\n\t\t\t\ttypeof label === \"string\" || typeof label === \"number\" ? String(label).includes(filterText) : false\n\t\t\t);\n\t\t\tif (props.filterNodeMethod) {\n\t\t\t\treturn result && props.filterNodeMethod(value, data, child);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\n\t\tconst handleNodeClick = (data: ElTreeOutput, node: TreeNode, instance: ComponentInternalInstance | null, event: MouseEvent): void => {\n\t\t\tif (!instance) return;\n\t\t\t// 判断是否开启点击展开节点,并且节点是折叠状态,则自动展开,否则需要点击箭头图标才能折叠或开启 'collapseOnClickNode'\n\t\t\tif (props.expandOnClickNode) {\n\t\t\t\tif (!node.expanded) {\n\t\t\t\t\tnode.expand();\n\t\t\t\t} else if (props.collapseOnClickNode) {\n\t\t\t\t\tnode.collapse();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (data[\"all\"] || (node.key !== undefined && node.key !== null)) {\n\t\t\t\tconst value = data[\"all\"] ? props.allValue : node.key;\n\t\t\t\tif (!isEqual(state.value, value)) {\n\t\t\t\t\tstate.value = value;\n\t\t\t\t\tselectedLabel.value = node.label;\n\t\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\t\temit(\"change\", data, node, instance, event);\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\tonMounted(async () => {\n\t\t\tawait loadData();\n\t\t\twatch(\n\t\t\t\t() => props.data,\n\t\t\t\t() => {\n\t\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\t\treturn loadData();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ deep: true }\n\t\t\t);\n\t\t});\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t(newValue) => {\n\t\t\t\tstate.value = newValue;\n\t\t\t\tif (typeof newValue === \"string\" || typeof newValue === \"number\") treeRef.value?.setCurrentKey(newValue);\n\t\t\t}\n\t\t);\n\n\t\tconst elTreeProps = useProps(props, treeProps, [\"data\", \"expandOnClickNode\", \"filterNodeMethod\"]);\n\t\tconst elTreeEmits = useEmits(treeEmits, emit, [\"node-click\"]);\n\n\t\tuseRender(() => (\n\t\t\t<div\n\t\t\t\tclass={[\"el-card fa-tree\", `fa-tree-${_globalSize.value}`, { \"fa-tree__fold\": state.hamburger || fold.value }]}\n\t\t\t\tstyle={{ width: state.width }}\n\t\t\t\tvLoading={state.loading}\n\t\t\t>\n\t\t\t\t{(props.title !== undefined || props.hamburger) && (\n\t\t\t\t\t<div class=\"fa-tree__title\">\n\t\t\t\t\t\t{props.title && <h4>{props.title}</h4>}\n\t\t\t\t\t\t{props.hamburger &&\n\t\t\t\t\t\t\t(state.hamburger ? (\n\t\t\t\t\t\t\t\t<ElIcon onClick={handleHamburgerClick} title=\"展开\">\n\t\t\t\t\t\t\t\t\t<Expand />\n\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<ElIcon onClick={handleHamburgerClick} title=\"折叠\">\n\t\t\t\t\t\t\t\t\t<Fold />\n\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{!props.hideFilter && (\n\t\t\t\t\t<ElInput\n\t\t\t\t\t\tclass=\"fa-tree__search-input\"\n\t\t\t\t\t\tvModel_trim={state.searchValue}\n\t\t\t\t\t\tplaceholder={state.hamburger ? \"关键字过滤\" : \"输入关键字进行过滤\"}\n\t\t\t\t\t\tclearable={Boolean(state.searchValue)}\n\t\t\t\t\t\tonInput={(value) => treeRef.value?.filter(value)}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<ElScrollbar class=\"fa-tree__scrollbar\">\n\t\t\t\t\t<ElTree\n\t\t\t\t\t\t{...elTreeProps.value}\n\t\t\t\t\t\t{...elTreeEmits.value}\n\t\t\t\t\t\tref={treeRef}\n\t\t\t\t\t\tdata={state.treeData}\n\t\t\t\t\t\texpandOnClickNode={props.checkOnClickNode ? false : props.expandOnClickNode}\n\t\t\t\t\t\tfilterNodeMethod={handleFilterNode}\n\t\t\t\t\t\tonNode-click={handleNodeClick}\n\t\t\t\t\t>\n\t\t\t\t\t\t{{\n\t\t\t\t\t\t\tdefault: ({ node, data }: { node: TreeNode; data: ElTreeOutput }) => (\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclass=\"el-tree-node__label\"\n\t\t\t\t\t\t\t\t\ttitle={data[\"all\"] ? data.label : node.label}\n\t\t\t\t\t\t\t\t\tstyle={{ paddingLeft: fold.value ? \"3px\" : \"\" }}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div>{data[\"all\"] ? data.label : slots.label ? slots.label({ node, data }) : node.label}</div>\n\t\t\t\t\t\t\t\t\t{node.key && data.showQuantity ? <span>[{data.quantity}]</span> : null}\n\t\t\t\t\t\t\t\t\t{!data[\"all\"] && slots.default && <span>{slots.default({ node, data })}</span>}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t...(slots.empty && { empty: (): VNode[] => slots.empty?.() ?? [] }),\n\t\t\t\t\t\t}}\n\t\t\t\t\t</ElTree>\n\t\t\t\t</ElScrollbar>\n\t\t\t</div>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 过滤所有树节点,过滤后的节点将被隐藏 */\n\t\t\tfilter: computed(() => treeRef.value?.filter),\n\t\t\t/** @description 获取节点的唯一标识。 */\n\t\t\tgetNodeKey: computed(() => treeRef.value?.getNodeKey),\n\t\t\t/** @description 获取指定节点的路径数据。 */\n\t\t\tgetNodePath: computed(() => treeRef.value?.getNodePath),\n\t\t\t/** @description 为节点设置新数据,只有当设置 node-key 属性的时候才可用 */\n\t\t\tupdateKeyChildren: computed(() => treeRef.value?.updateKeyChildren),\n\t\t\t/** @description 如果节点可以被选中,(show-checkbox 为 true), 本方法将返回当前选中节点的数组 */\n\t\t\tgetCheckedNodes: computed(() => treeRef.value?.getCheckedNodes),\n\t\t\t/** @description 设置目前勾选的节点,使用此方法必须提前设置 node-key 属性 */\n\t\t\tsetCheckedNodes: computed(() => treeRef.value?.setCheckedNodes),\n\t\t\t/** @description \t若节点可用被选中 (show-checkbox 为 true), 它将返回当前选中节点 key 的数组 */\n\t\t\tgetCheckedKeys: computed(() => treeRef.value?.getCheckedKeys),\n\t\t\t/** @description 设置目前选中的节点,使用此方法必须设置 node-key 属性 */\n\t\t\tsetCheckedKeys: computed(() => treeRef.value?.setCheckedKeys),\n\t\t\t/** @description 设置节点是否被选中, 使用此方法必须设置 node-key 属性 */\n\t\t\tsetChecked: computed(() => treeRef.value?.setChecked),\n\t\t\t/** @description 如果节点可用被选中 (show-checkbox 为 true), 它将返回当前半选中的节点组成的数组 */\n\t\t\tgetHalfCheckedNodes: computed(() => treeRef.value?.getHalfCheckedNodes),\n\t\t\t/** @description 若节点可被选中(show-checkbox 为 true),则返回目前半选中的节点的 key 所组成的数组 */\n\t\t\tgetHalfCheckedKeys: computed(() => treeRef.value?.getHalfCheckedKeys),\n\t\t\t/** @description 返回当前被选中节点的数据 (如果没有则返回 null) */\n\t\t\tgetCurrentKey: computed(() => treeRef.value?.getCurrentKey),\n\t\t\t/** @description 返回当前被选中节点的数据 (如果没有则返回 null) */\n\t\t\tgetCurrentNode: computed(() => treeRef.value?.getCurrentNode),\n\t\t\t/** @description 通过 key 设置某个节点的当前选中状态,使用此方法必须设置 node-key 属性 */\n\t\t\tsetCurrentKey: computed(() => treeRef.value?.setCurrentKey),\n\t\t\t/** @description 设置节点为选中状态,使用此方法必须设置 node-key 属性 */\n\t\t\tsetCurrentNode: computed(() => treeRef.value?.setCurrentNode),\n\t\t\t/** @description 根据 data 或者 key 拿到 Tree 组件中的 node */\n\t\t\tgetNode: computed(() => treeRef.value?.getNode),\n\t\t\t/** @description 删除 Tree 中的一个节点,使用此方法必须设置 node-key 属性 */\n\t\t\tremove: computed(() => treeRef.value?.remove),\n\t\t\t/** @description 为 Tree 中的一个节点追加一个子节点 */\n\t\t\tappend: computed(() => treeRef.value?.append),\n\t\t\t/** @description 在 Tree 中给定节点前插入一个节点 */\n\t\t\tinsertBefore: computed(() => treeRef.value?.insertBefore),\n\t\t\t/** @description 在 Tree 中给定节点后插入一个节点 */\n\t\t\tinsertAfter: computed(() => treeRef.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});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;AAaA,MAAa,cAAc;CAC1B,GAAG;;CAEH,kBAAkB,EACjB,MAAM,eAAyC,QAAQ,EACxD;;CAEA,UAAU;EACT,MAAM;EACN,SAAS,KAAA;CACV;;CAEA,SAAS;EACR,MAAM;EACN,SAAS;CACV;;CAEA,kBAAkB;EACjB,MAAM;EACN,SAAS;CACV;;CAEA,kBAAkB;EACjB,MAAM;EACN,SAAS;CACV;;CAEA,kBAAkB;EACjB,MAAM;EACN,SAAS;CACV;;CAEA,qBAAqB;;CAErB,YAAY;EACX,MAAM,eAA0D;GAAC;GAAQ;GAAQ;GAAS;EAAM,CAAC;EACjG,SAAS,KAAA;CACV;;CAEA,OAAO;;CAEP,OAAO;EACN,MAAM,CAAC,QAAQ,MAAM;EACrB,SAAS;CACV;;CAEA,kBAAkB,CAAC,QAAQ,MAAM;;CAEjC,OAAO;;CAEP,WAAW;;CAEX,SAAS;;CAET,YAAY;;CAEZ,UAAU;EACT,MAAM,eAA0D;GAAC;GAAQ;GAAQ;GAAS;EAAM,CAAC;EACjG,SAAS,KAAA;CACV;;CAEA,MAAM;EACL,MAAM,eAA+B,KAAK;EAC1C,eAA+B,CAAA;CAChC;;CAEA,YAAY,EACX,MAAM,eAAmF,QAAQ,EAClG;;CAEA,WAAW,eAAoD;EAAC;EAAQ;EAAQ;CAAM,CAAC;AACxF;;AAGA,MAAa,cAAc;CAC1B,GAAG;;CAEH,sBAAsB,UACrB,SAAS,KAAK,KAAK,SAAS,KAAK,KAAK,UAAU,KAAK,KAAK,SAAS,KAAK,KAAK,OAAO,KAAK,KA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AE5D,SAAS,eAAe,QAAQ,OAAO,OAAO;;GAE9C,QAAQ,eAAe,QAAQ,OAAO,MAAM;;GAE5C,QAAQ,eAAe,QAAQ,OAAO,MAAM;;GAE5C,cAAc,eAAe,QAAQ,OAAO,YAAY;;GAExD,aAAa,eAAe,QAAQ,OAAO,WAAW;;GAEtD,SAAS,eAAe,MAAM,OAAO;;GAErC,SAAS;EACV,CAAC;CACF;AACD,CAAC"}
1
+ {"version":3,"file":"tree.mjs","names":["update:modelValue","update:label","node-click"],"sources":["../../../../src/components/tree/src/tree.tsx"],"sourcesContent":["import { computed, defineComponent, nextTick, onMounted, reactive, shallowRef, useModel, watch } from \"vue\";\nimport { Expand, Fold } from \"@element-plus/icons-vue\";\nimport { ElIcon, ElInput, ElScrollbar, ElTree, treeEmits, treeProps, useGlobalSize } from \"element-plus\";\nimport { addCssUnit, definePropType, isEqual, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport type { FilterValue, TreeNodeData } from \"element-plus\";\nimport type { ComponentInternalInstance } from \"vue\";\nimport type { PagedInput } from \"../../table\";\nimport type { FilterNodeMethodFunction, TreeNode } from \"./tree.props\";\nimport type { ElTreeOutput } from \"./tree.type\";\n\n/** FaTree 的运行时 Props 定义。 */\nexport const faTreeProps = {\n\t...treeProps,\n\t/** 树节点筛选方法。 */\n\tfilterNodeMethod: {\n\t\ttype: definePropType<FilterNodeMethodFunction>(Function),\n\t},\n\t/** @description whether Select is disabled 重载使其支持 ElForm*/\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: undefined,\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 点击折叠节点,需要开启 'expandOnClickNode' */\n\tcollapseOnClickNode: Boolean,\n\t/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<string | number | boolean | object | null>([String, Number, Boolean, Object]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: String,\n\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: 180,\n\t},\n\t/** @description 默认选择 */\n\tdefaultSelection: [String, Number],\n\t/** @description 标题 */\n\ttitle: String,\n\t/** @description 折叠 */\n\thamburger: Boolean,\n\t/** @description 隐藏全部 */\n\thideAll: Boolean,\n\t/** @description 隐藏过滤 */\n\thideFilter: Boolean,\n\t/** @description 全部值 */\n\tallValue: {\n\t\ttype: definePropType<string | number | boolean | object | null>([String, Number, Boolean, Object]),\n\t\tdefault: undefined,\n\t},\n\t/** @description 树形数据 */\n\tdata: {\n\t\ttype: definePropType<ElTreeOutput[]>(Array),\n\t\tdefault: () => [],\n\t},\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: string | number | PagedInput) => Promise<ElTreeOutput[]>>(Function),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | PagedInput | null>([String, Number, Object]),\n};\n\n/** FaTree 的运行时 Emits 定义。 */\nexport const faTreeEmits = {\n\t...treeEmits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string | number | boolean | object | null | undefined) =>\n\t\ttypeof value === \"string\" ||\n\t\ttypeof value === \"number\" ||\n\t\ttypeof value === \"boolean\" ||\n\t\t(typeof value === \"object\" && value !== null) ||\n\t\tvalue == null,\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string) => typeof value === \"string\" || value === null,\n\t/** @description 数据改变 */\n\tdataChange: (data: ElTreeOutput[]) => Array.isArray(data),\n\t/** @description 选中数据改变 */\n\tchange: (_data: ElTreeOutput, _node: TreeNode, _instance: ComponentInternalInstance, _event: MouseEvent) => true,\n\t/** @description 节点点击 */\n\t\"node-click\": (_data: ElTreeOutput, _node: TreeNode, _instance: ComponentInternalInstance | null, _event: MouseEvent) => true,\n};\n\n/** FaTree 的插槽参数。 */\nexport interface FaTreeSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: { node: TreeNode; data: ElTreeOutput };\n\t/** @description 当数据为空时自定义的内容 */\n\tempty: never;\n\t/** @description 显示内容插槽 */\n\tlabel: { node: TreeNode; data: ElTreeOutput };\n}\n\nexport default defineComponent({\n\tname: \"FaTree\",\n\tprops: faTreeProps,\n\temits: faTreeEmits,\n\tslots: makeSlots<FaTreeSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst selectedLabel = useModel(props, \"label\");\n\n\t\tconst globalSize = useGlobalSize();\n\t\tconst treeRef = shallowRef<InstanceType<typeof ElTree> | null>(null);\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<string | number | boolean | object | null | undefined>(),\n\t\t\tloading: false,\n\t\t\tsearchValue: withDefineType<string>(),\n\t\t\toriginalTreeData: withDefineType<ElTreeOutput[]>([]),\n\t\t\ttreeData: withDefineType<ElTreeOutput[]>([]),\n\t\t\thamburger: false,\n\t\t\twidth: computed(() => {\n\t\t\t\tif (state.hamburger) {\n\t\t\t\t\treturn \"130px\";\n\t\t\t\t} else {\n\t\t\t\t\tconst width = addCssUnit(props.width);\n\t\t\t\t\tif (globalSize.value === \"small\") {\n\t\t\t\t\t\treturn `calc(${width} * 0.9)`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn width;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}),\n\t\t});\n\t\tlet requestVersion = 0;\n\n\t\t/** @description 只有一层节点 */\n\t\tconst fold = computed<boolean>(() => {\n\t\t\tconst childrenKey = props.props.children ?? \"children\";\n\t\t\treturn state.originalTreeData.every((item) => !Array.isArray(item[childrenKey]) || item[childrenKey].length === 0);\n\t\t});\n\n\t\tconst loadData = async () => {\n\t\t\tconst currentRequestVersion = ++requestVersion;\n\t\t\tlet curSelectedData: string | number | undefined;\n\t\t\tif (props.nodeKey) {\n\t\t\t\t// 记录原本选中的值\n\t\t\t\tconst currentKey = treeRef.value?.getCurrentKey();\n\t\t\t\tif (typeof currentKey === \"string\" || typeof currentKey === \"number\") curSelectedData = currentKey;\n\t\t\t}\n\t\t\tlet treeData: ElTreeOutput[];\n\t\t\t// 判断是否需要自动请求\n\t\t\tif (props.requestApi) {\n\t\t\t\tstate.loading = true;\n\t\t\t\tconst params = {\n\t\t\t\t\t...(typeof props.initParam === \"object\" && props.initParam !== null ? props.initParam : {}),\n\t\t\t\t\tsearchValue: state.searchValue,\n\t\t\t\t};\n\t\t\t\ttry {\n\t\t\t\t\tconst responseData = await props.requestApi(params);\n\t\t\t\t\ttreeData = responseData.map((item) => ({ ...item }));\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t\tthrow error;\n\t\t\t\t} finally {\n\t\t\t\t\tif (currentRequestVersion === requestVersion) state.loading = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttreeData = props.data.map((item) => ({ ...item }));\n\t\t\t}\n\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\tif (!props.hideAll) {\n\t\t\t\ttreeData.unshift({ [props.nodeKey]: props.allValue, label: \"全部\", value: null, all: true });\n\t\t\t}\n\t\t\tstate.originalTreeData = treeData;\n\t\t\tstate.treeData = treeData;\n\t\t\temit(\"dataChange\", state.treeData);\n\t\t\tconst selectedKey = curSelectedData ?? props.modelValue ?? props.defaultSelection;\n\t\t\tif (props.nodeKey && (typeof selectedKey === \"string\" || typeof selectedKey === \"number\")) {\n\t\t\t\tnextTick(() => {\n\t\t\t\t\t// 设置原本选中的值\n\t\t\t\t\ttreeRef.value?.setCurrentKey(selectedKey);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tconst handleHamburgerClick = () => {\n\t\t\tif (state.hamburger) {\n\t\t\t\tstate.treeData = state.originalTreeData;\n\t\t\t} else {\n\t\t\t\t// 折叠只显示一级数据\n\t\t\t\tstate.treeData = state.originalTreeData.map((item) => ({ ...item, [props.props.children ?? \"children\"]: [] }));\n\t\t\t}\n\t\t\tstate.hamburger = !state.hamburger;\n\t\t};\n\n\t\tconst handleFilterNode = (value: FilterValue, data: TreeNodeData, child: TreeNode) => {\n\t\t\tif (!value) return true;\n\t\t\tconst isAll: unknown = data[\"all\"];\n\t\t\tconst dataLabel: unknown = data[\"label\"];\n\t\t\tlet parentNode = child.parent,\n\t\t\t\tlabels: unknown[] = isAll ? [dataLabel] : [child.label],\n\t\t\t\tlevel = 1;\n\t\t\twhile (level < child.level && parentNode) {\n\t\t\t\tlabels = [...labels, parentNode.label];\n\t\t\t\tparentNode = parentNode.parent;\n\t\t\t\tlevel++;\n\t\t\t}\n\t\t\tconst filterText = typeof value === \"string\" || typeof value === \"number\" ? String(value) : \"\";\n\t\t\tconst result = labels.some((label) =>\n\t\t\t\ttypeof label === \"string\" || typeof label === \"number\" ? String(label).includes(filterText) : false\n\t\t\t);\n\t\t\tif (props.filterNodeMethod) {\n\t\t\t\treturn result && props.filterNodeMethod(value, data, child);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\n\t\tconst handleNodeClick = (data: ElTreeOutput, node: TreeNode, instance: ComponentInternalInstance | null, event: MouseEvent) => {\n\t\t\tif (!instance) return;\n\t\t\t// 判断是否开启点击展开节点,并且节点是折叠状态,则自动展开,否则需要点击箭头图标才能折叠或开启 'collapseOnClickNode'\n\t\t\tif (props.expandOnClickNode) {\n\t\t\t\tif (!node.expanded) {\n\t\t\t\t\tnode.expand();\n\t\t\t\t} else if (props.collapseOnClickNode) {\n\t\t\t\t\tnode.collapse();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (data[\"all\"] || (node.key !== undefined && node.key !== null)) {\n\t\t\t\tconst value = data[\"all\"] ? props.allValue : node.key;\n\t\t\t\tif (!isEqual(state.value, value)) {\n\t\t\t\t\tstate.value = value;\n\t\t\t\t\tselectedLabel.value = node.label;\n\t\t\t\t\temit(\"update:modelValue\", value);\n\t\t\t\t\temit(\"change\", data, node, instance, event);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// eslint-disable-next-line vue/custom-event-name-casing -- Element Plus 的公开事件名为 node-click,需要保持原始名称透传。\n\t\t\temit(\"node-click\", data, node, instance, event);\n\t\t};\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t(newValue) => {\n\t\t\t\tstate.value = newValue;\n\t\t\t\tif (typeof newValue === \"string\" || typeof newValue === \"number\") treeRef.value?.setCurrentKey(newValue);\n\t\t\t},\n\t\t\t{ immediate: true }\n\t\t);\n\n\t\twatch(\n\t\t\t() => props.hamburger,\n\t\t\t(newValue) => {\n\t\t\t\tstate.hamburger = newValue;\n\t\t\t},\n\t\t\t{ immediate: true }\n\t\t);\n\n\t\twatch(\n\t\t\t() => props.data,\n\t\t\t() => {\n\t\t\t\tif (!props.requestApi) {\n\t\t\t\t\treturn loadData();\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ deep: true }\n\t\t);\n\n\t\tonMounted(async () => {\n\t\t\tawait loadData();\n\t\t});\n\n\t\tconst elTreeProps = useProps(props, treeProps, [\"data\", \"expandOnClickNode\", \"filterNodeMethod\"]);\n\t\tconst elTreeEmits = useEmits(treeEmits, emit, [\"node-click\"]);\n\n\t\tuseRender(() => (\n\t\t\t<div\n\t\t\t\tclass={[\"el-card fa-tree\", `fa-tree-${globalSize.value}`, { \"fa-tree__fold\": state.hamburger || fold.value }]}\n\t\t\t\tstyle={{ width: state.width }}\n\t\t\t\tvLoading={state.loading}\n\t\t\t>\n\t\t\t\t{(props.title !== undefined || props.hamburger) && (\n\t\t\t\t\t<div class=\"fa-tree__title\">\n\t\t\t\t\t\t{props.title && <h4>{props.title}</h4>}\n\t\t\t\t\t\t{props.hamburger &&\n\t\t\t\t\t\t\t(state.hamburger ? (\n\t\t\t\t\t\t\t\t<ElIcon onClick={handleHamburgerClick} title=\"展开\">\n\t\t\t\t\t\t\t\t\t<Expand />\n\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<ElIcon onClick={handleHamburgerClick} title=\"折叠\">\n\t\t\t\t\t\t\t\t\t<Fold />\n\t\t\t\t\t\t\t\t</ElIcon>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{!props.hideFilter && (\n\t\t\t\t\t<ElInput\n\t\t\t\t\t\tclass=\"fa-tree__search-input\"\n\t\t\t\t\t\tvModel_trim={state.searchValue}\n\t\t\t\t\t\tplaceholder={state.hamburger ? \"关键字过滤\" : \"输入关键字进行过滤\"}\n\t\t\t\t\t\tclearable={Boolean(state.searchValue)}\n\t\t\t\t\t\tonInput={(value) => treeRef.value?.filter(value)}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<ElScrollbar class=\"fa-tree__scrollbar\">\n\t\t\t\t\t<ElTree\n\t\t\t\t\t\t{...elTreeProps.value}\n\t\t\t\t\t\t{...elTreeEmits.value}\n\t\t\t\t\t\tref={treeRef}\n\t\t\t\t\t\tdata={state.treeData}\n\t\t\t\t\t\texpandOnClickNode={props.checkOnClickNode ? false : props.expandOnClickNode}\n\t\t\t\t\t\tfilterNodeMethod={handleFilterNode}\n\t\t\t\t\t\tonNode-click={handleNodeClick}\n\t\t\t\t\t>\n\t\t\t\t\t\t{{\n\t\t\t\t\t\t\tdefault: ({ node, data }: { node: TreeNode; data: ElTreeOutput }) => (\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclass=\"el-tree-node__label\"\n\t\t\t\t\t\t\t\t\ttitle={data[\"all\"] ? data.label : node.label}\n\t\t\t\t\t\t\t\t\tstyle={{ paddingLeft: fold.value ? \"3px\" : \"\" }}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div>{data[\"all\"] ? data.label : slots.label ? slots.label({ node, data }) : node.label}</div>\n\t\t\t\t\t\t\t\t\t{node.key && data.showQuantity ? <span>[{data.quantity}]</span> : null}\n\t\t\t\t\t\t\t\t\t{!data[\"all\"] && slots.default && <span>{slots.default({ node, data })}</span>}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t...(slots.empty && { empty: () => slots.empty?.() ?? [] }),\n\t\t\t\t\t\t}}\n\t\t\t\t\t</ElTree>\n\t\t\t\t</ElScrollbar>\n\t\t\t</div>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 过滤所有树节点,过滤后的节点将被隐藏 */\n\t\t\tfilter: computed(() => treeRef.value?.filter),\n\t\t\t/** @description 获取节点的唯一标识。 */\n\t\t\tgetNodeKey: computed(() => treeRef.value?.getNodeKey),\n\t\t\t/** @description 获取指定节点的路径数据。 */\n\t\t\tgetNodePath: computed(() => treeRef.value?.getNodePath),\n\t\t\t/** @description 为节点设置新数据,只有当设置 node-key 属性的时候才可用 */\n\t\t\tupdateKeyChildren: computed(() => treeRef.value?.updateKeyChildren),\n\t\t\t/** @description 如果节点可以被选中,(show-checkbox 为 true), 本方法将返回当前选中节点的数组 */\n\t\t\tgetCheckedNodes: computed(() => treeRef.value?.getCheckedNodes),\n\t\t\t/** @description 设置目前勾选的节点,使用此方法必须提前设置 node-key 属性 */\n\t\t\tsetCheckedNodes: computed(() => treeRef.value?.setCheckedNodes),\n\t\t\t/** @description \t若节点可用被选中 (show-checkbox 为 true), 它将返回当前选中节点 key 的数组 */\n\t\t\tgetCheckedKeys: computed(() => treeRef.value?.getCheckedKeys),\n\t\t\t/** @description 设置目前选中的节点,使用此方法必须设置 node-key 属性 */\n\t\t\tsetCheckedKeys: computed(() => treeRef.value?.setCheckedKeys),\n\t\t\t/** @description 设置节点是否被选中, 使用此方法必须设置 node-key 属性 */\n\t\t\tsetChecked: computed(() => treeRef.value?.setChecked),\n\t\t\t/** @description 如果节点可用被选中 (show-checkbox 为 true), 它将返回当前半选中的节点组成的数组 */\n\t\t\tgetHalfCheckedNodes: computed(() => treeRef.value?.getHalfCheckedNodes),\n\t\t\t/** @description 若节点可被选中(show-checkbox 为 true),则返回目前半选中的节点的 key 所组成的数组 */\n\t\t\tgetHalfCheckedKeys: computed(() => treeRef.value?.getHalfCheckedKeys),\n\t\t\t/** @description 返回当前被选中节点的数据 (如果没有则返回 null) */\n\t\t\tgetCurrentKey: computed(() => treeRef.value?.getCurrentKey),\n\t\t\t/** @description 返回当前被选中节点的数据 (如果没有则返回 null) */\n\t\t\tgetCurrentNode: computed(() => treeRef.value?.getCurrentNode),\n\t\t\t/** @description 通过 key 设置某个节点的当前选中状态,使用此方法必须设置 node-key 属性 */\n\t\t\tsetCurrentKey: computed(() => treeRef.value?.setCurrentKey),\n\t\t\t/** @description 设置节点为选中状态,使用此方法必须设置 node-key 属性 */\n\t\t\tsetCurrentNode: computed(() => treeRef.value?.setCurrentNode),\n\t\t\t/** @description 根据 data 或者 key 拿到 Tree 组件中的 node */\n\t\t\tgetNode: computed(() => treeRef.value?.getNode),\n\t\t\t/** @description 删除 Tree 中的一个节点,使用此方法必须设置 node-key 属性 */\n\t\t\tremove: computed(() => treeRef.value?.remove),\n\t\t\t/** @description 为 Tree 中的一个节点追加一个子节点 */\n\t\t\tappend: computed(() => treeRef.value?.append),\n\t\t\t/** @description 在 Tree 中给定节点前插入一个节点 */\n\t\t\tinsertBefore: computed(() => treeRef.value?.insertBefore),\n\t\t\t/** @description 在 Tree 中给定节点后插入一个节点 */\n\t\t\tinsertAfter: computed(() => treeRef.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});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;AAWA,MAAa,cAAc;CAC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;EACV,CAAC;CACF;AACD,CAAC"}
@@ -20,11 +20,7 @@ export declare const faTreeSelectProps: {
20
20
  currentLabel: string | number;
21
21
  isDisabled: boolean;
22
22
  }[]>;
23
- default: {
24
- value: string | number | boolean | object;
25
- currentLabel: string | number;
26
- isDisabled: boolean;
27
- }[];
23
+ default: () => never[];
28
24
  };
29
25
  /** @description whether Select is disabled 重载使其支持 ElForm*/
30
26
  disabled: {
@@ -104,12 +100,17 @@ export declare const faTreeSelectProps: {
104
100
  /** @description 配置选项 */
105
101
  props: {
106
102
  type: import("vue").PropType<SelectComponentProps>;
107
- default: () => Partial<SelectComponentProps>;
103
+ default: () => {
104
+ label: string;
105
+ hide: string;
106
+ disabled: string;
107
+ children: string;
108
+ };
108
109
  };
109
110
  /** @description 下拉框数据 */
110
111
  data: {
111
112
  type: import("vue").PropType<ElSelectorOutput<ElSelectorValue, any>[]>;
112
- default: () => ElSelectorOutput[];
113
+ default: () => never[];
113
114
  };
114
115
  /** @description 请求api */
115
116
  requestApi: {
@@ -270,13 +271,13 @@ export declare const faTreeSelectProps: {
270
271
  /** FaTreeSelect 的运行时 Emits 定义。 */
271
272
  export declare const faTreeSelectEmits: {
272
273
  /** @description v-model 回调 */
273
- "update:modelValue": (value: ElSelectorModelValue) => boolean;
274
+ "update:modelValue": (value: ElSelectorModelValue) => value is string | number | boolean | object | ElSelectorValue[] | null | undefined;
274
275
  /** @description 选中数据改变 */
275
276
  change: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue) => boolean;
276
277
  /** @description v-model:label 回调 */
277
278
  "update:label": (value: string | string[] | null) => boolean;
278
279
  /** @description 数据改变 */
279
- dataChangeCallBack: (data: ElSelectorOutput[]) => boolean;
280
+ dataChange: (data: ElSelectorOutput[]) => boolean;
280
281
  /** @description 节点点击 */
281
282
  "node-click": (_data: ElSelectorOutput, _node: TreeNode, _instance: ComponentInternalInstance | null) => boolean;
282
283
  'check-change': (data: any, checked: boolean, indeterminate: boolean) => any;
@@ -342,11 +343,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
342
343
  currentLabel: string | number;
343
344
  isDisabled: boolean;
344
345
  }[]>;
345
- default: {
346
- value: string | number | boolean | object;
347
- currentLabel: string | number;
348
- isDisabled: boolean;
349
- }[];
346
+ default: () => never[];
350
347
  };
351
348
  /** @description whether Select is disabled 重载使其支持 ElForm*/
352
349
  disabled: {
@@ -426,12 +423,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
426
423
  /** @description 配置选项 */
427
424
  props: {
428
425
  type: import("vue").PropType<SelectComponentProps>;
429
- default: () => Partial<SelectComponentProps>;
426
+ default: () => {
427
+ label: string;
428
+ hide: string;
429
+ disabled: string;
430
+ children: string;
431
+ };
430
432
  };
431
433
  /** @description 下拉框数据 */
432
434
  data: {
433
435
  type: import("vue").PropType<ElSelectorOutput<ElSelectorValue, any>[]>;
434
- default: () => ElSelectorOutput[];
436
+ default: () => never[];
435
437
  };
436
438
  /** @description 请求api */
437
439
  requestApi: {
@@ -645,13 +647,13 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
645
647
  clearSelection: () => void;
646
648
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
647
649
  /** @description v-model 回调 */
648
- "update:modelValue": (value: ElSelectorModelValue) => boolean;
650
+ "update:modelValue": (value: ElSelectorModelValue) => value is string | number | boolean | object | ElSelectorValue[] | null | undefined;
649
651
  /** @description 选中数据改变 */
650
652
  change: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue) => boolean;
651
653
  /** @description v-model:label 回调 */
652
654
  "update:label": (value: string | string[] | null) => boolean;
653
655
  /** @description 数据改变 */
654
- dataChangeCallBack: (data: ElSelectorOutput[]) => boolean;
656
+ dataChange: (data: ElSelectorOutput[]) => boolean;
655
657
  /** @description 节点点击 */
656
658
  "node-click": (_data: ElSelectorOutput, _node: TreeNode, _instance: ComponentInternalInstance | null) => boolean;
657
659
  'check-change': (data: any, checked: boolean, indeterminate: boolean) => any;
@@ -691,11 +693,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
691
693
  currentLabel: string | number;
692
694
  isDisabled: boolean;
693
695
  }[]>;
694
- default: {
695
- value: string | number | boolean | object;
696
- currentLabel: string | number;
697
- isDisabled: boolean;
698
- }[];
696
+ default: () => never[];
699
697
  };
700
698
  /** @description whether Select is disabled 重载使其支持 ElForm*/
701
699
  disabled: {
@@ -775,12 +773,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
775
773
  /** @description 配置选项 */
776
774
  props: {
777
775
  type: import("vue").PropType<SelectComponentProps>;
778
- default: () => Partial<SelectComponentProps>;
776
+ default: () => {
777
+ label: string;
778
+ hide: string;
779
+ disabled: string;
780
+ children: string;
781
+ };
779
782
  };
780
783
  /** @description 下拉框数据 */
781
784
  data: {
782
785
  type: import("vue").PropType<ElSelectorOutput<ElSelectorValue, any>[]>;
783
- default: () => ElSelectorOutput[];
786
+ default: () => never[];
784
787
  };
785
788
  /** @description 请求api */
786
789
  requestApi: {
@@ -947,7 +950,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
947
950
  "onCurrent-change"?: ((data: any, node: import("element-plus/es/components/tree/src/model/node.mjs").default | null) => any) | undefined;
948
951
  "onVisible-change"?: ((visible: boolean) => any) | undefined;
949
952
  "onUpdate:label"?: ((value: string | string[] | null) => any) | undefined;
950
- onDataChangeCallBack?: ((data: ElSelectorOutput<ElSelectorValue, any>[]) => any) | undefined;
953
+ onDataChange?: ((data: ElSelectorOutput<ElSelectorValue, any>[]) => any) | undefined;
951
954
  "onPopup-scroll"?: ((args_0: {
952
955
  scrollTop: number;
953
956
  scrollLeft: number;
@@ -967,10 +970,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
967
970
  "onNode-drag-over"?: ((draggingNode: import("element-plus/es/components/tree/src/model/node.mjs").default, dropNode: import("element-plus/es/components/tree/src/model/node.mjs").default, evt: DragEvent) => any) | undefined;
968
971
  }>, {
969
972
  data: ElSelectorOutput<ElSelectorValue, any>[];
973
+ loading: boolean;
970
974
  props: SelectComponentProps;
971
975
  offset: number;
972
976
  placement: import("element-plus/es/utils/vue/props/types.mjs").EpPropMergeType<(new (...args: any[]) => "left" | "right" | "top" | "auto" | "bottom" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("element-plus").Placement) | ((new (...args: any[]) => "left" | "right" | "top" | "auto" | "bottom" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => import("element-plus").Placement) | null)[], import("element-plus").Placement, unknown>;
973
- loading: boolean;
974
977
  disabled: boolean;
975
978
  modelValue: ElSelectorModelValue;
976
979
  autocomplete: string;