fast-element-plus 2.0.15 → 2.0.17

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 (145) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/component.d.ts +6570 -2
  3. package/dist/component.mjs.map +1 -1
  4. package/dist/components/avatar/src/avatar.d.ts +19 -7
  5. package/dist/components/avatar/src/avatar.mjs +5 -0
  6. package/dist/components/avatar/src/avatar.mjs.map +1 -1
  7. package/dist/components/button/src/button.d.ts +4 -4
  8. package/dist/components/button/src/button.mjs +3 -4
  9. package/dist/components/button/src/button.mjs.map +1 -1
  10. package/dist/components/carNumber/src/carNumber.mjs +7 -9
  11. package/dist/components/carNumber/src/carNumber.mjs.map +1 -1
  12. package/dist/components/contextMenu/index.d.ts +1 -1
  13. package/dist/components/contextMenu/index.mjs.map +1 -1
  14. package/dist/components/contextMenu/src/contextMenu.d.ts +2 -2
  15. package/dist/components/contextMenu/src/contextMenu.mjs +10 -9
  16. package/dist/components/contextMenu/src/contextMenu.mjs.map +1 -1
  17. package/dist/components/dialog/src/dialog.d.ts +7 -4
  18. package/dist/components/dialog/src/dialog.mjs +10 -11
  19. package/dist/components/dialog/src/dialog.mjs.map +1 -1
  20. package/dist/components/drawer/src/drawer.d.ts +2 -2
  21. package/dist/components/drawer/src/drawer.mjs +18 -18
  22. package/dist/components/drawer/src/drawer.mjs.map +1 -1
  23. package/dist/components/form/src/form.d.ts +34 -16
  24. package/dist/components/form/src/form.mjs +8 -9
  25. package/dist/components/form/src/form.mjs.map +1 -1
  26. package/dist/components/form/src/formItem.d.ts +4 -4
  27. package/dist/components/form/src/formItem.mjs +18 -17
  28. package/dist/components/form/src/formItem.mjs.map +1 -1
  29. package/dist/components/form/utils/form.d.ts +3 -3
  30. package/dist/components/form/utils/form.mjs +6 -10
  31. package/dist/components/form/utils/form.mjs.map +1 -1
  32. package/dist/components/icon/src/icon.mjs.map +1 -1
  33. package/dist/components/iconSelector/src/iconSelector.d.ts +2 -2
  34. package/dist/components/iconSelector/src/iconSelector.mjs +4 -5
  35. package/dist/components/iconSelector/src/iconSelector.mjs.map +1 -1
  36. package/dist/components/image/src/image.d.ts +1 -1
  37. package/dist/components/image/src/image.mjs +3 -3
  38. package/dist/components/image/src/image.mjs.map +1 -1
  39. package/dist/components/inputDialogPage/src/inputDialogPage.d.ts +4 -4
  40. package/dist/components/inputDialogPage/src/inputDialogPage.mjs +11 -15
  41. package/dist/components/inputDialogPage/src/inputDialogPage.mjs.map +1 -1
  42. package/dist/components/layoutGrid/index.d.ts +1 -1
  43. package/dist/components/layoutGrid/index.mjs.map +1 -1
  44. package/dist/components/layoutGrid/src/layoutGrid.d.ts +23 -11
  45. package/dist/components/layoutGrid/src/layoutGrid.mjs +44 -45
  46. package/dist/components/layoutGrid/src/layoutGrid.mjs.map +1 -1
  47. package/dist/components/layoutGrid/src/layoutGrid.type.d.ts +1 -1
  48. package/dist/components/layoutGrid/src/layoutGridItem.mjs +13 -14
  49. package/dist/components/layoutGrid/src/layoutGridItem.mjs.map +1 -1
  50. package/dist/components/select/index.d.ts +1 -1
  51. package/dist/components/select/index.mjs.map +1 -1
  52. package/dist/components/select/src/select.d.ts +29 -14
  53. package/dist/components/select/src/select.mjs +47 -45
  54. package/dist/components/select/src/select.mjs.map +1 -1
  55. package/dist/components/select/src/selectOption.mjs +4 -5
  56. package/dist/components/select/src/selectOption.mjs.map +1 -1
  57. package/dist/components/selectPage/src/selectPage.d.ts +29 -14
  58. package/dist/components/selectPage/src/selectPage.mjs +45 -52
  59. package/dist/components/selectPage/src/selectPage.mjs.map +1 -1
  60. package/dist/components/selectV2/src/selectV2.d.ts +51 -31
  61. package/dist/components/selectV2/src/selectV2.mjs +66 -64
  62. package/dist/components/selectV2/src/selectV2.mjs.map +1 -1
  63. package/dist/components/table/index.d.ts +3 -3
  64. package/dist/components/table/index.mjs +1 -3
  65. package/dist/components/table/index.mjs.map +1 -1
  66. package/dist/components/table/src/table.d.ts +72 -38
  67. package/dist/components/table/src/table.mjs +98 -104
  68. package/dist/components/table/src/table.mjs.map +1 -1
  69. package/dist/components/table/src/table.type.d.ts +2 -2
  70. package/dist/components/table/src/table.type.mjs.map +1 -1
  71. package/dist/components/table/src/tableColumn.d.ts +7 -7
  72. package/dist/components/table/src/tableColumn.mjs +25 -45
  73. package/dist/components/table/src/tableColumn.mjs.map +1 -1
  74. package/dist/components/table/src/tableColumnSettingDialog.mjs +32 -22
  75. package/dist/components/table/src/tableColumnSettingDialog.mjs.map +1 -1
  76. package/dist/components/table/src/tablePagination.mjs +2 -3
  77. package/dist/components/table/src/tablePagination.mjs.map +1 -1
  78. package/dist/components/table/src/tableSearchForm.d.ts +4 -4
  79. package/dist/components/table/src/tableSearchForm.mjs +35 -44
  80. package/dist/components/table/src/tableSearchForm.mjs.map +1 -1
  81. package/dist/components/table/src/tableSearchFormItem.d.ts +1 -7
  82. package/dist/components/table/src/tableSearchFormItem.mjs +3 -6
  83. package/dist/components/table/src/tableSearchFormItem.mjs.map +1 -1
  84. package/dist/components/table/src/useTable.d.ts +4 -4
  85. package/dist/components/table/src/useTable.mjs +19 -20
  86. package/dist/components/table/src/useTable.mjs.map +1 -1
  87. package/dist/components/table/utils/table.mjs +6 -8
  88. package/dist/components/table/utils/table.mjs.map +1 -1
  89. package/dist/components/tree/index.d.ts +1 -1
  90. package/dist/components/tree/index.mjs.map +1 -1
  91. package/dist/components/tree/src/tree.d.ts +9 -9
  92. package/dist/components/tree/src/tree.mjs +29 -27
  93. package/dist/components/tree/src/tree.mjs.map +1 -1
  94. package/dist/components/treeSelect/src/treeSelect.d.ts +38 -35
  95. package/dist/components/treeSelect/src/treeSelect.mjs +47 -45
  96. package/dist/components/treeSelect/src/treeSelect.mjs.map +1 -1
  97. package/dist/components/upload/src/upload.d.ts +1 -1
  98. package/dist/components/upload/src/upload.mjs +5 -6
  99. package/dist/components/upload/src/upload.mjs.map +1 -1
  100. package/dist/components/upload/src/useUpload.mjs +8 -10
  101. package/dist/components/upload/src/useUpload.mjs.map +1 -1
  102. package/dist/components/upload/utils/upload.d.ts +1 -1
  103. package/dist/components/upload/utils/upload.mjs +1 -1
  104. package/dist/components/upload/utils/upload.mjs.map +1 -1
  105. package/dist/components/uploadImage/src/uploadImage.d.ts +8 -5
  106. package/dist/components/uploadImage/src/uploadImage.mjs +18 -13
  107. package/dist/components/uploadImage/src/uploadImage.mjs.map +1 -1
  108. package/dist/components/uploadImages/src/uploadImages.d.ts +8 -5
  109. package/dist/components/uploadImages/src/uploadImages.mjs +16 -11
  110. package/dist/components/uploadImages/src/uploadImages.mjs.map +1 -1
  111. package/dist/directives/click-copy/index.d.ts +1 -1
  112. package/dist/directives/click-copy/index.mjs +5 -9
  113. package/dist/directives/click-copy/index.mjs.map +1 -1
  114. package/dist/directives/click-debounce/index.d.ts +1 -1
  115. package/dist/directives/click-draggable/index.d.ts +1 -1
  116. package/dist/directives/click-icon-copy/index.d.ts +1 -1
  117. package/dist/directives/click-icon-copy/index.mjs.map +1 -1
  118. package/dist/directives/click-longpress/index.d.ts +1 -1
  119. package/dist/directives/click-throttle/index.d.ts +1 -1
  120. package/dist/element-plus.mjs +5 -6
  121. package/dist/element-plus.mjs.map +1 -1
  122. package/dist/hooks/use-screenFull/index.mjs.map +1 -1
  123. package/dist/index.css +1 -1
  124. package/dist/index.css.map +1 -1
  125. package/dist/index.global.min.js +4 -4
  126. package/dist/index.global.min.js.map +1 -1
  127. package/dist/index.mjs +1 -3
  128. package/dist/index.mjs.map +1 -1
  129. package/dist/utils/async/index.mjs +6 -4
  130. package/dist/utils/async/index.mjs.map +1 -1
  131. package/dist/utils/index.d.ts +1 -0
  132. package/dist/utils/object/index.d.ts +8 -0
  133. package/dist/utils/object/index.mjs +113 -0
  134. package/dist/utils/object/index.mjs.map +1 -0
  135. package/dist/utils/string/index.mjs +19 -11
  136. package/dist/utils/string/index.mjs.map +1 -1
  137. package/dist/utils/vue/emits.mjs.map +1 -1
  138. package/dist/utils/vue/install.mjs.map +1 -1
  139. package/dist/utils/vue/render.mjs.map +1 -1
  140. package/dist/version.d.ts +1 -1
  141. package/dist/version.mjs +1 -1
  142. package/dist/version.mjs.map +1 -1
  143. package/package.json +5 -10
  144. package/dist/components/table/src/page.type.mjs +0 -45
  145. package/dist/components/table/src/page.type.mjs.map +0 -1
@@ -9,10 +9,9 @@ import { getTableDefaultSlots } from "./table.type.mjs";
9
9
  import artwork_default from "../images/artwork.mjs";
10
10
  import notImage_default from "../images/notImage.mjs";
11
11
  import { enumMapKey, tableStateKey } from "./useTable.mjs";
12
- import { Fragment, computed, createVNode, defineComponent, h, inject, isVNode, mergeProps, resolveComponent, watch } from "vue";
12
+ import { Fragment, computed, createVNode, defineComponent, h, inject, isVNode, mergeProps, resolveComponent } from "vue";
13
13
  import { CopyDocument } from "@element-plus/icons-vue";
14
14
  import { ElIcon, ElImage, ElMessage, ElTableColumn, ElTag, ElText, dayjs, useGlobalSize } from "element-plus";
15
- import { isArray, isFunction, isNil, isNumber, isObject, isString } from "lodash-unified";
16
15
  //#region src/components/table/src/tableColumn.tsx
17
16
  /** FaTableColumn 的运行时 Props 定义。 */
18
17
  function _isSlot(s) {
@@ -171,7 +170,7 @@ const tableColumnProps = {
171
170
  ];
172
171
  },
173
172
  validator: (val) => {
174
- return (val ?? []).every((order) => order === "ascending" || order === "descending" || order === null);
173
+ return Array.isArray(val) && val.every((order) => order === "ascending" || order === "descending" || order === null);
175
174
  }
176
175
  }
177
176
  };
@@ -258,13 +257,13 @@ var tableColumn_default = defineComponent({
258
257
  },
259
258
  emits: {
260
259
  /** @description 图片预览 */
261
- imagePreview: (url) => isString(url),
260
+ imagePreview: (url) => typeof url === "string",
262
261
  /** @description 自定义单元格点击事件 */
263
- customCellClick: (emitName, { row, column, $index }) => (isNil(emitName) || isString(emitName)) && isObject(row) && isObject(column) && isNumber($index)
262
+ customCellClick: (emitName, { row, column, $index }) => (emitName == null || typeof emitName === "string") && typeof row === "object" && row !== null && typeof column === "object" && column !== null && typeof $index === "number"
264
263
  },
265
264
  slots: makeSlots(),
266
265
  setup(props, { slots, emit }) {
267
- const _globalSize = useGlobalSize();
266
+ const globalSize = useGlobalSize();
268
267
  const tableState = inject(tableStateKey);
269
268
  const enumMap = inject(enumMapKey);
270
269
  if (tableState === void 0 || enumMap === void 0) throw new Error("FaTableColumn 必须在 FaTable 内部渲染。");
@@ -281,13 +280,12 @@ var tableColumn_default = defineComponent({
281
280
  };
282
281
  /** 获取宽度 */
283
282
  const getWidth = (defAttr) => {
284
- if (props.autoWidth) return computed(() => {
285
- const findInfo = tableState.autoColumnWidth.find((f) => f.prop === props.prop);
286
- if (findInfo) return `${findInfo.width}px`;
287
- return "auto";
288
- }).value;
289
- if (_globalSize.value === "small") return props.smallWidth ?? props.width ?? props.minWidth ?? defAttr ?? "auto";
290
- return props.width ?? props.minWidth ?? defAttr ?? "auto";
283
+ if (props.autoWidth) {
284
+ const autoWidthEntry = tableState.autoColumnWidth.find((f) => f.prop === props.prop);
285
+ return autoWidthEntry ? `${autoWidthEntry.width}px` : "auto";
286
+ }
287
+ if (globalSize.value === "small") return props.smallWidth || props.width || props.minWidth || defAttr;
288
+ return props.width || props.minWidth || defAttr;
291
289
  };
292
290
  /** 表头自动宽度渲染 */
293
291
  const autoWidthHeaderRender = (el) => {
@@ -343,22 +341,23 @@ var tableColumn_default = defineComponent({
343
341
  const renderCellData = ({ row }) => {
344
342
  const cellValue = tableUtil.handleRowAccordingToProp(row, props.prop ?? "");
345
343
  let enumData;
346
- if (isString(props.enum)) enumData = enumMap.get(props.enum);
347
- else if (isArray(props.enum)) enumData = props.enum;
348
- else if (isFunction(props.enum)) enumData = props.enum({ row });
344
+ if (typeof props.enum === "string") enumData = enumMap.get(props.enum);
345
+ else if (Array.isArray(props.enum)) enumData = props.enum;
346
+ else if (typeof props.enum === "function") enumData = props.enum({ row });
349
347
  if (enumData) return tableUtil.filterEnum(cellValue, enumData);
350
348
  else return tableUtil.formatValue(cellValue);
351
349
  };
352
350
  /** 格式化渲染 */
353
351
  const formatterRender = (row, column, cellValue, index) => {
354
- if (column.formatter) return column.formatter(row, column, cellValue, index);
352
+ const formatter = column.formatter;
353
+ if (formatter) return formatter(row, column, cellValue, index);
355
354
  else return displayText(cellValue);
356
355
  };
357
356
  /** 时间信息列渲染 */
358
357
  const timeInfoRender = (row, _column, _$index) => {
359
358
  let _slot;
360
- const userName = displayText(row[props.timeInfoField?.userName ?? "createdUserName"]);
361
- const time = displayText(row[props.timeInfoField?.time ?? "createdTime"]);
359
+ const userName = displayText(row[props.timeInfoField.userName ?? "createdUserName"]);
360
+ const time = displayText(row[props.timeInfoField.time ?? "createdTime"]);
362
361
  return [createVNode(Fragment, null, [createVNode("div", {
363
362
  "style": "white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",
364
363
  "title": time
@@ -373,9 +372,9 @@ var tableColumn_default = defineComponent({
373
372
  const tagRender = (row, column, $index) => {
374
373
  const renderValue = formatterRender(row, column, renderCellData({ row }), $index);
375
374
  let enumData;
376
- if (isString(props.enum)) enumData = enumMap.get(props.enum);
377
- else if (isArray(props.enum)) enumData = props.enum;
378
- else if (isFunction(props.enum)) enumData = props.enum({ row });
375
+ if (typeof props.enum === "string") enumData = enumMap.get(props.enum);
376
+ else if (Array.isArray(props.enum)) enumData = props.enum;
377
+ else if (typeof props.enum === "function") enumData = props.enum({ row });
379
378
  const enumValue = tableUtil.handleRowAccordingToProp(row, props.prop ?? "");
380
379
  const type = enumData?.find((item) => item.value === enumValue)?.type ?? "info";
381
380
  return [createVNode(Fragment, null, [copyRender(renderValue), renderValue ? createVNode(ElTag, { "type": type }, _isSlot(renderValue) ? renderValue : { default: () => [renderValue] }) : null])];
@@ -409,7 +408,7 @@ var tableColumn_default = defineComponent({
409
408
  /** 数值列渲染 */
410
409
  const numberRender = (row, column, $index) => {
411
410
  const renderValue = row[props.prop ?? ""];
412
- if (!renderValue || !isNumber(renderValue)) return [createVNode(Fragment, null, [formatterRender(row, column, renderValue, $index)])];
411
+ if (!renderValue || typeof renderValue !== "number") return [createVNode(Fragment, null, [formatterRender(row, column, renderValue, $index)])];
413
412
  let useGrouping = false;
414
413
  let maximumFractionDigits = 2;
415
414
  switch (props.type) {
@@ -481,7 +480,7 @@ var tableColumn_default = defineComponent({
481
480
  const renderValue = formatterRender(row, column, row[props.prop ?? ""], $index);
482
481
  return autoWidthRender([createVNode(Fragment, null, [copyRender(renderValue), renderValue])]);
483
482
  };
484
- let elTableColumnProps = useProps(props, tableColumnProps, [
483
+ const elTableColumnProps = useProps(props, tableColumnProps, [
485
484
  "type",
486
485
  "width",
487
486
  "minWidth",
@@ -490,26 +489,11 @@ var tableColumn_default = defineComponent({
490
489
  "resizable",
491
490
  "showOverflowTooltip"
492
491
  ]);
493
- watch(() => props, () => {
494
- elTableColumnProps = useProps(props, tableColumnProps, [
495
- "type",
496
- "className",
497
- "minWidth",
498
- "sortable",
499
- "sortOrders",
500
- "resizable",
501
- "showOverflowTooltip"
502
- ]);
503
- });
504
492
  useRender(() => createVNode(Fragment, null, [props._children?.length ? createVNode(ElTableColumn, mergeProps(elTableColumnProps.value, {
505
493
  "className": getClassName(),
506
494
  "minWidth": getWidth("auto"),
507
495
  "sortable": props.sortable ? "custom" : false,
508
- "sortOrders": props.sortOrders ?? [
509
- "descending",
510
- "ascending",
511
- null
512
- ],
496
+ "sortOrders": props.sortOrders,
513
497
  "resizable": props.resizable && !props.autoWidth,
514
498
  "showOverflowTooltip": (props.showOverflowTooltip ?? true) && !props.autoWidth && props.type === "default"
515
499
  }), {
@@ -556,11 +540,7 @@ var tableColumn_default = defineComponent({
556
540
  "className": getClassName(),
557
541
  "minWidth": getWidth("auto"),
558
542
  "sortable": props.sortable ? "custom" : false,
559
- "sortOrders": props.sortOrders ?? [
560
- "descending",
561
- "ascending",
562
- null
563
- ],
543
+ "sortOrders": props.sortOrders,
564
544
  "resizable": props.resizable && !props.autoWidth,
565
545
  "showOverflowTooltip": (props.showOverflowTooltip ?? true) && !props.autoWidth && props.type === "default"
566
546
  }), {
@@ -1 +1 @@
1
- {"version":3,"file":"tableColumn.mjs","names":[],"sources":["../../../../src/components/table/src/tableColumn.tsx"],"sourcesContent":["import { Fragment, computed, defineComponent, h, inject, resolveComponent, watch } from \"vue\";\nimport { CopyDocument } from \"@element-plus/icons-vue\";\nimport { ElIcon, ElImage, ElMessage, ElTableColumn, ElTag, ElText, dayjs, useGlobalSize } from \"element-plus\";\nimport { isArray, isFunction, isNil, isNumber, isObject, isString } from \"lodash-unified\";\nimport { copy as copyToClipboard, definePropType, formatChineseRelativeTime, makeSlots, useProps, useRender } from \"../../../utils\";\nimport FaImage from \"../../image\";\nimport artwork from \"../images/artwork.png\";\nimport notImage from \"../images/notImage.png\";\nimport { tableUtil } from \"../utils/table\";\nimport { getTableDefaultSlots } from \"./table.type\";\nimport { enumMapKey, tableStateKey } from \"./useTable\";\nimport type { TableColumnCtx } from \"element-plus\";\nimport type { ComputedRef, PropType, VNode } from \"vue\";\nimport type { DefaultRow } from \"./table.state\";\nimport type {\n\tFaTableColumnCtx,\n\tFaTableColumnDateFormat,\n\tFaTableColumnType,\n\tFaTableDefaultSlotsResult,\n\tFaTableEnumColumnCtx,\n\tFaTableEnumColumnType,\n} from \"./table.type\";\n\n/** FaTableColumn 的运行时 Props 定义。 */\nexport const tableColumnProps = {\n\t/**\n\t * @description type of the column. If set to `selection`, the column will display checkbox. If set to `index`, the column will display index of the row (staring from 1). If set to `expand`, the column will display expand icon\n\t */\n\ttype: {\n\t\ttype: String,\n\t\tdefault: \"default\",\n\t},\n\t/**\n\t * @description column label\n\t */\n\tlabel: String,\n\t/**\n\t * @description class name of cells in the column\n\t */\n\tclassName: String,\n\t/**\n\t * @description class name of the label of this column\n\t */\n\tlabelClassName: String,\n\t/**\n\t * @description\n\t */\n\tproperty: String,\n\t/**\n\t * @description field name. You can also use its alias: `property`\n\t */\n\tprop: String,\n\t/**\n\t * @description column width\n\t */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"\",\n\t},\n\t/**\n\t * @description column minimum width. Columns with `width` has a fixed width, while columns with `min-width` has a width that is distributed in proportion\n\t */\n\tminWidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"\",\n\t},\n\t/**\n\t * @description render function for table header of this column\n\t */\n\trenderHeader: Function as PropType<TableColumnCtx<DefaultRow>[\"renderHeader\"]>,\n\t/**\n\t * @description whether column can be sorted. Remote sorting can be done by setting this attribute to 'custom' and listening to the `sort-change` event of Table\n\t */\n\tsortable: {\n\t\ttype: [Boolean, String],\n\t\tdefault: false,\n\t},\n\t/**\n\t * @description sorting method, works when `sortable` is `true`. Should return a number, just like Array.sort\n\t */\n\tsortMethod: Function as PropType<TableColumnCtx<DefaultRow>[\"sortMethod\"]>,\n\t/**\n\t * @description specify which property to sort by, works when `sortable` is `true` and `sort-method` is `undefined`. If set to an Array, the column will sequentially sort by the next property if the previous one is equal\n\t */\n\tsortBy: [String, Function, Array] as PropType<TableColumnCtx<DefaultRow>[\"sortBy\"]>,\n\t/**\n\t * @description whether column width can be resized, works when `border` of `el-table` is `true`\n\t */\n\tresizable: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description column's key. If you need to use the filter-change event, you need this attribute to identify which column is being filtered\n\t */\n\tcolumnKey: String,\n\t/**\n\t * @description alignment, the value should be 'left' \\/ 'center' \\/ 'right'\n\t */\n\talign: String,\n\t/**\n\t * @description alignment of the table header. If omitted, the value of the above `align` attribute will be applied, the value should be 'left' \\/ 'center' \\/ 'right'\n\t */\n\theaderAlign: String,\n\t/**\n\t * @description whether to hide extra content and show them in a tooltip when hovering on the cell\n\t */\n\tshowOverflowTooltip: {\n\t\ttype: [Boolean, Object] as PropType<TableColumnCtx<DefaultRow>[\"showOverflowTooltip\"]>,\n\t\tdefault: undefined,\n\t},\n\t/** @description function that formats cell tooltip content, works when show-overflow-tooltip is enabled */\n\ttooltipFormatter: Function as PropType<TableColumnCtx<DefaultRow>[\"tooltipFormatter\"]>,\n\t/**\n\t * @description whether column is fixed at left / right. Will be fixed at left if `true`\n\t */\n\tfixed: [Boolean, String],\n\t/**\n\t * @description function that formats cell content\n\t */\n\tformatter: Function as PropType<TableColumnCtx<DefaultRow>[\"formatter\"]>,\n\t/**\n\t * @description function that determines if a certain row can be selected, works when `type` is 'selection'\n\t */\n\tselectable: Function as PropType<TableColumnCtx<DefaultRow>[\"selectable\"]>,\n\t/**\n\t * @description whether to reserve selection after data refreshing, works when `type` is 'selection'. Note that `row-key` is required for this to work\n\t */\n\treserveSelection: Boolean,\n\t/**\n\t * @description data filtering method. If `filter-multiple` is on, this method will be called multiple times for each row, and a row will display if one of the calls returns `true`\n\t */\n\tfilterMethod: Function as PropType<TableColumnCtx<DefaultRow>[\"filterMethod\"]>,\n\t/**\n\t * @description filter value for selected data, might be useful when table header is rendered with `render-header`\n\t */\n\tfilteredValue: Array as PropType<TableColumnCtx<DefaultRow>[\"filteredValue\"]>,\n\t/**\n\t * @description an array of data filtering options. For each element in this array, `text` and `value` are required\n\t */\n\tfilters: Array as PropType<TableColumnCtx<DefaultRow>[\"filters\"]>,\n\t/**\n\t * @description placement for the filter dropdown\n\t */\n\tfilterPlacement: String,\n\t/**\n\t * @description whether data filtering supports multiple options\n\t */\n\tfilterMultiple: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description className for the filter dropdown\n\t */\n\tfilterClassName: String,\n\t/**\n\t * @description customize indices for each row, works on columns with `type=index`\n\t */\n\tindex: [Number, Function] as PropType<TableColumnCtx<DefaultRow>[\"index\"]>,\n\t/**\n\t * @description the order of the sorting strategies used when sorting the data, works when `sortable` is `true`. Accepts an array, as the user clicks on the header, the column is sorted in order of the elements in the array\n\t */\n\tsortOrders: {\n\t\ttype: Array as PropType<TableColumnCtx<DefaultRow>[\"sortOrders\"]>,\n\t\tdefault: (): TableColumnCtx<DefaultRow>[\"sortOrders\"] => {\n\t\t\treturn [\"ascending\", \"descending\", null];\n\t\t},\n\t\tvalidator: (val: TableColumnCtx<DefaultRow>[\"sortOrders\"]): boolean => {\n\t\t\treturn (val ?? []).every((order) => order === \"ascending\" || order === \"descending\" || order === null);\n\t\t},\n\t},\n};\n\n/** FaTableColumn 插槽返回的行列上下文。 */\nexport interface FaTableColumnSlotsResult {\n\t/** @description slots为表格内容的时候才会返回 */\n\trow?: DefaultRow;\n\t/** @description slot为表头内容的时候返回 'TableColumnCtx<DefaultRow>' 否则返回 'FaTableColumnCtx' */\n\tcolumn?: TableColumnCtx<DefaultRow> | FaTableColumnCtx;\n\t$index?: number;\n}\n\ntype FaTableColumnDefaultSlots = Record<string, FaTableDefaultSlotsResult & FaTableColumnSlotsResult>;\n\n/** FaTableColumn 的固定插槽和动态命名插槽。 */\nexport type FaTableColumnSlots = Record<string, unknown> & {\n\t/** @description 默认内容插槽 */\n\tdefault: FaTableDefaultSlotsResult & { row: DefaultRow; column: FaTableColumnCtx; $index: number };\n\t/** @description 自定义表头的内容 */\n\theader: FaTableDefaultSlotsResult & { column: FaTableColumnCtx; $index: number };\n\t/** @description 自定义 filter 图标 */\n\tfilterIcon: FaTableDefaultSlotsResult & { filterOpened: boolean };\n\t/** @description 展开列的自定义内容 */\n\texpand: FaTableDefaultSlotsResult & { expanded: boolean };\n} & FaTableColumnDefaultSlots;\n\nexport default defineComponent({\n\tname: \"FaTableColumn\",\n\tprops: {\n\t\t...tableColumnProps,\n\t\t/**\n\t\t * @description type of the column. If set to `selection`, the column will display checkbox. If set to `index`, the column will display index of the row (staring from 1). If set to `expand`, the column will display expand icon\n\t\t */\n\t\ttype: {\n\t\t\ttype: definePropType<FaTableColumnType>(String),\n\t\t\tdefault: \"default\",\n\t\t},\n\t\t/**\n\t\t * @description column width\n\t\t */\n\t\twidth: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: \"auto\",\n\t\t},\n\t\t/** @description alignment, the value should be 'left' \\/ 'center' \\/ 'right' */\n\t\talign: {\n\t\t\ttype: String,\n\t\t\tdefault: \"left\",\n\t\t},\n\t\t/** @description alignment of the table header. If omitted, the value of the above `align` attribute will be applied, the value should be 'left' \\/ 'center' \\/ 'right' */\n\t\theaderAlign: {\n\t\t\ttype: String,\n\t\t\tdefault: \"left\",\n\t\t},\n\t\t/** @description 是否显示在表格当中 */\n\t\tshow: Boolean,\n\t\t/** @description 小页面的宽度,如果为空,则继承默认宽度 */\n\t\tsmallWidth: {\n\t\t\ttype: [String, Number],\n\t\t},\n\t\t/** @description 自适应宽度 */\n\t\tautoWidth: Boolean,\n\t\t/** @description 插槽名称 */\n\t\tslot: String,\n\t\t/** @description 表格头部插槽名称 */\n\t\theaderSlot: String,\n\t\t/** @description 自定义表头内容渲染(tsx语法) */\n\t\theaderRender: {\n\t\t\ttype: definePropType<({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number } & FaTableDefaultSlotsResult) => VNode[]>(\n\t\t\t\tFunction\n\t\t\t),\n\t\t},\n\t\t/** @description 自定义单元格内容渲染(tsx语法) */\n\t\trender: {\n\t\t\ttype: definePropType<\n\t\t\t\t({ row, column, $index }: { row: DefaultRow; column: FaTableColumnCtx; $index: number } & FaTableDefaultSlotsResult) => VNode[]\n\t\t\t>(Function),\n\t\t},\n\t\t/** @description 多级表头 */\n\t\t_children: {\n\t\t\ttype: definePropType<FaTableColumnCtx[]>(Array),\n\t\t},\n\t\t/** @description 隐藏图片 */\n\t\thideImage: Boolean,\n\t\t/** @description 复制 */\n\t\tcopy: Boolean,\n\t\t/** @description 是否为 Link Button */\n\t\tlink: Boolean,\n\t\t/** @description 合并行字段 */\n\t\tspanProp: String,\n\t\t/** @description Link 按钮的点击事件,优先级最高 */\n\t\tclick: {\n\t\t\ttype: definePropType<({ row, $index }: { row: DefaultRow; $index?: number } & FaTableDefaultSlotsResult) => void>(Function),\n\t\t},\n\t\t/** @description 点击Emits事件回调 */\n\t\tclickEmit: String,\n\t\t/** @description 图片列是否显示为原图,默认 false 显示缩略图 */\n\t\toriginalImage: Boolean,\n\t\t/** @description 显示时间格式化字符串 */\n\t\tdateFix: Boolean,\n\t\t/** @description 显示在页面中的日期格式 */\n\t\tdateFormat: {\n\t\t\ttype: definePropType<FaTableColumnDateFormat>(String),\n\t\t},\n\t\t/** @description 是否是标签展示 */\n\t\ttag: Boolean,\n\t\t/** @description 枚举类型(渲染值的字典) */\n\t\tenum: {\n\t\t\ttype: definePropType<FaTableEnumColumnType>([String, Array, Function]),\n\t\t},\n\t\t/** @description 数据删除字段,如果为 true 会显示遮罩层 */\n\t\tdataDeleteField: String,\n\t\t/** @description 时间信息字段 */\n\t\ttimeInfoField: {\n\t\t\ttype: definePropType<{ userName?: string; time?: string }>(Object),\n\t\t\tdefault: () => ({\n\t\t\t\tuserName: \"createdUserName\",\n\t\t\t\ttime: \"createdTime\",\n\t\t\t}),\n\t\t},\n\t},\n\temits: {\n\t\t/** @description 图片预览 */\n\t\timagePreview: (url: string): boolean => isString(url),\n\t\t/** @description 自定义单元格点击事件 */\n\t\tcustomCellClick: (emitName: string, { row, column, $index }: { row: DefaultRow; column: FaTableColumnCtx; $index: number }): boolean =>\n\t\t\t(isNil(emitName) || isString(emitName)) && isObject(row) && isObject(column) && isNumber($index),\n\t},\n\tslots: makeSlots<FaTableColumnSlots>(),\n\tsetup(props, { slots, emit }) {\n\t\tconst _globalSize = useGlobalSize();\n\t\tconst tableState = inject(tableStateKey);\n\t\tconst enumMap = inject(enumMapKey);\n\t\tif (tableState === undefined || enumMap === undefined) {\n\t\t\tthrow new Error(\"FaTableColumn 必须在 FaTable 内部渲染。\");\n\t\t}\n\n\t\tconst columnCtx = computed(() => props as unknown as FaTableColumnCtx);\n\n\t\t/** 获取ClassName */\n\t\tconst getClassName = (): string => {\n\t\t\tlet className = \"\";\n\t\t\tif (props.type === \"timeInfo\") {\n\t\t\t\tclassName += \"fa-table__line-height-normal-column\";\n\t\t\t}\n\t\t\tif (props.type === \"date\" || props.type === \"time\" || props.type === \"dateTime\") {\n\t\t\t\tif (props.dateFix) {\n\t\t\t\t\tclassName += \"fa-table__line-height-normal-column\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (props.className) {\n\t\t\t\treturn `${className} ${props.className}`;\n\t\t\t}\n\t\t\treturn className;\n\t\t};\n\n\t\t/** 获取宽度 */\n\t\tconst getWidth = (defAttr: string): string | number => {\n\t\t\tif (props.autoWidth) {\n\t\t\t\treturn computed(() => {\n\t\t\t\t\tconst findInfo = tableState.autoColumnWidth.find((f) => f.prop === props.prop);\n\t\t\t\t\tif (findInfo) {\n\t\t\t\t\t\treturn `${findInfo.width}px`;\n\t\t\t\t\t}\n\t\t\t\t\treturn \"auto\";\n\t\t\t\t}).value;\n\t\t\t}\n\t\t\tif (_globalSize.value === \"small\") {\n\t\t\t\treturn props.smallWidth ?? props.width ?? props.minWidth ?? defAttr ?? \"auto\";\n\t\t\t}\n\t\t\treturn props.width ?? props.minWidth ?? defAttr ?? \"auto\";\n\t\t};\n\n\t\t/** 表头自动宽度渲染 */\n\t\tconst autoWidthHeaderRender = (el: VNode[]): VNode[] => {\n\t\t\tif (props.autoWidth) {\n\t\t\t\treturn [\n\t\t\t\t\t<div class={[\"fa-table__auto-width-column__cell-header\", `__fa-table__auto-width-column__cell-header__${props.prop}`]}>{el}</div>,\n\t\t\t\t];\n\t\t\t} else {\n\t\t\t\treturn el;\n\t\t\t}\n\t\t};\n\n\t\t/** 自动宽度渲染 */\n\t\tconst autoWidthRender = (el: VNode[]): VNode[] => {\n\t\t\tif (props.autoWidth) {\n\t\t\t\treturn [<div class={[\"fa-table__auto-width-column__cell\", `__fa-table__auto-width-column__cell__${props.prop}`]}>{el}</div>];\n\t\t\t} else {\n\t\t\t\treturn el;\n\t\t\t}\n\t\t};\n\n\t\t/** 表头渲染 */\n\t\tconst headerRender = ({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number }): VNode[] => {\n\t\t\tif (props.headerRender) {\n\t\t\t\treturn autoWidthHeaderRender(props.headerRender({ column, $index, ...getTableDefaultSlots(tableState) }));\n\t\t\t} else if (props.headerSlot) {\n\t\t\t\treturn autoWidthHeaderRender(slots[props.headerSlot]?.({ column, $index, ...getTableDefaultSlots(tableState) }) ?? []);\n\t\t\t} else {\n\t\t\t\treturn autoWidthHeaderRender([<span>{props.label}</span>]);\n\t\t\t}\n\t\t};\n\n\t\t/** 复制渲染 */\n\t\tconst displayText = (value: unknown): string => {\n\t\t\tif (typeof value === \"string\") return value;\n\t\t\tif (typeof value === \"number\" || typeof value === \"bigint\" || typeof value === \"boolean\") return String(value);\n\t\t\treturn \"\";\n\t\t};\n\n\t\tconst copyRender = (value: unknown, copy?: boolean): VNode[] => {\n\t\t\tif (!(props.copy || copy) || !value) return [];\n\n\t\t\treturn [\n\t\t\t\t<ElIcon\n\t\t\t\t\tclass=\"fa__copy-icon\"\n\t\t\t\t\ttitle=\"复制\"\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tvoid copyToClipboard(displayText(value)).then(\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tElMessage({\n\t\t\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\t\t\tmessage: \"复制成功\",\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tElMessage({\n\t\t\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\t\t\tmessage: \"复制失败\",\n\t\t\t\t\t\t\t\t});\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\t\t<CopyDocument />\n\t\t\t\t</ElIcon>,\n\t\t\t];\n\t\t};\n\n\t\t/** 渲染单元格数据 */\n\t\tconst renderCellData = ({ row }: { row: DefaultRow }): unknown => {\n\t\t\tconst cellValue: unknown = tableUtil.handleRowAccordingToProp(row, props.prop ?? \"\");\n\n\t\t\tlet enumData: FaTableEnumColumnCtx[] | undefined;\n\n\t\t\tif (isString(props.enum)) {\n\t\t\t\tenumData = enumMap.get(props.enum);\n\t\t\t} else if (isArray(props.enum)) {\n\t\t\t\tenumData = props.enum;\n\t\t\t} else if (isFunction(props.enum)) {\n\t\t\t\tenumData = props.enum({ row });\n\t\t\t}\n\n\t\t\tif (enumData) {\n\t\t\t\treturn tableUtil.filterEnum(cellValue, enumData);\n\t\t\t} else {\n\t\t\t\treturn tableUtil.formatValue(cellValue);\n\t\t\t}\n\t\t};\n\n\t\t/** 格式化渲染 */\n\t\tconst formatterRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, cellValue: unknown, index: number): VNode | string => {\n\t\t\tif (column.formatter) {\n\t\t\t\treturn column.formatter(row, column, cellValue, index);\n\t\t\t} else {\n\t\t\t\treturn displayText(cellValue);\n\t\t\t}\n\t\t};\n\n\t\t/** 时间信息列渲染 */\n\t\tconst timeInfoRender = (row: DefaultRow, _column: TableColumnCtx<DefaultRow>, _$index: number): VNode[] => {\n\t\t\tconst userName = displayText(row[props.timeInfoField?.userName ?? \"createdUserName\"]);\n\t\t\tconst time = displayText(row[props.timeInfoField?.time ?? \"createdTime\"]);\n\t\t\treturn [\n\t\t\t\t<Fragment>\n\t\t\t\t\t<div style=\"white-space: nowrap; overflow: hidden; text-overflow: ellipsis;\" title={time}>\n\t\t\t\t\t\t{userName && <span style=\"margin-right: 5px;\">{userName}</span>}\n\t\t\t\t\t\t<span>{time}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t{time && (\n\t\t\t\t\t\t<ElTag type=\"info\" round effect=\"light\" size=\"small\">\n\t\t\t\t\t\t\t{formatChineseRelativeTime(time)}\n\t\t\t\t\t\t</ElTag>\n\t\t\t\t\t)}\n\t\t\t\t</Fragment>,\n\t\t\t];\n\t\t};\n\n\t\t/** 标签列渲染 */\n\t\tconst tagRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, $index: number): VNode[] => {\n\t\t\tconst renderValue = formatterRender(row, column, renderCellData({ row }), $index);\n\n\t\t\tlet enumData: FaTableEnumColumnCtx[] | undefined;\n\n\t\t\tif (isString(props.enum)) {\n\t\t\t\tenumData = enumMap.get(props.enum);\n\t\t\t} else if (isArray(props.enum)) {\n\t\t\t\tenumData = props.enum;\n\t\t\t} else if (isFunction(props.enum)) {\n\t\t\t\tenumData = props.enum({ row });\n\t\t\t}\n\n\t\t\tconst enumValue: unknown = tableUtil.handleRowAccordingToProp(row, props.prop ?? \"\");\n\t\t\tconst type = enumData?.find((item) => item.value === enumValue)?.type ?? \"info\";\n\t\t\treturn [\n\t\t\t\t<Fragment>\n\t\t\t\t\t{copyRender(renderValue)}\n\t\t\t\t\t{renderValue ? <ElTag type={type}>{renderValue}</ElTag> : null}\n\t\t\t\t</Fragment>,\n\t\t\t];\n\t\t};\n\n\t\t/** 时间列渲染 */\n\t\tconst dateRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, $index: number): VNode[] => {\n\t\t\tlet dateFormat;\n\t\t\tswitch (props.type) {\n\t\t\t\tcase \"date\":\n\t\t\t\t\tdateFormat = \"YYYY-MM-DD\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"time\":\n\t\t\t\t\tdateFormat = \"HH:mm:ss\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"dateTime\":\n\t\t\t\t\tdateFormat = \"YYYY-MM-DD HH:mm:ss\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tconst rawValue: unknown = row[props.prop ?? \"\"];\n\t\t\tconst renderValue = rawValue\n\t\t\t\t? formatterRender(row, column, dayjs(rawValue as Parameters<typeof dayjs>[0]).format(props.dateFormat ?? dateFormat), $index)\n\t\t\t\t: null;\n\t\t\treturn [\n\t\t\t\t<Fragment>\n\t\t\t\t\t{copyRender(renderValue)}\n\t\t\t\t\t{renderValue}\n\t\t\t\t\t{props.dateFix && renderValue && (\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<ElTag type=\"info\" round effect=\"light\" size=\"small\">\n\t\t\t\t\t\t\t\t{formatChineseRelativeTime(displayText(renderValue))}\n\t\t\t\t\t\t\t</ElTag>\n\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t)}\n\t\t\t\t</Fragment>,\n\t\t\t];\n\t\t};\n\n\t\t/** 数值列渲染 */\n\t\tconst numberRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, $index: number): VNode[] => {\n\t\t\tconst renderValue: unknown = row[props.prop ?? \"\"];\n\t\t\tif (!renderValue || !isNumber(renderValue)) {\n\t\t\t\treturn [<Fragment>{formatterRender(row, column, renderValue, $index)}</Fragment>];\n\t\t\t}\n\t\t\tlet useGrouping = false;\n\t\t\tlet maximumFractionDigits = 2;\n\t\t\tswitch (props.type) {\n\t\t\t\tcase \"d2\":\n\t\t\t\t\tmaximumFractionDigits = 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"d4\":\n\t\t\t\t\tmaximumFractionDigits = 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"d6\":\n\t\t\t\t\tmaximumFractionDigits = 6;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"gd2\":\n\t\t\t\t\tmaximumFractionDigits = 2;\n\t\t\t\t\tuseGrouping = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"gd4\":\n\t\t\t\t\tmaximumFractionDigits = 4;\n\t\t\t\t\tuseGrouping = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"gd6\":\n\t\t\t\t\tmaximumFractionDigits = 6;\n\t\t\t\t\tuseGrouping = true;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn [\n\t\t\t\t<Fragment>\n\t\t\t\t\t{formatterRender(\n\t\t\t\t\t\trow,\n\t\t\t\t\t\tcolumn,\n\t\t\t\t\t\trenderValue.toLocaleString(\"zh-CN\", {\n\t\t\t\t\t\t\tminimumFractionDigits: 2,\n\t\t\t\t\t\t\tmaximumFractionDigits,\n\t\t\t\t\t\t\tuseGrouping,\n\t\t\t\t\t\t}),\n\t\t\t\t\t\t$index\n\t\t\t\t\t)}\n\t\t\t\t</Fragment>,\n\t\t\t];\n\t\t};\n\n\t\t/** 链接列渲染 */\n\t\tconst linkRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, $index: number): VNode[] => {\n\t\t\tconst renderValue = formatterRender(row, column, row[props.prop ?? \"\"], $index);\n\t\t\treturn autoWidthRender([\n\t\t\t\t<Fragment>\n\t\t\t\t\t{copyRender(renderValue)}\n\t\t\t\t\t{renderValue && (\n\t\t\t\t\t\t<ElText\n\t\t\t\t\t\t\tclass={\"el-link is-hover-underline fa-table__link-column__text\"}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t// 数据删除拦截点击\n\t\t\t\t\t\t\t\tif (props.dataDeleteField && row[props.dataDeleteField] === true) return;\n\t\t\t\t\t\t\t\tif (props.click) {\n\t\t\t\t\t\t\t\t\tprops.click({ row, $index, ...getTableDefaultSlots(tableState) });\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\temit(\"customCellClick\", props.clickEmit ?? \"\", {\n\t\t\t\t\t\t\t\t\t\trow,\n\t\t\t\t\t\t\t\t\t\tcolumn: columnCtx.value,\n\t\t\t\t\t\t\t\t\t\t$index,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{renderValue}\n\t\t\t\t\t\t</ElText>\n\t\t\t\t\t)}\n\t\t\t\t</Fragment>,\n\t\t\t]);\n\t\t};\n\n\t\tconst defaultRender = ({ row, column, $index }: { row: DefaultRow; column: TableColumnCtx<DefaultRow>; $index: number }): VNode[] => {\n\t\t\tif (props.type === \"timeInfo\") {\n\t\t\t\treturn timeInfoRender(row, column, $index);\n\t\t\t}\n\t\t\tif (props.tag) {\n\t\t\t\treturn tagRender(row, column, $index);\n\t\t\t}\n\t\t\tif (props.type === \"date\" || props.type === \"time\" || props.type === \"dateTime\") {\n\t\t\t\treturn dateRender(row, column, $index);\n\t\t\t}\n\t\t\tif (\n\t\t\t\tprops.type === \"d2\" ||\n\t\t\t\tprops.type === \"d4\" ||\n\t\t\t\tprops.type === \"d6\" ||\n\t\t\t\tprops.type === \"gd2\" ||\n\t\t\t\tprops.type === \"gd4\" ||\n\t\t\t\tprops.type === \"gd6\"\n\t\t\t) {\n\t\t\t\treturn numberRender(row, column, $index);\n\t\t\t}\n\t\t\tif (props.link) {\n\t\t\t\treturn linkRender(row, column, $index);\n\t\t\t}\n\t\t\tif (props.render) {\n\t\t\t\treturn autoWidthRender(props.render({ row, column: columnCtx.value, $index, ...getTableDefaultSlots(tableState) }));\n\t\t\t}\n\t\t\tif (props.slot) {\n\t\t\t\treturn autoWidthRender(slots[props.slot]?.({ row, column: columnCtx.value, $index, ...getTableDefaultSlots(tableState) }) ?? []);\n\t\t\t}\n\t\t\tconst renderValue = formatterRender(row, column, row[props.prop ?? \"\"], $index);\n\t\t\treturn autoWidthRender([\n\t\t\t\t<Fragment>\n\t\t\t\t\t{copyRender(renderValue)}\n\t\t\t\t\t{renderValue}\n\t\t\t\t</Fragment>,\n\t\t\t]);\n\t\t};\n\n\t\tlet elTableColumnProps: ComputedRef<TableColumnCtx<DefaultRow>> = useProps(props, tableColumnProps, [\n\t\t\t\"type\",\n\t\t\t\"width\",\n\t\t\t\"minWidth\",\n\t\t\t\"sortable\",\n\t\t\t\"sortOrders\",\n\t\t\t\"resizable\",\n\t\t\t\"showOverflowTooltip\",\n\t\t]) as unknown as ComputedRef<TableColumnCtx<DefaultRow>>;\n\n\t\twatch(\n\t\t\t() => props,\n\t\t\t() => {\n\t\t\t\telTableColumnProps = useProps(props, tableColumnProps, [\n\t\t\t\t\t\"type\",\n\t\t\t\t\t\"className\",\n\t\t\t\t\t\"minWidth\",\n\t\t\t\t\t\"sortable\",\n\t\t\t\t\t\"sortOrders\",\n\t\t\t\t\t\"resizable\",\n\t\t\t\t\t\"showOverflowTooltip\",\n\t\t\t\t]) as unknown as ComputedRef<TableColumnCtx<DefaultRow>>;\n\t\t\t}\n\t\t);\n\n\t\tuseRender(() => (\n\t\t\t<Fragment>\n\t\t\t\t{\n\t\t\t\t\t// 如果有配置多级表头的数据,则递归该组件\n\t\t\t\t\tprops._children?.length ? (\n\t\t\t\t\t\t<ElTableColumn\n\t\t\t\t\t\t\t{...elTableColumnProps.value}\n\t\t\t\t\t\t\tclassName={getClassName()}\n\t\t\t\t\t\t\tminWidth={getWidth(\"auto\")}\n\t\t\t\t\t\t\tsortable={props.sortable ? \"custom\" : false}\n\t\t\t\t\t\t\tsortOrders={props.sortOrders ?? [\"descending\", \"ascending\", null]}\n\t\t\t\t\t\t\tresizable={props.resizable && !props.autoWidth}\n\t\t\t\t\t\t\tshowOverflowTooltip={(props.showOverflowTooltip ?? true) && !props.autoWidth && props.type === \"default\"}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\theader: ({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number }) =>\n\t\t\t\t\t\t\t\t\theaderRender({ column, $index }),\n\t\t\t\t\t\t\t\tdefault: () =>\n\t\t\t\t\t\t\t\t\t(props._children ?? []).map((col: FaTableColumnCtx) =>\n\t\t\t\t\t\t\t\t\t\th(\n\t\t\t\t\t\t\t\t\t\t\tresolveComponent(\"FaTableColumn\"),\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t...col,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\tslots\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</ElTableColumn>\n\t\t\t\t\t) : props.type === \"image\" ? (\n\t\t\t\t\t\t<ElTableColumn\n\t\t\t\t\t\t\t{...elTableColumnProps.value}\n\t\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\t\tclassName=\"fa-table__image-column\"\n\t\t\t\t\t\t\tminWidth=\"50px\"\n\t\t\t\t\t\t\tsortable={false}\n\t\t\t\t\t\t\tresizable={false}\n\t\t\t\t\t\t\tshowOverflowTooltip={false}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\theader: ({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number }) =>\n\t\t\t\t\t\t\t\t\theaderRender({ column, $index }),\n\t\t\t\t\t\t\t\tdefault: ({ row }: { row: DefaultRow; column: TableColumnCtx<DefaultRow>; $index: number }) =>\n\t\t\t\t\t\t\t\t\trow[props.prop ?? \"\"] ? (\n\t\t\t\t\t\t\t\t\t\tprops.hideImage ? (\n\t\t\t\t\t\t\t\t\t\t\t<ElImage\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"fa-image\"\n\t\t\t\t\t\t\t\t\t\t\t\tlazy\n\t\t\t\t\t\t\t\t\t\t\t\tsrc={artwork}\n\t\t\t\t\t\t\t\t\t\t\t\tfit=\"cover\"\n\t\t\t\t\t\t\t\t\t\t\t\tpreviewSrcList={[displayText(row[props.prop ?? \"\"])]}\n\t\t\t\t\t\t\t\t\t\t\t\tcloseOnPressEscape\n\t\t\t\t\t\t\t\t\t\t\t\thideOnClickModal\n\t\t\t\t\t\t\t\t\t\t\t\tpreviewTeleported\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<FaImage lazy src={displayText(row[props.prop ?? \"\"])} fit=\"cover\" original={props.originalImage} thumb />\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<ElImage class=\"fa-image\" lazy src={notImage} fit=\"cover\" />\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</ElTableColumn>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t// 其他正常的列\n\t\t\t\t\t\t<ElTableColumn\n\t\t\t\t\t\t\t{...elTableColumnProps.value}\n\t\t\t\t\t\t\ttype={props.type === \"selection\" || props.type === \"index\" || props.type === \"expand\" ? props.type : \"default\"}\n\t\t\t\t\t\t\tclassName={getClassName()}\n\t\t\t\t\t\t\tminWidth={getWidth(\"auto\")}\n\t\t\t\t\t\t\tsortable={props.sortable ? \"custom\" : false}\n\t\t\t\t\t\t\tsortOrders={props.sortOrders ?? [\"descending\", \"ascending\", null]}\n\t\t\t\t\t\t\tresizable={props.resizable && !props.autoWidth}\n\t\t\t\t\t\t\tshowOverflowTooltip={(props.showOverflowTooltip ?? true) && !props.autoWidth && props.type === \"default\"}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\theader: ({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number }) =>\n\t\t\t\t\t\t\t\t\tslots.header\n\t\t\t\t\t\t\t\t\t\t? slots.header({ column: columnCtx.value, $index, ...getTableDefaultSlots(tableState) })\n\t\t\t\t\t\t\t\t\t\t: headerRender({ column, $index }),\n\t\t\t\t\t\t\t\tdefault: ({ row, column, $index }: { row: DefaultRow; column: TableColumnCtx<DefaultRow>; $index: number }) =>\n\t\t\t\t\t\t\t\t\tslots.default\n\t\t\t\t\t\t\t\t\t\t? slots.default({ row, column: columnCtx.value, $index, ...getTableDefaultSlots(tableState) })\n\t\t\t\t\t\t\t\t\t\t: defaultRender({ row, column, $index }),\n\t\t\t\t\t\t\t\tfilterIcon: ({ filterOpened }: { filterOpened: boolean }) =>\n\t\t\t\t\t\t\t\t\tslots.filterIcon?.({ filterOpened, ...getTableDefaultSlots(tableState) }),\n\t\t\t\t\t\t\t\texpand: ({ expanded }: { expanded: boolean }) => slots.expand?.({ expanded, ...getTableDefaultSlots(tableState) }),\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</ElTableColumn>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t</Fragment>\n\t\t));\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,SAAA,QAAA,GAAA;CAAA,O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UAAU;GAAE,CAAC;EAAC,CAAA,CAGpH,CAAA,CAGH;CACF;AACD,CAAC"}
1
+ {"version":3,"file":"tableColumn.mjs","names":[],"sources":["../../../../src/components/table/src/tableColumn.tsx"],"sourcesContent":["import { Fragment, computed, defineComponent, h, inject, resolveComponent } from \"vue\";\nimport { CopyDocument } from \"@element-plus/icons-vue\";\nimport { ElIcon, ElImage, ElMessage, ElTableColumn, ElTag, ElText, dayjs, useGlobalSize } from \"element-plus\";\nimport { copy as copyToClipboard, definePropType, formatChineseRelativeTime, makeSlots, useProps, useRender } from \"../../../utils\";\nimport FaImage from \"../../image\";\nimport artwork from \"../images/artwork.png\";\nimport notImage from \"../images/notImage.png\";\nimport { tableUtil } from \"../utils/table\";\nimport { getTableDefaultSlots } from \"./table.type\";\nimport { enumMapKey, tableStateKey } from \"./useTable\";\nimport type { TableColumnCtx } from \"element-plus\";\nimport type { PropType, VNode } from \"vue\";\nimport type { DefaultRow } from \"./table.state\";\nimport type {\n\tFaTableColumnCtx,\n\tFaTableColumnDateFormat,\n\tFaTableColumnType,\n\tFaTableDefaultSlotsResult,\n\tFaTableEnumColumnCtx,\n\tFaTableEnumColumnType,\n} from \"./table.type\";\n\n/** FaTableColumn 的运行时 Props 定义。 */\nexport const tableColumnProps = {\n\t/**\n\t * @description type of the column. If set to `selection`, the column will display checkbox. If set to `index`, the column will display index of the row (staring from 1). If set to `expand`, the column will display expand icon\n\t */\n\ttype: {\n\t\ttype: String,\n\t\tdefault: \"default\",\n\t},\n\t/**\n\t * @description column label\n\t */\n\tlabel: String,\n\t/**\n\t * @description class name of cells in the column\n\t */\n\tclassName: String,\n\t/**\n\t * @description class name of the label of this column\n\t */\n\tlabelClassName: String,\n\t/**\n\t * @description\n\t */\n\tproperty: String,\n\t/**\n\t * @description field name. You can also use its alias: `property`\n\t */\n\tprop: String,\n\t/**\n\t * @description column width\n\t */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"\",\n\t},\n\t/**\n\t * @description column minimum width. Columns with `width` has a fixed width, while columns with `min-width` has a width that is distributed in proportion\n\t */\n\tminWidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"\",\n\t},\n\t/**\n\t * @description render function for table header of this column\n\t */\n\trenderHeader: Function as PropType<TableColumnCtx<DefaultRow>[\"renderHeader\"]>,\n\t/**\n\t * @description whether column can be sorted. Remote sorting can be done by setting this attribute to 'custom' and listening to the `sort-change` event of Table\n\t */\n\tsortable: {\n\t\ttype: [Boolean, String],\n\t\tdefault: false,\n\t},\n\t/**\n\t * @description sorting method, works when `sortable` is `true`. Should return a number, just like Array.sort\n\t */\n\tsortMethod: Function as PropType<TableColumnCtx<DefaultRow>[\"sortMethod\"]>,\n\t/**\n\t * @description specify which property to sort by, works when `sortable` is `true` and `sort-method` is `undefined`. If set to an Array, the column will sequentially sort by the next property if the previous one is equal\n\t */\n\tsortBy: [String, Function, Array] as PropType<TableColumnCtx<DefaultRow>[\"sortBy\"]>,\n\t/**\n\t * @description whether column width can be resized, works when `border` of `el-table` is `true`\n\t */\n\tresizable: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description column's key. If you need to use the filter-change event, you need this attribute to identify which column is being filtered\n\t */\n\tcolumnKey: String,\n\t/**\n\t * @description alignment, the value should be 'left' \\/ 'center' \\/ 'right'\n\t */\n\talign: String,\n\t/**\n\t * @description alignment of the table header. If omitted, the value of the above `align` attribute will be applied, the value should be 'left' \\/ 'center' \\/ 'right'\n\t */\n\theaderAlign: String,\n\t/**\n\t * @description whether to hide extra content and show them in a tooltip when hovering on the cell\n\t */\n\tshowOverflowTooltip: {\n\t\ttype: [Boolean, Object] as PropType<TableColumnCtx<DefaultRow>[\"showOverflowTooltip\"]>,\n\t\tdefault: undefined,\n\t},\n\t/** @description function that formats cell tooltip content, works when show-overflow-tooltip is enabled */\n\ttooltipFormatter: Function as PropType<TableColumnCtx<DefaultRow>[\"tooltipFormatter\"]>,\n\t/**\n\t * @description whether column is fixed at left / right. Will be fixed at left if `true`\n\t */\n\tfixed: [Boolean, String],\n\t/**\n\t * @description function that formats cell content\n\t */\n\tformatter: Function as PropType<TableColumnCtx<DefaultRow>[\"formatter\"]>,\n\t/**\n\t * @description function that determines if a certain row can be selected, works when `type` is 'selection'\n\t */\n\tselectable: Function as PropType<TableColumnCtx<DefaultRow>[\"selectable\"]>,\n\t/**\n\t * @description whether to reserve selection after data refreshing, works when `type` is 'selection'. Note that `row-key` is required for this to work\n\t */\n\treserveSelection: Boolean,\n\t/**\n\t * @description data filtering method. If `filter-multiple` is on, this method will be called multiple times for each row, and a row will display if one of the calls returns `true`\n\t */\n\tfilterMethod: Function as PropType<TableColumnCtx<DefaultRow>[\"filterMethod\"]>,\n\t/**\n\t * @description filter value for selected data, might be useful when table header is rendered with `render-header`\n\t */\n\tfilteredValue: Array as PropType<TableColumnCtx<DefaultRow>[\"filteredValue\"]>,\n\t/**\n\t * @description an array of data filtering options. For each element in this array, `text` and `value` are required\n\t */\n\tfilters: Array as PropType<TableColumnCtx<DefaultRow>[\"filters\"]>,\n\t/**\n\t * @description placement for the filter dropdown\n\t */\n\tfilterPlacement: String,\n\t/**\n\t * @description whether data filtering supports multiple options\n\t */\n\tfilterMultiple: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * @description className for the filter dropdown\n\t */\n\tfilterClassName: String,\n\t/**\n\t * @description customize indices for each row, works on columns with `type=index`\n\t */\n\tindex: [Number, Function] as PropType<TableColumnCtx<DefaultRow>[\"index\"]>,\n\t/**\n\t * @description the order of the sorting strategies used when sorting the data, works when `sortable` is `true`. Accepts an array, as the user clicks on the header, the column is sorted in order of the elements in the array\n\t */\n\tsortOrders: {\n\t\ttype: Array as PropType<TableColumnCtx<DefaultRow>[\"sortOrders\"]>,\n\t\tdefault: () => {\n\t\t\treturn [\"ascending\", \"descending\", null];\n\t\t},\n\t\tvalidator: (val: unknown) => {\n\t\t\treturn Array.isArray(val) && val.every((order: unknown) => order === \"ascending\" || order === \"descending\" || order === null);\n\t\t},\n\t},\n};\n\n/** FaTableColumn 插槽返回的行列上下文。 */\nexport interface FaTableColumnSlotsResult {\n\t/** @description slots为表格内容的时候才会返回 */\n\trow?: DefaultRow;\n\t/** @description slot为表头内容的时候返回 'TableColumnCtx<DefaultRow>' 否则返回 'FaTableColumnCtx' */\n\tcolumn?: TableColumnCtx<DefaultRow> | FaTableColumnCtx;\n\t$index?: number;\n}\n\ntype FaTableColumnDefaultSlots = Record<string, FaTableDefaultSlotsResult & FaTableColumnSlotsResult>;\n\n/** FaTableColumn 的固定插槽和动态命名插槽。 */\nexport type FaTableColumnSlots = Record<string, unknown> & {\n\t/** @description 默认内容插槽 */\n\tdefault: FaTableDefaultSlotsResult & { row: DefaultRow; column: FaTableColumnCtx; $index: number };\n\t/** @description 自定义表头的内容 */\n\theader: FaTableDefaultSlotsResult & { column: FaTableColumnCtx; $index: number };\n\t/** @description 自定义 filter 图标 */\n\tfilterIcon: FaTableDefaultSlotsResult & { filterOpened: boolean };\n\t/** @description 展开列的自定义内容 */\n\texpand: FaTableDefaultSlotsResult & { expanded: boolean };\n} & FaTableColumnDefaultSlots;\n\nexport default defineComponent({\n\tname: \"FaTableColumn\",\n\tprops: {\n\t\t...tableColumnProps,\n\t\t/**\n\t\t * @description type of the column. If set to `selection`, the column will display checkbox. If set to `index`, the column will display index of the row (staring from 1). If set to `expand`, the column will display expand icon\n\t\t */\n\t\ttype: {\n\t\t\ttype: definePropType<FaTableColumnType>(String),\n\t\t\tdefault: \"default\",\n\t\t},\n\t\t/**\n\t\t * @description column width\n\t\t */\n\t\twidth: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: \"auto\",\n\t\t},\n\t\t/** @description alignment, the value should be 'left' \\/ 'center' \\/ 'right' */\n\t\talign: {\n\t\t\ttype: String,\n\t\t\tdefault: \"left\",\n\t\t},\n\t\t/** @description alignment of the table header. If omitted, the value of the above `align` attribute will be applied, the value should be 'left' \\/ 'center' \\/ 'right' */\n\t\theaderAlign: {\n\t\t\ttype: String,\n\t\t\tdefault: \"left\",\n\t\t},\n\t\t/** @description 是否显示在表格当中 */\n\t\tshow: Boolean,\n\t\t/** @description 小页面的宽度,如果为空,则继承默认宽度 */\n\t\tsmallWidth: {\n\t\t\ttype: [String, Number],\n\t\t},\n\t\t/** @description 自适应宽度 */\n\t\tautoWidth: Boolean,\n\t\t/** @description 插槽名称 */\n\t\tslot: String,\n\t\t/** @description 表格头部插槽名称 */\n\t\theaderSlot: String,\n\t\t/** @description 自定义表头内容渲染(tsx语法) */\n\t\theaderRender: {\n\t\t\ttype: definePropType<({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number } & FaTableDefaultSlotsResult) => VNode[]>(\n\t\t\t\tFunction\n\t\t\t),\n\t\t},\n\t\t/** @description 自定义单元格内容渲染(tsx语法) */\n\t\trender: {\n\t\t\ttype: definePropType<\n\t\t\t\t({ row, column, $index }: { row: DefaultRow; column: FaTableColumnCtx; $index: number } & FaTableDefaultSlotsResult) => VNode[]\n\t\t\t>(Function),\n\t\t},\n\t\t/** @description 多级表头 */\n\t\t_children: {\n\t\t\ttype: definePropType<FaTableColumnCtx[]>(Array),\n\t\t},\n\t\t/** @description 隐藏图片 */\n\t\thideImage: Boolean,\n\t\t/** @description 复制 */\n\t\tcopy: Boolean,\n\t\t/** @description 是否为 Link Button */\n\t\tlink: Boolean,\n\t\t/** @description 合并行字段 */\n\t\tspanProp: String,\n\t\t/** @description Link 按钮的点击事件,优先级最高 */\n\t\tclick: {\n\t\t\ttype: definePropType<({ row, $index }: { row: DefaultRow; $index?: number } & FaTableDefaultSlotsResult) => void>(Function),\n\t\t},\n\t\t/** @description 点击Emits事件回调 */\n\t\tclickEmit: String,\n\t\t/** @description 图片列是否显示为原图,默认 false 显示缩略图 */\n\t\toriginalImage: Boolean,\n\t\t/** @description 显示时间格式化字符串 */\n\t\tdateFix: Boolean,\n\t\t/** @description 显示在页面中的日期格式 */\n\t\tdateFormat: {\n\t\t\ttype: definePropType<FaTableColumnDateFormat>(String),\n\t\t},\n\t\t/** @description 是否是标签展示 */\n\t\ttag: Boolean,\n\t\t/** @description 枚举类型(渲染值的字典) */\n\t\tenum: {\n\t\t\ttype: definePropType<FaTableEnumColumnType>([String, Array, Function]),\n\t\t},\n\t\t/** @description 数据删除字段,如果为 true 会显示遮罩层 */\n\t\tdataDeleteField: String,\n\t\t/** @description 时间信息字段 */\n\t\ttimeInfoField: {\n\t\t\ttype: definePropType<{ userName?: string; time?: string }>(Object),\n\t\t\tdefault: () => ({\n\t\t\t\tuserName: \"createdUserName\",\n\t\t\t\ttime: \"createdTime\",\n\t\t\t}),\n\t\t},\n\t},\n\temits: {\n\t\t/** @description 图片预览 */\n\t\timagePreview: (url: string) => typeof url === \"string\",\n\t\t/** @description 自定义单元格点击事件 */\n\t\tcustomCellClick: (emitName: string, { row, column, $index }: { row: DefaultRow; column: FaTableColumnCtx; $index: number }) =>\n\t\t\t(emitName == null || typeof emitName === \"string\") &&\n\t\t\ttypeof row === \"object\" &&\n\t\t\trow !== null &&\n\t\t\ttypeof column === \"object\" &&\n\t\t\tcolumn !== null &&\n\t\t\ttypeof $index === \"number\",\n\t},\n\tslots: makeSlots<FaTableColumnSlots>(),\n\tsetup(props, { slots, emit }) {\n\t\tconst globalSize = useGlobalSize();\n\t\tconst tableState = inject(tableStateKey);\n\t\tconst enumMap = inject(enumMapKey);\n\t\tif (tableState === undefined || enumMap === undefined) {\n\t\t\tthrow new Error(\"FaTableColumn 必须在 FaTable 内部渲染。\");\n\t\t}\n\n\t\tconst columnCtx = computed(() => props as FaTableColumnCtx);\n\n\t\t/** 获取ClassName */\n\t\tconst getClassName = () => {\n\t\t\tlet className = \"\";\n\t\t\tif (props.type === \"timeInfo\") {\n\t\t\t\tclassName += \"fa-table__line-height-normal-column\";\n\t\t\t}\n\t\t\tif (props.type === \"date\" || props.type === \"time\" || props.type === \"dateTime\") {\n\t\t\t\tif (props.dateFix) {\n\t\t\t\t\tclassName += \"fa-table__line-height-normal-column\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (props.className) {\n\t\t\t\treturn `${className} ${props.className}`;\n\t\t\t}\n\t\t\treturn className;\n\t\t};\n\n\t\t/** 获取宽度 */\n\t\tconst getWidth = (defAttr: string) => {\n\t\t\tif (props.autoWidth) {\n\t\t\t\tconst autoWidthEntry = tableState.autoColumnWidth.find((f) => f.prop === props.prop);\n\t\t\t\treturn autoWidthEntry ? `${autoWidthEntry.width}px` : \"auto\";\n\t\t\t}\n\t\t\tif (globalSize.value === \"small\") {\n\t\t\t\treturn props.smallWidth || props.width || props.minWidth || defAttr;\n\t\t\t}\n\t\t\treturn props.width || props.minWidth || defAttr;\n\t\t};\n\n\t\t/** 表头自动宽度渲染 */\n\t\tconst autoWidthHeaderRender = (el: VNode[]) => {\n\t\t\tif (props.autoWidth) {\n\t\t\t\treturn [\n\t\t\t\t\t<div class={[\"fa-table__auto-width-column__cell-header\", `__fa-table__auto-width-column__cell-header__${props.prop}`]}>{el}</div>,\n\t\t\t\t];\n\t\t\t} else {\n\t\t\t\treturn el;\n\t\t\t}\n\t\t};\n\n\t\t/** 自动宽度渲染 */\n\t\tconst autoWidthRender = (el: VNode[]) => {\n\t\t\tif (props.autoWidth) {\n\t\t\t\treturn [<div class={[\"fa-table__auto-width-column__cell\", `__fa-table__auto-width-column__cell__${props.prop}`]}>{el}</div>];\n\t\t\t} else {\n\t\t\t\treturn el;\n\t\t\t}\n\t\t};\n\n\t\t/** 表头渲染 */\n\t\tconst headerRender = ({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number }) => {\n\t\t\tif (props.headerRender) {\n\t\t\t\treturn autoWidthHeaderRender(props.headerRender({ column, $index, ...getTableDefaultSlots(tableState) }));\n\t\t\t} else if (props.headerSlot) {\n\t\t\t\treturn autoWidthHeaderRender(slots[props.headerSlot]?.({ column, $index, ...getTableDefaultSlots(tableState) }) ?? []);\n\t\t\t} else {\n\t\t\t\treturn autoWidthHeaderRender([<span>{props.label}</span>]);\n\t\t\t}\n\t\t};\n\n\t\t/** 复制渲染 */\n\t\tconst displayText = (value: unknown) => {\n\t\t\tif (typeof value === \"string\") return value;\n\t\t\tif (typeof value === \"number\" || typeof value === \"bigint\" || typeof value === \"boolean\") return String(value);\n\t\t\treturn \"\";\n\t\t};\n\n\t\tconst copyRender = (value: unknown, copy?: boolean) => {\n\t\t\tif (!(props.copy || copy) || !value) return [];\n\n\t\t\treturn [\n\t\t\t\t<ElIcon\n\t\t\t\t\tclass=\"fa__copy-icon\"\n\t\t\t\t\ttitle=\"复制\"\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tcopyToClipboard(displayText(value)).then(\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tElMessage({\n\t\t\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\t\t\tmessage: \"复制成功\",\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tElMessage({\n\t\t\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\t\t\tmessage: \"复制失败\",\n\t\t\t\t\t\t\t\t});\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\t\t<CopyDocument />\n\t\t\t\t</ElIcon>,\n\t\t\t];\n\t\t};\n\n\t\t/** 渲染单元格数据 */\n\t\tconst renderCellData = ({ row }: { row: DefaultRow }) => {\n\t\t\tconst cellValue: unknown = tableUtil.handleRowAccordingToProp(row, props.prop ?? \"\");\n\n\t\t\tlet enumData: FaTableEnumColumnCtx[] | undefined;\n\n\t\t\tif (typeof props.enum === \"string\") {\n\t\t\t\tenumData = enumMap.get(props.enum);\n\t\t\t} else if (Array.isArray(props.enum)) {\n\t\t\t\tenumData = props.enum;\n\t\t\t} else if (typeof props.enum === \"function\") {\n\t\t\t\tenumData = props.enum({ row });\n\t\t\t}\n\n\t\t\tif (enumData) {\n\t\t\t\treturn tableUtil.filterEnum(cellValue, enumData);\n\t\t\t} else {\n\t\t\t\treturn tableUtil.formatValue(cellValue);\n\t\t\t}\n\t\t};\n\n\t\t/** 格式化渲染 */\n\t\tconst formatterRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, cellValue: unknown, index: number) => {\n\t\t\tconst formatter = column.formatter as TableColumnCtx<DefaultRow>[\"formatter\"] | null | undefined;\n\t\t\tif (formatter) {\n\t\t\t\treturn formatter(row, column, cellValue, index);\n\t\t\t} else {\n\t\t\t\treturn displayText(cellValue);\n\t\t\t}\n\t\t};\n\n\t\t/** 时间信息列渲染 */\n\t\tconst timeInfoRender = (row: DefaultRow, _column: TableColumnCtx<DefaultRow>, _$index: number) => {\n\t\t\tconst userName = displayText(row[props.timeInfoField.userName ?? \"createdUserName\"]);\n\t\t\tconst time = displayText(row[props.timeInfoField.time ?? \"createdTime\"]);\n\t\t\treturn [\n\t\t\t\t<Fragment>\n\t\t\t\t\t<div style=\"white-space: nowrap; overflow: hidden; text-overflow: ellipsis;\" title={time}>\n\t\t\t\t\t\t{userName && <span style=\"margin-right: 5px;\">{userName}</span>}\n\t\t\t\t\t\t<span>{time}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t{time && (\n\t\t\t\t\t\t<ElTag type=\"info\" round effect=\"light\" size=\"small\">\n\t\t\t\t\t\t\t{formatChineseRelativeTime(time)}\n\t\t\t\t\t\t</ElTag>\n\t\t\t\t\t)}\n\t\t\t\t</Fragment>,\n\t\t\t];\n\t\t};\n\n\t\t/** 标签列渲染 */\n\t\tconst tagRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, $index: number) => {\n\t\t\tconst renderValue = formatterRender(row, column, renderCellData({ row }), $index);\n\n\t\t\tlet enumData: FaTableEnumColumnCtx[] | undefined;\n\n\t\t\tif (typeof props.enum === \"string\") {\n\t\t\t\tenumData = enumMap.get(props.enum);\n\t\t\t} else if (Array.isArray(props.enum)) {\n\t\t\t\tenumData = props.enum;\n\t\t\t} else if (typeof props.enum === \"function\") {\n\t\t\t\tenumData = props.enum({ row });\n\t\t\t}\n\n\t\t\tconst enumValue: unknown = tableUtil.handleRowAccordingToProp(row, props.prop ?? \"\");\n\t\t\tconst type = enumData?.find((item) => item.value === enumValue)?.type ?? \"info\";\n\t\t\treturn [\n\t\t\t\t<Fragment>\n\t\t\t\t\t{copyRender(renderValue)}\n\t\t\t\t\t{renderValue ? <ElTag type={type}>{renderValue}</ElTag> : null}\n\t\t\t\t</Fragment>,\n\t\t\t];\n\t\t};\n\n\t\t/** 时间列渲染 */\n\t\tconst dateRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, $index: number) => {\n\t\t\tlet dateFormat;\n\t\t\tswitch (props.type) {\n\t\t\t\tcase \"date\":\n\t\t\t\t\tdateFormat = \"YYYY-MM-DD\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"time\":\n\t\t\t\t\tdateFormat = \"HH:mm:ss\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"dateTime\":\n\t\t\t\t\tdateFormat = \"YYYY-MM-DD HH:mm:ss\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"default\":\n\t\t\t\tcase \"index\":\n\t\t\t\tcase \"selection\":\n\t\t\t\tcase \"expand\":\n\t\t\t\tcase \"image\":\n\t\t\t\tcase \"d2\":\n\t\t\t\tcase \"d4\":\n\t\t\t\tcase \"d6\":\n\t\t\t\tcase \"gd2\":\n\t\t\t\tcase \"gd4\":\n\t\t\t\tcase \"gd6\":\n\t\t\t\tcase \"timeInfo\":\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tconst rawValue: unknown = row[props.prop ?? \"\"];\n\t\t\tconst renderValue = rawValue\n\t\t\t\t? formatterRender(row, column, dayjs(rawValue as Parameters<typeof dayjs>[0]).format(props.dateFormat ?? dateFormat), $index)\n\t\t\t\t: null;\n\t\t\treturn [\n\t\t\t\t<Fragment>\n\t\t\t\t\t{copyRender(renderValue)}\n\t\t\t\t\t{renderValue}\n\t\t\t\t\t{props.dateFix && renderValue && (\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<ElTag type=\"info\" round effect=\"light\" size=\"small\">\n\t\t\t\t\t\t\t\t{formatChineseRelativeTime(displayText(renderValue))}\n\t\t\t\t\t\t\t</ElTag>\n\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t)}\n\t\t\t\t</Fragment>,\n\t\t\t];\n\t\t};\n\n\t\t/** 数值列渲染 */\n\t\tconst numberRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, $index: number) => {\n\t\t\tconst renderValue: unknown = row[props.prop ?? \"\"];\n\t\t\tif (!renderValue || typeof renderValue !== \"number\") {\n\t\t\t\treturn [<Fragment>{formatterRender(row, column, renderValue, $index)}</Fragment>];\n\t\t\t}\n\t\t\tlet useGrouping = false;\n\t\t\tlet maximumFractionDigits = 2;\n\t\t\tswitch (props.type) {\n\t\t\t\tcase \"d2\":\n\t\t\t\t\tmaximumFractionDigits = 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"d4\":\n\t\t\t\t\tmaximumFractionDigits = 4;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"d6\":\n\t\t\t\t\tmaximumFractionDigits = 6;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"gd2\":\n\t\t\t\t\tmaximumFractionDigits = 2;\n\t\t\t\t\tuseGrouping = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"gd4\":\n\t\t\t\t\tmaximumFractionDigits = 4;\n\t\t\t\t\tuseGrouping = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"gd6\":\n\t\t\t\t\tmaximumFractionDigits = 6;\n\t\t\t\t\tuseGrouping = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"default\":\n\t\t\t\tcase \"index\":\n\t\t\t\tcase \"selection\":\n\t\t\t\tcase \"expand\":\n\t\t\t\tcase \"image\":\n\t\t\t\tcase \"date\":\n\t\t\t\tcase \"time\":\n\t\t\t\tcase \"dateTime\":\n\t\t\t\tcase \"timeInfo\":\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn [\n\t\t\t\t<Fragment>\n\t\t\t\t\t{formatterRender(\n\t\t\t\t\t\trow,\n\t\t\t\t\t\tcolumn,\n\t\t\t\t\t\trenderValue.toLocaleString(\"zh-CN\", {\n\t\t\t\t\t\t\tminimumFractionDigits: 2,\n\t\t\t\t\t\t\tmaximumFractionDigits,\n\t\t\t\t\t\t\tuseGrouping,\n\t\t\t\t\t\t}),\n\t\t\t\t\t\t$index\n\t\t\t\t\t)}\n\t\t\t\t</Fragment>,\n\t\t\t];\n\t\t};\n\n\t\t/** 链接列渲染 */\n\t\tconst linkRender = (row: DefaultRow, column: TableColumnCtx<DefaultRow>, $index: number) => {\n\t\t\tconst renderValue = formatterRender(row, column, row[props.prop ?? \"\"], $index);\n\t\t\treturn autoWidthRender([\n\t\t\t\t<Fragment>\n\t\t\t\t\t{copyRender(renderValue)}\n\t\t\t\t\t{renderValue && (\n\t\t\t\t\t\t<ElText\n\t\t\t\t\t\t\tclass={\"el-link is-hover-underline fa-table__link-column__text\"}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t// 数据删除拦截点击\n\t\t\t\t\t\t\t\tif (props.dataDeleteField && row[props.dataDeleteField] === true) return;\n\t\t\t\t\t\t\t\tif (props.click) {\n\t\t\t\t\t\t\t\t\tprops.click({ row, $index, ...getTableDefaultSlots(tableState) });\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\temit(\"customCellClick\", props.clickEmit ?? \"\", {\n\t\t\t\t\t\t\t\t\t\trow,\n\t\t\t\t\t\t\t\t\t\tcolumn: columnCtx.value,\n\t\t\t\t\t\t\t\t\t\t$index,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{renderValue}\n\t\t\t\t\t\t</ElText>\n\t\t\t\t\t)}\n\t\t\t\t</Fragment>,\n\t\t\t]);\n\t\t};\n\n\t\tconst defaultRender = ({ row, column, $index }: { row: DefaultRow; column: TableColumnCtx<DefaultRow>; $index: number }) => {\n\t\t\tif (props.type === \"timeInfo\") {\n\t\t\t\treturn timeInfoRender(row, column, $index);\n\t\t\t}\n\t\t\tif (props.tag) {\n\t\t\t\treturn tagRender(row, column, $index);\n\t\t\t}\n\t\t\tif (props.type === \"date\" || props.type === \"time\" || props.type === \"dateTime\") {\n\t\t\t\treturn dateRender(row, column, $index);\n\t\t\t}\n\t\t\tif (\n\t\t\t\tprops.type === \"d2\" ||\n\t\t\t\tprops.type === \"d4\" ||\n\t\t\t\tprops.type === \"d6\" ||\n\t\t\t\tprops.type === \"gd2\" ||\n\t\t\t\tprops.type === \"gd4\" ||\n\t\t\t\tprops.type === \"gd6\"\n\t\t\t) {\n\t\t\t\treturn numberRender(row, column, $index);\n\t\t\t}\n\t\t\tif (props.link) {\n\t\t\t\treturn linkRender(row, column, $index);\n\t\t\t}\n\t\t\tif (props.render) {\n\t\t\t\treturn autoWidthRender(props.render({ row, column: columnCtx.value, $index, ...getTableDefaultSlots(tableState) }));\n\t\t\t}\n\t\t\tif (props.slot) {\n\t\t\t\treturn autoWidthRender(slots[props.slot]?.({ row, column: columnCtx.value, $index, ...getTableDefaultSlots(tableState) }) ?? []);\n\t\t\t}\n\t\t\tconst renderValue = formatterRender(row, column, row[props.prop ?? \"\"], $index);\n\t\t\treturn autoWidthRender([\n\t\t\t\t<Fragment>\n\t\t\t\t\t{copyRender(renderValue)}\n\t\t\t\t\t{renderValue}\n\t\t\t\t</Fragment>,\n\t\t\t]);\n\t\t};\n\n\t\tconst elTableColumnProps = useProps(props, tableColumnProps, [\n\t\t\t\"type\",\n\t\t\t\"width\",\n\t\t\t\"minWidth\",\n\t\t\t\"sortable\",\n\t\t\t\"sortOrders\",\n\t\t\t\"resizable\",\n\t\t\t\"showOverflowTooltip\",\n\t\t]);\n\n\t\tuseRender(() => (\n\t\t\t<Fragment>\n\t\t\t\t{\n\t\t\t\t\t// 如果有配置多级表头的数据,则递归该组件\n\t\t\t\t\tprops._children?.length ? (\n\t\t\t\t\t\t<ElTableColumn\n\t\t\t\t\t\t\t{...elTableColumnProps.value}\n\t\t\t\t\t\t\tclassName={getClassName()}\n\t\t\t\t\t\t\tminWidth={getWidth(\"auto\")}\n\t\t\t\t\t\t\tsortable={props.sortable ? \"custom\" : false}\n\t\t\t\t\t\t\tsortOrders={props.sortOrders}\n\t\t\t\t\t\t\tresizable={props.resizable && !props.autoWidth}\n\t\t\t\t\t\t\tshowOverflowTooltip={(props.showOverflowTooltip ?? true) && !props.autoWidth && props.type === \"default\"}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\theader: ({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number }) =>\n\t\t\t\t\t\t\t\t\theaderRender({ column, $index }),\n\t\t\t\t\t\t\t\tdefault: () =>\n\t\t\t\t\t\t\t\t\t(props._children ?? []).map((col: FaTableColumnCtx) =>\n\t\t\t\t\t\t\t\t\t\th(\n\t\t\t\t\t\t\t\t\t\t\tresolveComponent(\"FaTableColumn\"),\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t...col,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\tslots\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</ElTableColumn>\n\t\t\t\t\t) : props.type === \"image\" ? (\n\t\t\t\t\t\t<ElTableColumn\n\t\t\t\t\t\t\t{...elTableColumnProps.value}\n\t\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\t\tclassName=\"fa-table__image-column\"\n\t\t\t\t\t\t\tminWidth=\"50px\"\n\t\t\t\t\t\t\tsortable={false}\n\t\t\t\t\t\t\tresizable={false}\n\t\t\t\t\t\t\tshowOverflowTooltip={false}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\theader: ({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number }) =>\n\t\t\t\t\t\t\t\t\theaderRender({ column, $index }),\n\t\t\t\t\t\t\t\tdefault: ({ row }: { row: DefaultRow; column: TableColumnCtx<DefaultRow>; $index: number }) =>\n\t\t\t\t\t\t\t\t\trow[props.prop ?? \"\"] ? (\n\t\t\t\t\t\t\t\t\t\tprops.hideImage ? (\n\t\t\t\t\t\t\t\t\t\t\t<ElImage\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"fa-image\"\n\t\t\t\t\t\t\t\t\t\t\t\tlazy\n\t\t\t\t\t\t\t\t\t\t\t\tsrc={artwork}\n\t\t\t\t\t\t\t\t\t\t\t\tfit=\"cover\"\n\t\t\t\t\t\t\t\t\t\t\t\tpreviewSrcList={[displayText(row[props.prop ?? \"\"])]}\n\t\t\t\t\t\t\t\t\t\t\t\tcloseOnPressEscape\n\t\t\t\t\t\t\t\t\t\t\t\thideOnClickModal\n\t\t\t\t\t\t\t\t\t\t\t\tpreviewTeleported\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<FaImage lazy src={displayText(row[props.prop ?? \"\"])} fit=\"cover\" original={props.originalImage} thumb />\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<ElImage class=\"fa-image\" lazy src={notImage} fit=\"cover\" />\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</ElTableColumn>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t// 其他正常的列\n\t\t\t\t\t\t<ElTableColumn\n\t\t\t\t\t\t\t{...elTableColumnProps.value}\n\t\t\t\t\t\t\ttype={props.type === \"selection\" || props.type === \"index\" || props.type === \"expand\" ? props.type : \"default\"}\n\t\t\t\t\t\t\tclassName={getClassName()}\n\t\t\t\t\t\t\tminWidth={getWidth(\"auto\")}\n\t\t\t\t\t\t\tsortable={props.sortable ? \"custom\" : false}\n\t\t\t\t\t\t\tsortOrders={props.sortOrders}\n\t\t\t\t\t\t\tresizable={props.resizable && !props.autoWidth}\n\t\t\t\t\t\t\tshowOverflowTooltip={(props.showOverflowTooltip ?? true) && !props.autoWidth && props.type === \"default\"}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\theader: ({ column, $index }: { column: TableColumnCtx<DefaultRow>; $index: number }) =>\n\t\t\t\t\t\t\t\t\tslots.header\n\t\t\t\t\t\t\t\t\t\t? slots.header({ column: columnCtx.value, $index, ...getTableDefaultSlots(tableState) })\n\t\t\t\t\t\t\t\t\t\t: headerRender({ column, $index }),\n\t\t\t\t\t\t\t\tdefault: ({ row, column, $index }: { row: DefaultRow; column: TableColumnCtx<DefaultRow>; $index: number }) =>\n\t\t\t\t\t\t\t\t\tslots.default\n\t\t\t\t\t\t\t\t\t\t? slots.default({ row, column: columnCtx.value, $index, ...getTableDefaultSlots(tableState) })\n\t\t\t\t\t\t\t\t\t\t: defaultRender({ row, column, $index }),\n\t\t\t\t\t\t\t\tfilterIcon: ({ filterOpened }: { filterOpened: boolean }) =>\n\t\t\t\t\t\t\t\t\tslots.filterIcon?.({ filterOpened, ...getTableDefaultSlots(tableState) }),\n\t\t\t\t\t\t\t\texpand: ({ expanded }: { expanded: boolean }) => slots.expand?.({ expanded, ...getTableDefaultSlots(tableState) }),\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t</ElTableColumn>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t</Fragment>\n\t\t));\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;;;AAsBA,SAAA,QAAA,GAAA;CAAA,OAAA,OAAA,MAAA,cAAA,OAAA,UAAA,SAAA,KAAA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QAAA;IAAA,OAMlC,YAAY,IAAI,MAAM,QAAQ,GAAG;IAAC,OAAA;IAAA,YAAwB,MAAM;IAAa,SAAA;GAAA,GAAA,IAAA,IAChG,YAAA,SAAA;IAAA,SAAA;IAAA,QAAA;IAAA,OAEmC;IAAQ,OAAA;GAAA,GAAA,IAAA;EAC5C,CAAA,IAIJ,YAAA,eAAA,WAEK,mBAAmB,OAAK;GAAA,QACtB,MAAM,SAAS,eAAe,MAAM,SAAS,WAAW,MAAM,SAAS,WAAW,MAAM,OAAO;GAAS,aACnG,aAAa;GAAC,YACf,SAAS,MAAM;GAAC,YAChB,MAAM,WAAW,WAAW;GAAK,cAC/B,MAAM;GAAU,aACjB,MAAM,aAAa,CAAC,MAAM;GAAS,wBACxB,MAAM,uBAAuB,SAAS,CAAC,MAAM,aAAa,MAAM,SAAS;EAAS,CAAA,GAAA;GAGvG,SAAS,EAAE,QAAQ,aAClB,MAAM,SACH,MAAM,OAAO;IAAE,QAAQ,UAAU;IAAO;IAAQ,GAAG,qBAAqB,UAAU;GAAE,CAAC,IACrF,aAAa;IAAE;IAAQ;GAAO,CAAC;GACnC,UAAU,EAAE,KAAK,QAAQ,aACxB,MAAM,UACH,MAAM,QAAQ;IAAE;IAAK,QAAQ,UAAU;IAAO;IAAQ,GAAG,qBAAqB,UAAU;GAAE,CAAC,IAC3F,cAAc;IAAE;IAAK;IAAQ;GAAO,CAAC;GACzC,aAAa,EAAE,mBACd,MAAM,aAAa;IAAE;IAAc,GAAG,qBAAqB,UAAU;GAAE,CAAC;GACzE,SAAS,EAAE,eAAsC,MAAM,SAAS;IAAE;IAAU,GAAG,qBAAqB,UAAU;GAAE,CAAC;EAAC,CAAA,CAGpH,CAAA,CAGH;CACF;AACD,CAAC"}
@@ -2,11 +2,11 @@ import { randomString } from "../../../utils/string/index.mjs";
2
2
  import { useExpose } from "../../../utils/vue/expose.mjs";
3
3
  import { definePropType } from "../../../utils/vue/props.mjs";
4
4
  import { useRender } from "../../../utils/vue/render.mjs";
5
- import { withDefineType } from "../../../utils/vue/with.mjs";
6
5
  import { FaDialog } from "../../dialog/index.mjs";
7
6
  import { tableStateKey } from "./useTable.mjs";
8
- import { Fragment, createTextVNode, createVNode, defineComponent, inject, mergeProps, onBeforeUnmount, reactive, ref } from "vue";
9
- import { ElInput, ElInputNumber, ElMessage, ElNotification, ElRadio, ElRadioGroup, ElSwitch, ElTable, ElTableColumn, ElText } from "element-plus";
7
+ import { Fragment, createTextVNode, createVNode, defineComponent, inject, mergeProps, onBeforeUnmount, reactive, shallowRef } from "vue";
8
+ import { Rank } from "@element-plus/icons-vue";
9
+ import { ElIcon, ElInput, ElInputNumber, ElMessage, ElNotification, ElRadio, ElRadioGroup, ElSwitch, ElTable, ElTableColumn, ElText } from "element-plus";
10
10
  import Sortable from "sortablejs";
11
11
  //#region src/components/table/src/tableColumnSettingDialog.tsx
12
12
  var tableColumnSettingDialog_default = defineComponent({
@@ -17,22 +17,24 @@ change: { type: definePropType(Function) } },
17
17
  setup(props, { expose }) {
18
18
  const tableState = inject(tableStateKey);
19
19
  if (tableState === void 0) throw new Error("FaTableColumnsSettingDialog 必须在 FaTable 内部渲染。");
20
+ const faDialogRef = shallowRef(null);
21
+ const sortableRef = shallowRef(null);
20
22
  const state = reactive({
21
23
  tableKey: randomString(8),
22
- sortableInstance: withDefineType(),
23
24
  change: false
24
25
  });
25
- const faDialogRef = ref();
26
- const indexMethod = (index) => {
27
- return index + 1;
28
- };
26
+ const indexMethod = (index) => index + 1;
29
27
  const tableRowDrop = () => {
30
28
  const tBody = document.querySelector(`.fa-table__column-setting-${state.tableKey} .el-table__body-wrapper tbody`);
31
29
  if (!tBody) return;
32
- if (state.sortableInstance) state.sortableInstance.destroy();
33
- state.sortableInstance = new Sortable(tBody, {
30
+ sortableRef.value?.destroy();
31
+ sortableRef.value = new Sortable(tBody, {
34
32
  animation: 150,
35
- delay: 0,
33
+ handle: ".fa-table__column-setting-drag-handle",
34
+ delay: 200,
35
+ delayOnTouchOnly: true,
36
+ touchStartThreshold: 5,
37
+ fallbackTolerance: 3,
36
38
  onEnd(evt) {
37
39
  const { newIndex, oldIndex } = evt;
38
40
  if (newIndex !== void 0 && oldIndex !== void 0 && newIndex !== oldIndex) {
@@ -60,10 +62,9 @@ change: { type: definePropType(Function) } },
60
62
  });
61
63
  };
62
64
  const destroySortable = () => {
63
- state.sortableInstance?.destroy();
64
- state.sortableInstance = void 0;
65
+ sortableRef.value?.destroy();
66
+ sortableRef.value = null;
65
67
  };
66
- onBeforeUnmount(destroySortable);
67
68
  const handleChange = async () => {
68
69
  if (state.change) await props.change?.(tableState.orgColumns);
69
70
  else ElMessage.info("列配置未发生变化");
@@ -73,12 +74,12 @@ change: { type: definePropType(Function) } },
73
74
  };
74
75
  const handleOrderChange = () => {
75
76
  state.change = true;
76
- let orderColumns = tableState.orgColumns.filter((f) => !f?.pureSearch);
77
+ let orderColumns = tableState.orgColumns.filter((f) => !f.pureSearch);
77
78
  orderColumns = orderColumns.sort((a, b) => {
78
79
  if (a.order !== b.order) return (a.order ?? 0) - (b.order ?? 0);
79
80
  else return orderColumns.indexOf(b) - orderColumns.indexOf(a);
80
81
  });
81
- tableState.orgColumns = [...orderColumns, ...tableState.orgColumns.filter((f) => f?.pureSearch)];
82
+ tableState.orgColumns = [...orderColumns, ...tableState.orgColumns.filter((f) => f.pureSearch)];
82
83
  tableState.orgColumns.forEach((item, index) => {
83
84
  item.order = index + 1;
84
85
  });
@@ -88,7 +89,7 @@ change: { type: definePropType(Function) } },
88
89
  };
89
90
  const autoWidthDisabled = (row, switchEl = false) => {
90
91
  const result = {};
91
- if (row?.type) switch (row?.type) {
92
+ if (row.type) switch (row.type) {
92
93
  case "expand":
93
94
  result.disabled = true;
94
95
  result.placeholder = "暂不支持宽度配置";
@@ -107,10 +108,10 @@ change: { type: definePropType(Function) } },
107
108
  result.disabled = true;
108
109
  result.placeholder = "当前列无需配置";
109
110
  }
110
- else if (row?.tag) {
111
+ else if (row.tag) {
111
112
  result.disabled = true;
112
113
  result.placeholder = "标签列无需配置";
113
- } else if (row?.autoWidth) {
114
+ } else if (row.autoWidth) {
114
115
  result.disabled = true;
115
116
  result.placeholder = "自动列宽无需配置";
116
117
  }
@@ -120,7 +121,7 @@ change: { type: definePropType(Function) } },
120
121
  };
121
122
  const pureSearchDisabled = (row, switchEl = false, orderEl = false, _radioEl = false) => {
122
123
  const result = {};
123
- if (row?.pureSearch) {
124
+ if (row.pureSearch) {
124
125
  result.disabled = true;
125
126
  result.placeholder = "搜索列无需配置";
126
127
  }
@@ -129,6 +130,7 @@ change: { type: definePropType(Function) } },
129
130
  if (orderEl) result.placeholder = "999";
130
131
  return result;
131
132
  };
133
+ onBeforeUnmount(destroySortable);
132
134
  useRender(() => createVNode(FaDialog, {
133
135
  "ref": faDialogRef,
134
136
  "class": "fa-table__column-setting-dialog",
@@ -145,6 +147,14 @@ change: { type: definePropType(Function) } },
145
147
  "rowKey": "prop",
146
148
  "border": true
147
149
  }, { default: () => createVNode(Fragment, null, [
150
+ createVNode(ElTableColumn, {
151
+ "fixed": "left",
152
+ "align": "center",
153
+ "width": 44
154
+ }, { default: () => createVNode(ElIcon, {
155
+ "class": "fa-table__column-setting-drag-handle",
156
+ "title": "拖动调整顺序"
157
+ }, { default: () => [createVNode(Rank, null, null)] }) }),
148
158
  createVNode(ElTableColumn, {
149
159
  "type": "index",
150
160
  "fixed": "left",
@@ -235,7 +245,7 @@ change: { type: definePropType(Function) } },
235
245
  "inlinePrompt": true,
236
246
  "activeText": "是",
237
247
  "inactiveText": "否",
238
- "disabled": !!row?.type || !!row?.slot
248
+ "disabled": !!row.type || !!row.slot
239
249
  }, pureSearchDisabled(row, true), { "onChange": handleColumnChange }), null) }),
240
250
  createVNode(ElTableColumn, {
241
251
  "label": "自动宽度",
@@ -246,7 +256,7 @@ change: { type: definePropType(Function) } },
246
256
  "inlinePrompt": true,
247
257
  "activeText": "是",
248
258
  "inactiveText": "否",
249
- "disabled": !!row?.type
259
+ "disabled": !!row.type
250
260
  }, pureSearchDisabled(row, true), { "onChange": handleColumnChange }), null) }),
251
261
  createVNode(ElTableColumn, {
252
262
  "label": "显示",