ele-admin-plus 1.1.9-beta.8 → 1.1.9-beta.9

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 (135) hide show
  1. package/es/ele-app/el.d.ts +6 -1
  2. package/es/ele-app/plus.d.ts +9 -0
  3. package/es/ele-config-provider/index.d.ts +2 -2
  4. package/es/ele-config-provider/props.d.ts +3 -3
  5. package/es/ele-config-provider/props.js +2 -2
  6. package/es/ele-config-provider/types.d.ts +2 -0
  7. package/es/ele-data-table/index.d.ts +2 -2
  8. package/es/ele-data-table/index.js +8 -0
  9. package/es/ele-data-table/style/index.scss +4 -0
  10. package/es/ele-data-table/types.d.ts +10 -0
  11. package/es/ele-data-table/util.d.ts +5 -0
  12. package/es/ele-data-table/util.js +14 -0
  13. package/es/ele-modal/style/index.scss +18 -29
  14. package/es/ele-pagination/index.d.ts +4 -2
  15. package/es/ele-pagination/index.js +17 -5
  16. package/es/ele-pagination/props.d.ts +3 -2
  17. package/es/ele-pagination/props.js +2 -0
  18. package/es/ele-pagination/style/index.scss +9 -0
  19. package/es/ele-pagination/types.d.ts +6 -1
  20. package/es/ele-printer/util.js +1 -1
  21. package/es/ele-pro-table/components/table-tools.d.ts +99 -8
  22. package/es/ele-pro-table/components/table-tools.js +125 -8
  23. package/es/ele-pro-table/components/tool-column-list.js +1 -0
  24. package/es/ele-pro-table/components/tool-column.js +6 -2
  25. package/es/ele-pro-table/components/tool-export.d.ts +457 -0
  26. package/es/ele-pro-table/components/tool-export.js +451 -0
  27. package/es/ele-pro-table/components/tool-print-body-cell.d.ts +34 -0
  28. package/es/ele-pro-table/components/tool-print-body-cell.js +88 -0
  29. package/es/ele-pro-table/components/tool-print-header-cell.d.ts +34 -0
  30. package/es/ele-pro-table/components/tool-print-header-cell.js +88 -0
  31. package/es/ele-pro-table/components/tool-print.d.ts +899 -0
  32. package/es/ele-pro-table/components/tool-print.js +547 -0
  33. package/es/ele-pro-table/index.d.ts +28 -9
  34. package/es/ele-pro-table/index.js +56 -8
  35. package/es/ele-pro-table/props.d.ts +11 -5
  36. package/es/ele-pro-table/props.js +6 -2
  37. package/es/ele-pro-table/style/index.js +9 -0
  38. package/es/ele-pro-table/style/index.scss +33 -5
  39. package/es/ele-pro-table/types.d.ts +147 -5
  40. package/es/ele-pro-table/util.d.ts +47 -3
  41. package/es/ele-pro-table/util.js +119 -13
  42. package/es/ele-table/index.d.ts +3 -0
  43. package/es/ele-table/index.js +2 -1
  44. package/es/ele-table/props.d.ts +2 -0
  45. package/es/ele-table/props.js +3 -1
  46. package/es/ele-table/style/index.scss +35 -0
  47. package/es/ele-tool/index.d.ts +1 -1
  48. package/es/ele-tool/index.js +2 -4
  49. package/es/ele-tool/props.d.ts +7 -0
  50. package/es/ele-tool/props.js +5 -0
  51. package/es/ele-virtual-table/components/body-cell.d.ts +0 -1
  52. package/es/ele-virtual-table/components/body-cell.js +32 -47
  53. package/es/ele-virtual-table/components/footer-row.d.ts +2 -2
  54. package/es/ele-virtual-table/components/footer-row.js +15 -10
  55. package/es/ele-virtual-table/types.d.ts +15 -1
  56. package/es/ele-virtual-table/util.d.ts +26 -3
  57. package/es/ele-virtual-table/util.js +44 -0
  58. package/es/icons/PrinterOutlined.d.ts +2 -0
  59. package/es/icons/PrinterOutlined.js +29 -0
  60. package/es/icons/VerticalLeftOutlined.js +2 -2
  61. package/es/icons/VerticalRightOutlined.js +2 -2
  62. package/es/icons/index.d.ts +1 -0
  63. package/es/icons/index.js +58 -56
  64. package/es/lang/en_US.js +13 -2
  65. package/es/lang/zh_CN.js +13 -2
  66. package/es/lang/zh_TW.js +12 -1
  67. package/es/utils/resolvers.js +2 -2
  68. package/lib/ele-app/el.d.ts +6 -1
  69. package/lib/ele-app/plus.d.ts +9 -0
  70. package/lib/ele-config-provider/index.d.ts +2 -2
  71. package/lib/ele-config-provider/props.cjs +2 -2
  72. package/lib/ele-config-provider/props.d.ts +3 -3
  73. package/lib/ele-config-provider/types.d.ts +2 -0
  74. package/lib/ele-data-table/index.cjs +8 -0
  75. package/lib/ele-data-table/index.d.ts +2 -2
  76. package/lib/ele-data-table/style/index.scss +4 -0
  77. package/lib/ele-data-table/types.d.ts +10 -0
  78. package/lib/ele-data-table/util.cjs +14 -0
  79. package/lib/ele-data-table/util.d.ts +5 -0
  80. package/lib/ele-modal/style/index.scss +18 -29
  81. package/lib/ele-pagination/index.cjs +16 -4
  82. package/lib/ele-pagination/index.d.ts +4 -2
  83. package/lib/ele-pagination/props.cjs +2 -0
  84. package/lib/ele-pagination/props.d.ts +3 -2
  85. package/lib/ele-pagination/style/index.scss +9 -0
  86. package/lib/ele-pagination/types.d.ts +6 -1
  87. package/lib/ele-printer/util.cjs +1 -1
  88. package/lib/ele-pro-table/components/table-tools.cjs +124 -7
  89. package/lib/ele-pro-table/components/table-tools.d.ts +99 -8
  90. package/lib/ele-pro-table/components/tool-column-list.cjs +1 -0
  91. package/lib/ele-pro-table/components/tool-column.cjs +6 -2
  92. package/lib/ele-pro-table/components/tool-export.cjs +450 -0
  93. package/lib/ele-pro-table/components/tool-export.d.ts +457 -0
  94. package/lib/ele-pro-table/components/tool-print-body-cell.cjs +87 -0
  95. package/lib/ele-pro-table/components/tool-print-body-cell.d.ts +34 -0
  96. package/lib/ele-pro-table/components/tool-print-header-cell.cjs +87 -0
  97. package/lib/ele-pro-table/components/tool-print-header-cell.d.ts +34 -0
  98. package/lib/ele-pro-table/components/tool-print.cjs +546 -0
  99. package/lib/ele-pro-table/components/tool-print.d.ts +899 -0
  100. package/lib/ele-pro-table/index.cjs +56 -8
  101. package/lib/ele-pro-table/index.d.ts +28 -9
  102. package/lib/ele-pro-table/props.cjs +6 -2
  103. package/lib/ele-pro-table/props.d.ts +11 -5
  104. package/lib/ele-pro-table/style/index.cjs +9 -0
  105. package/lib/ele-pro-table/style/index.scss +33 -5
  106. package/lib/ele-pro-table/types.d.ts +147 -5
  107. package/lib/ele-pro-table/util.cjs +119 -13
  108. package/lib/ele-pro-table/util.d.ts +47 -3
  109. package/lib/ele-table/index.cjs +2 -1
  110. package/lib/ele-table/index.d.ts +3 -0
  111. package/lib/ele-table/props.cjs +3 -1
  112. package/lib/ele-table/props.d.ts +2 -0
  113. package/lib/ele-table/style/index.scss +35 -0
  114. package/lib/ele-tool/index.cjs +1 -3
  115. package/lib/ele-tool/index.d.ts +1 -1
  116. package/lib/ele-tool/props.cjs +5 -0
  117. package/lib/ele-tool/props.d.ts +7 -0
  118. package/lib/ele-virtual-table/components/body-cell.cjs +31 -46
  119. package/lib/ele-virtual-table/components/body-cell.d.ts +0 -1
  120. package/lib/ele-virtual-table/components/footer-row.cjs +13 -8
  121. package/lib/ele-virtual-table/components/footer-row.d.ts +2 -2
  122. package/lib/ele-virtual-table/types.d.ts +15 -1
  123. package/lib/ele-virtual-table/util.cjs +44 -0
  124. package/lib/ele-virtual-table/util.d.ts +26 -3
  125. package/lib/icons/PrinterOutlined.cjs +28 -0
  126. package/lib/icons/PrinterOutlined.d.ts +2 -0
  127. package/lib/icons/VerticalLeftOutlined.cjs +2 -2
  128. package/lib/icons/VerticalRightOutlined.cjs +2 -2
  129. package/lib/icons/index.cjs +2 -0
  130. package/lib/icons/index.d.ts +1 -0
  131. package/lib/lang/en_US.cjs +13 -2
  132. package/lib/lang/zh_CN.cjs +13 -2
  133. package/lib/lang/zh_TW.cjs +12 -1
  134. package/lib/utils/resolvers.cjs +2 -2
  135. package/package.json +1 -1
@@ -412,6 +412,47 @@ function getTreeProps(treeProps) {
412
412
  hasChildrenName: hasChildren || "hasChildren"
413
413
  };
414
414
  }
415
+ function getIndexValue(rowIndex, index, pageIndex) {
416
+ if (index == null) {
417
+ return String((pageIndex || 0) + (rowIndex || 0));
418
+ }
419
+ const start = typeof index === "function" ? index(rowIndex || 0) : index;
420
+ return String((start || 0) + (rowIndex || 0));
421
+ }
422
+ function getCellSpan(params, spanMethod) {
423
+ const span = { rowspan: 1, colspan: 1 };
424
+ if (typeof spanMethod === "function") {
425
+ const result = spanMethod(params);
426
+ if (result != null) {
427
+ if (Array.isArray(result)) {
428
+ const [rowspan, colspan] = result;
429
+ if (rowspan != null) {
430
+ span.rowspan = rowspan;
431
+ }
432
+ if (colspan != null) {
433
+ span.colspan = colspan;
434
+ }
435
+ } else {
436
+ if (result.rowspan != null) {
437
+ span.rowspan = result.rowspan;
438
+ }
439
+ if (result.colspan != null) {
440
+ span.colspan = result.colspan;
441
+ }
442
+ }
443
+ }
444
+ }
445
+ return span;
446
+ }
447
+ function getUserSums(summaryMethod, bodyCols, data) {
448
+ if (typeof summaryMethod !== "function" || bodyCols == null) {
449
+ return;
450
+ }
451
+ const columns = bodyCols.map((col) => {
452
+ return { ...col.originalCol || {}, property: col.dataKey };
453
+ });
454
+ return summaryMethod({ columns, data: data ?? [] });
455
+ }
415
456
  function getSumValue(data, prop) {
416
457
  if (!data || !prop) {
417
458
  return "";
@@ -514,12 +555,14 @@ export {
514
555
  computeFixedPositions,
515
556
  floorSize,
516
557
  generateRowCols,
558
+ getCellSpan,
517
559
  getColFiltered,
518
560
  getColKey,
519
561
  getColWidth,
520
562
  getColumnByKey,
521
563
  getDefaultFiltered,
522
564
  getDefaultSort,
565
+ getIndexValue,
523
566
  getKeysAndList,
524
567
  getNumberSize,
525
568
  getOrderValue,
@@ -532,6 +575,7 @@ export {
532
575
  getTableColumns,
533
576
  getTableHeight,
534
577
  getTreeProps,
578
+ getUserSums,
535
579
  isAutoRowHeight,
536
580
  transformTableData,
537
581
  useAutoResize
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;
@@ -0,0 +1,29 @@
1
+ import { defineComponent, openBlock, createElementBlock, createElementVNode } from "vue";
2
+ const _sfc_main = defineComponent({
3
+ name: "PrinterOutlined"
4
+ });
5
+ const _export_sfc = (sfc, props) => {
6
+ const target = sfc.__vccOpts || sfc;
7
+ for (const [key, val] of props) {
8
+ target[key] = val;
9
+ }
10
+ return target;
11
+ };
12
+ const _hoisted_1 = {
13
+ viewBox: "0 0 48 48",
14
+ fill: "none",
15
+ stroke: "currentColor",
16
+ "stroke-width": "4",
17
+ "stroke-linejoin": "round"
18
+ };
19
+ const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", { d: "M13 36H3V15H45V36H35M12 15V4H36V15M13 44V26H35V44Z" }, null, -1);
20
+ const _hoisted_3 = [
21
+ _hoisted_2
22
+ ];
23
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
24
+ return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_3);
25
+ }
26
+ const PrinterOutlined = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
27
+ export {
28
+ PrinterOutlined as default
29
+ };
@@ -13,9 +13,9 @@ const _hoisted_1 = {
13
13
  viewBox: "0 0 48 48",
14
14
  fill: "none",
15
15
  stroke: "currentColor",
16
- "stroke-width": "5"
16
+ "stroke-width": "4"
17
17
  };
18
- const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", { d: "M35 5 35 43M10 42 30 24 10 6" }, null, -1);
18
+ const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", { d: "M34 6 34 42M11 41 30 24 11 7" }, null, -1);
19
19
  const _hoisted_3 = [
20
20
  _hoisted_2
21
21
  ];
@@ -13,9 +13,9 @@ const _hoisted_1 = {
13
13
  viewBox: "0 0 48 48",
14
14
  fill: "none",
15
15
  stroke: "currentColor",
16
- "stroke-width": "5"
16
+ "stroke-width": "4"
17
17
  };
18
- const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", { d: "M13 5 13 43M38 42 18 24 38 6" }, null, -1);
18
+ const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", { d: "M14 6 14 42M37 41 18 24 37 7" }, null, -1);
19
19
  const _hoisted_3 = [
20
20
  _hoisted_2
21
21
  ];
@@ -76,6 +76,7 @@ export { default as PieChartOutlined } from "./PieChartOutlined";
76
76
  export { default as PlayFilled } from "./PlayFilled";
77
77
  export { default as PlusCircleOutlined } from "./PlusCircleOutlined";
78
78
  export { default as PlusOutlined } from "./PlusOutlined";
79
+ export { default as PrinterOutlined } from "./PrinterOutlined";
79
80
  export { default as ProtectOutlined } from "./ProtectOutlined";
80
81
  export { default as QuestionCircleFilled } from "./QuestionCircleFilled";
81
82
  export { default as QuestionCircleOutlined } from "./QuestionCircleOutlined";
package/es/icons/index.js CHANGED
@@ -76,34 +76,35 @@ import { default as default76 } from "./PieChartOutlined";
76
76
  import { default as default77 } from "./PlayFilled";
77
77
  import { default as default78 } from "./PlusCircleOutlined";
78
78
  import { default as default79 } from "./PlusOutlined";
79
- import { default as default80 } from "./ProtectOutlined";
80
- import { default as default81 } from "./QuestionCircleFilled";
81
- import { default as default82 } from "./QuestionCircleOutlined";
82
- import { default as default83 } from "./ReloadOutlined";
83
- import { default as default84 } from "./SearchOutlined";
84
- import { default as default85 } from "./SettingOutlined";
85
- import { default as default86 } from "./ShoppingOutlined";
86
- import { default as default87 } from "./SortOutlined";
87
- import { default as default88 } from "./StarFilled";
88
- import { default as default89 } from "./StepBackwardFilled";
89
- import { default as default90 } from "./StepForwardFilled";
90
- import { default as default91 } from "./SuitcaseOutlined";
91
- import { default as default92 } from "./SunOutlined";
92
- import { default as default93 } from "./SwapOutlined";
93
- import { default as default94 } from "./SyncOutlined";
94
- import { default as default95 } from "./TableOutlined";
95
- import { default as default96 } from "./TagOutlined";
96
- import { default as default97 } from "./TimerOutlined";
97
- import { default as default98 } from "./UndoOutlined";
98
- import { default as default99 } from "./UnlockOutlined";
99
- import { default as default100 } from "./UploadOutlined";
100
- import { default as default101 } from "./UserOutlined";
101
- import { default as default102 } from "./VerticalAlignMiddleOutlined";
102
- import { default as default103 } from "./VerticalLeftOutlined";
103
- import { default as default104 } from "./VerticalRightOutlined";
104
- import { default as default105 } from "./WarningOutlined";
105
- import { default as default106 } from "./ZoomInOutlined";
106
- import { default as default107 } from "./ZoomOutOutlined";
79
+ import { default as default80 } from "./PrinterOutlined";
80
+ import { default as default81 } from "./ProtectOutlined";
81
+ import { default as default82 } from "./QuestionCircleFilled";
82
+ import { default as default83 } from "./QuestionCircleOutlined";
83
+ import { default as default84 } from "./ReloadOutlined";
84
+ import { default as default85 } from "./SearchOutlined";
85
+ import { default as default86 } from "./SettingOutlined";
86
+ import { default as default87 } from "./ShoppingOutlined";
87
+ import { default as default88 } from "./SortOutlined";
88
+ import { default as default89 } from "./StarFilled";
89
+ import { default as default90 } from "./StepBackwardFilled";
90
+ import { default as default91 } from "./StepForwardFilled";
91
+ import { default as default92 } from "./SuitcaseOutlined";
92
+ import { default as default93 } from "./SunOutlined";
93
+ import { default as default94 } from "./SwapOutlined";
94
+ import { default as default95 } from "./SyncOutlined";
95
+ import { default as default96 } from "./TableOutlined";
96
+ import { default as default97 } from "./TagOutlined";
97
+ import { default as default98 } from "./TimerOutlined";
98
+ import { default as default99 } from "./UndoOutlined";
99
+ import { default as default100 } from "./UnlockOutlined";
100
+ import { default as default101 } from "./UploadOutlined";
101
+ import { default as default102 } from "./UserOutlined";
102
+ import { default as default103 } from "./VerticalAlignMiddleOutlined";
103
+ import { default as default104 } from "./VerticalLeftOutlined";
104
+ import { default as default105 } from "./VerticalRightOutlined";
105
+ import { default as default106 } from "./WarningOutlined";
106
+ import { default as default107 } from "./ZoomInOutlined";
107
+ import { default as default108 } from "./ZoomOutOutlined";
107
108
  export {
108
109
  default2 as AnalysisOutlined,
109
110
  default3 as ApplicationOutlined,
@@ -183,32 +184,33 @@ export {
183
184
  default77 as PlayFilled,
184
185
  default78 as PlusCircleOutlined,
185
186
  default79 as PlusOutlined,
186
- default80 as ProtectOutlined,
187
- default81 as QuestionCircleFilled,
188
- default82 as QuestionCircleOutlined,
189
- default83 as ReloadOutlined,
190
- default84 as SearchOutlined,
191
- default85 as SettingOutlined,
192
- default86 as ShoppingOutlined,
193
- default87 as SortOutlined,
194
- default88 as StarFilled,
195
- default89 as StepBackwardFilled,
196
- default90 as StepForwardFilled,
197
- default91 as SuitcaseOutlined,
198
- default92 as SunOutlined,
199
- default93 as SwapOutlined,
200
- default94 as SyncOutlined,
201
- default95 as TableOutlined,
202
- default96 as TagOutlined,
203
- default97 as TimerOutlined,
204
- default98 as UndoOutlined,
205
- default99 as UnlockOutlined,
206
- default100 as UploadOutlined,
207
- default101 as UserOutlined,
208
- default102 as VerticalAlignMiddleOutlined,
209
- default103 as VerticalLeftOutlined,
210
- default104 as VerticalRightOutlined,
211
- default105 as WarningOutlined,
212
- default106 as ZoomInOutlined,
213
- default107 as ZoomOutOutlined
187
+ default80 as PrinterOutlined,
188
+ default81 as ProtectOutlined,
189
+ default82 as QuestionCircleFilled,
190
+ default83 as QuestionCircleOutlined,
191
+ default84 as ReloadOutlined,
192
+ default85 as SearchOutlined,
193
+ default86 as SettingOutlined,
194
+ default87 as ShoppingOutlined,
195
+ default88 as SortOutlined,
196
+ default89 as StarFilled,
197
+ default90 as StepBackwardFilled,
198
+ default91 as StepForwardFilled,
199
+ default92 as SuitcaseOutlined,
200
+ default93 as SunOutlined,
201
+ default94 as SwapOutlined,
202
+ default95 as SyncOutlined,
203
+ default96 as TableOutlined,
204
+ default97 as TagOutlined,
205
+ default98 as TimerOutlined,
206
+ default99 as UndoOutlined,
207
+ default100 as UnlockOutlined,
208
+ default101 as UploadOutlined,
209
+ default102 as UserOutlined,
210
+ default103 as VerticalAlignMiddleOutlined,
211
+ default104 as VerticalLeftOutlined,
212
+ default105 as VerticalRightOutlined,
213
+ default106 as WarningOutlined,
214
+ default107 as ZoomInOutlined,
215
+ default108 as ZoomOutOutlined
214
216
  };
package/es/lang/en_US.js CHANGED
@@ -34,14 +34,25 @@ const localeValues = {
34
34
  sizes: "Density",
35
35
  columns: "Columns",
36
36
  maximized: "Fullscreen",
37
+ export: "Export",
38
+ print: "Print",
37
39
  sizeLarge: "Large",
38
40
  sizeDefault: "Default",
39
41
  sizeSmall: "Compact",
40
- columnTitle: "Columns",
42
+ columnTitle: "Check all",
41
43
  columnReset: "Reset",
42
44
  columnUntitled: "Untitled",
43
45
  columnFixedLeft: "Pin to left",
44
- columnFixedRight: "Pin to right"
46
+ columnFixedRight: "Pin to right",
47
+ exportOk: "Ok",
48
+ exportCancel: "Cancel",
49
+ exportFileName: "Filename",
50
+ exportFileNamePlaceholder: "Please input filename",
51
+ exportSelectData: "Data",
52
+ exportSelectColumn: "Columns",
53
+ exportDataTypePage: "Current",
54
+ exportDataTypeSelected: "Selected",
55
+ exportDataTypeAll: "All"
45
56
  },
46
57
  copyable: {
47
58
  copy: "Copy",
package/es/lang/zh_CN.js CHANGED
@@ -34,14 +34,25 @@ const localeValues = {
34
34
  sizes: "密度",
35
35
  columns: "列设置",
36
36
  maximized: "全屏",
37
+ export: "导出",
38
+ print: "打印",
37
39
  sizeLarge: "宽松",
38
40
  sizeDefault: "中等",
39
41
  sizeSmall: "紧凑",
40
- columnTitle: "列展示",
42
+ columnTitle: "全选",
41
43
  columnReset: "重置",
42
44
  columnUntitled: "无标题",
43
45
  columnFixedLeft: "固定在左侧",
44
- columnFixedRight: "固定在右侧"
46
+ columnFixedRight: "固定在右侧",
47
+ exportOk: "确定",
48
+ exportCancel: "取消",
49
+ exportFileName: "文件名",
50
+ exportFileNamePlaceholder: "请输入文件名",
51
+ exportSelectData: "选择数据",
52
+ exportSelectColumn: "选择字段",
53
+ exportDataTypePage: "当前页数据",
54
+ exportDataTypeSelected: "选中数据",
55
+ exportDataTypeAll: "全部数据"
45
56
  },
46
57
  copyable: {
47
58
  copy: "复制",
package/es/lang/zh_TW.js CHANGED
@@ -34,6 +34,8 @@ const localeValues = {
34
34
  sizes: "密度",
35
35
  columns: "列設定",
36
36
  maximized: "全屏",
37
+ export: "匯出",
38
+ print: "打印",
37
39
  sizeLarge: "寬鬆",
38
40
  sizeDefault: "中等",
39
41
  sizeSmall: "緊湊",
@@ -41,7 +43,16 @@ const localeValues = {
41
43
  columnReset: "重置",
42
44
  columnUntitled: "無標題",
43
45
  columnFixedLeft: "固定在左側",
44
- columnFixedRight: "固定在右側"
46
+ columnFixedRight: "固定在右側",
47
+ exportOk: "確認",
48
+ exportCancel: "取消",
49
+ exportFileName: "檔名",
50
+ exportFileNamePlaceholder: "請輸入檔名",
51
+ exportSelectData: "選擇數據",
52
+ exportSelectColumn: "選擇字段",
53
+ exportDataTypePage: "當前頁數據",
54
+ exportDataTypeSelected: "選中數據",
55
+ exportDataTypeAll: "全部數據"
45
56
  },
46
57
  copyable: {
47
58
  copy: "複製",
@@ -10,7 +10,7 @@ function getSideEffects(path, options) {
10
10
  }
11
11
  function getStylePath(namePath, packageName, path) {
12
12
  if (!path) {
13
- return `${packageName}/es`;
13
+ return `${packageName}/es/${namePath}`;
14
14
  }
15
15
  if (path === "/es/core") {
16
16
  return `${packageName}/es/${namePath}`;
@@ -38,7 +38,7 @@ function EleAdminResolver(options) {
38
38
  };
39
39
  }
40
40
  return {
41
- from: `${packageName}${path}/${namePath}`,
41
+ from: `${packageName}${path}/${namePath}/index`,
42
42
  sideEffects: getSideEffects(stylePath, options)
43
43
  };
44
44
  }
@@ -49,13 +49,16 @@ import type {
49
49
  ElImage,
50
50
  ElScrollbar,
51
51
  ElTreeV2,
52
- ElFormItem
52
+ ElForm,
53
+ ElFormItem,
54
+ FormItemRule
53
55
  } from 'element-plus';
54
56
  import type { dropdownProps } from 'element-plus';
55
57
  import type { dropdownItemProps } from 'element-plus';
56
58
  import type columnProps from 'element-plus/es/components/table/src/table-column/defaults';
57
59
  import type { TreeProps } from 'element-plus/es/components/tree-v2/src/types';
58
60
  import type { ComponentProps } from './types';
61
+ export type ElFormItemRule = FormItemRule;
59
62
 
60
63
  /**
61
64
  * 组件属性
@@ -173,4 +176,6 @@ export type ElScrollbarInstance = InstanceType<typeof ElScrollbar> | null;
173
176
 
174
177
  export type ElTreeV2Instance = InstanceType<typeof ElTreeV2> | null;
175
178
 
179
+ export type ElFormInstance = InstanceType<typeof ElForm> | null;
180
+
176
181
  export type ElFormItemInstance = InstanceType<typeof ElFormItem> | null;
@@ -14,11 +14,14 @@ import type { PopoverProps } from '../ele-popover/props';
14
14
  import type ElePopover from '../ele-popover/index';
15
15
  import type { ProTableProps } from '../ele-pro-table/props';
16
16
  import type EleProTable from '../ele-pro-table/index';
17
+ import type { PrinterProps } from '../ele-printer/props';
17
18
  import type EleTabs from '../ele-tabs/index';
19
+ import type { TableProps } from '../ele-table/props';
18
20
  import type { TextProps } from '../ele-text/props';
19
21
  import type EleText from '../ele-text/index';
20
22
  import type { ToolbarProps } from '../ele-toolbar/props';
21
23
  import type { TooltipProps } from '../ele-tooltip/props';
24
+ import type { ToolProps } from '../ele-tool/props';
22
25
  import type EleTooltip from '../ele-tooltip/index';
23
26
  import type EleVirtualTable from '../ele-virtual-table/index';
24
27
  import type ReceiverView from '../ele-config-provider/components/receiver-view';
@@ -46,12 +49,18 @@ export type ElePopoverProps = Partial<PopoverProps>;
46
49
 
47
50
  export type EleProTableProps = ComponentProps<ProTableProps>;
48
51
 
52
+ export type ElePrinterProps = ComponentProps<PrinterProps>;
53
+
54
+ export type EleTableProps = ComponentProps<TableProps>;
55
+
49
56
  export type EleTextProps = ComponentProps<TextProps>;
50
57
 
51
58
  export type EleToolbarProps = ComponentProps<ToolbarProps>;
52
59
 
53
60
  export type EleTooltipProps = Partial<TooltipProps>;
54
61
 
62
+ export type EleToolProps = Partial<ToolProps>;
63
+
55
64
  /**
56
65
  * 组件实例
57
66
  */
@@ -1,13 +1,13 @@
1
1
  declare const _default: import("vue").DefineComponent<{
2
2
  locale: import("vue").PropType<import("./types").EleLocale>;
3
- table: import("vue").PropType<Partial<Pick<import("../ele-app/plus").EleProTableProps, "size" | "stripe" | "border" | "emptyProps" | "request" | "response" | "parseData" | "tools" | "maximizedIndex" | "pagination">>>;
3
+ table: import("vue").PropType<Partial<Pick<import("../ele-app/plus").EleProTableProps, "size" | "stripe" | "border" | "emptyProps" | "request" | "response" | "parseData" | "tools" | "maximizedIndex" | "pagination" | "exportConfig" | "printConfig">>>;
4
4
  mapKey: StringConstructor;
5
5
  license: StringConstructor;
6
6
  }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
7
7
  [key: string]: any;
8
8
  }>[] | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
9
9
  locale: import("vue").PropType<import("./types").EleLocale>;
10
- table: import("vue").PropType<Partial<Pick<import("../ele-app/plus").EleProTableProps, "size" | "stripe" | "border" | "emptyProps" | "request" | "response" | "parseData" | "tools" | "maximizedIndex" | "pagination">>>;
10
+ table: import("vue").PropType<Partial<Pick<import("../ele-app/plus").EleProTableProps, "size" | "stripe" | "border" | "emptyProps" | "request" | "response" | "parseData" | "tools" | "maximizedIndex" | "pagination" | "exportConfig" | "printConfig">>>;
11
11
  mapKey: StringConstructor;
12
12
  license: StringConstructor;
13
13
  }>>, {}, {}>;
@@ -5,9 +5,9 @@ const configProviderProps = {
5
5
  locale: Object,
6
6
  /** 表格全局配置 */
7
7
  table: Object,
8
- /** 高德地图密钥 */
8
+ /** 高德地图key */
9
9
  mapKey: String,
10
- /** 授权码 */
10
+ /** license */
11
11
  license: String
12
12
  };
13
13
  const PROVIDE_KEY = "EleGlobalConfig";
@@ -7,10 +7,10 @@ export declare const configProviderProps: {
7
7
  /** 国际化 */
8
8
  locale: PropType<EleLocale>;
9
9
  /** 表格全局配置 */
10
- table: PropType<Partial<Pick<import("../ele-app/plus").EleProTableProps, "size" | "stripe" | "border" | "tools" | "emptyProps" | "request" | "response" | "parseData" | "maximizedIndex" | "pagination">>>;
11
- /** 高德地图密钥 */
10
+ table: PropType<Partial<Pick<import("../ele-app/plus").EleProTableProps, "size" | "stripe" | "border" | "tools" | "emptyProps" | "request" | "response" | "parseData" | "maximizedIndex" | "pagination" | "exportConfig" | "printConfig">>>;
11
+ /** 高德地图key */
12
12
  mapKey: StringConstructor;
13
- /** 授权码 */
13
+ /** license */
14
14
  license: StringConstructor;
15
15
  };
16
16
  export type ConfigProviderProps = ExtractPropTypes<typeof configProviderProps>;
@@ -38,6 +38,8 @@ export type TableGlobalConfig = Partial<
38
38
  | 'maximizedIndex'
39
39
  | 'pagination'
40
40
  | 'emptyProps'
41
+ | 'exportConfig'
42
+ | 'printConfig'
41
43
  >
42
44
  >;
43
45
 
@@ -31,6 +31,13 @@ const index = vue.defineComponent({
31
31
  var _a;
32
32
  return ((_a = props$1.treeProps) == null ? void 0 : _a.children) || "children";
33
33
  });
34
+ const updateScrollBar = () => {
35
+ var _a;
36
+ const scrollBarRef = (_a = tableRef.value) == null ? void 0 : _a.scrollBarRef;
37
+ if (scrollBarRef && typeof scrollBarRef.update === "function") {
38
+ scrollBarRef.update();
39
+ }
40
+ };
34
41
  const clearSort = () => {
35
42
  methods.clearSort();
36
43
  tableState.sorter = {};
@@ -227,6 +234,7 @@ const index = vue.defineComponent({
227
234
  tableCols.value = cols;
228
235
  vue.nextTick(() => {
229
236
  methods.doLayout();
237
+ updateScrollBar();
230
238
  if (sorter) {
231
239
  methods.sort(sorter.prop, sorter.order || "ascending");
232
240
  }
@@ -141,7 +141,7 @@ declare const _default: import("vue").DefineComponent<{
141
141
  clearFilter: (columnKeys?: string[] | undefined) => void;
142
142
  doLayout: () => void;
143
143
  sort: (prop: string, order: string) => void;
144
- scrollTo: (options: number | ScrollToOptions, yCoord?: number | undefined) => void; /** 获取单选选中行 */
144
+ scrollTo: (options: number | ScrollToOptions, yCoord?: number | undefined) => void;
145
145
  setScrollTop: (top?: number | undefined) => void;
146
146
  setScrollLeft: (left?: number | undefined) => void;
147
147
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -155,7 +155,7 @@ declare const _default: import("vue").DefineComponent<{
155
155
  cellContextmenu: (_row: DataItem, _column: Column, _cell: HTMLTableCellElement, _e: MouseEvent) => boolean;
156
156
  rowClick: (_row: DataItem, _column: Column, _e: MouseEvent) => boolean;
157
157
  rowContextmenu: (_row: DataItem, _column: Column, _e: MouseEvent) => boolean;
158
- rowDblclick: (_row: DataItem, _column: Column, _e: MouseEvent) => boolean; /** 设置多选选中数据 */
158
+ rowDblclick: (_row: DataItem, _column: Column, _e: MouseEvent) => boolean;
159
159
  headerClick: (_column: Column, _e: MouseEvent) => boolean;
160
160
  headerContextmenu: (_column: Column, _e: MouseEvent) => boolean;
161
161
  sortChange: (_sorter: Sorter) => boolean;
@@ -460,3 +460,7 @@ body .ele-popper.el-popper.ele-tooltip.ele-table-tooltip {
460
460
  text-overflow: ellipsis;
461
461
  }
462
462
  }
463
+
464
+ .ele-table-tr > .is-index > .cell.el-tooltip > div {
465
+ display: inline;
466
+ }
@@ -240,7 +240,17 @@ export type SpanMethod = ElTableProps<DataItem>['spanMethod'];
240
240
  */
241
241
  export type RowKey = ElTableProps<DataItem>['rowKey'];
242
242
 
243
+ /**
244
+ * 表尾合计计算方法
245
+ */
246
+ export type SummaryMethod = ElTableProps<DataItem>['summaryMethod'];
247
+
243
248
  /**
244
249
  * 控制行是否可选中的方法
245
250
  */
246
251
  export type RowSelectable = Column['selectable'];
252
+
253
+ /**
254
+ * 序号列起始索引
255
+ */
256
+ export type ColumnIndex = Column['index'];
@@ -29,6 +29,8 @@ function getCols(cols, pageIndex, slots, slotNormalize, globalTooltip) {
29
29
  {
30
30
  ...core.omit(col, [
31
31
  "showOverflowTooltip",
32
+ "columnKey",
33
+ "className",
32
34
  "uid",
33
35
  "slot",
34
36
  "headerSlot",
@@ -41,6 +43,7 @@ function getCols(cols, pageIndex, slots, slotNormalize, globalTooltip) {
41
43
  globalTooltip
42
44
  ),
43
45
  columnKey: col.columnKey ?? col.prop,
46
+ className: getCellClass(col),
44
47
  index: col.index ?? pageIndex,
45
48
  key: col.uid
46
49
  },
@@ -258,6 +261,16 @@ function getColFixedNumber(fixed) {
258
261
  }
259
262
  return 1;
260
263
  }
264
+ function getCellClass(col) {
265
+ const classes = [];
266
+ if (col.type === "index") {
267
+ classes.push("is-index");
268
+ }
269
+ if (col.className) {
270
+ classes.push(col.className);
271
+ }
272
+ return classes.length ? classes.join(" ") : void 0;
273
+ }
261
274
  function getRowKeys(rows, rowKey) {
262
275
  const keys = [];
263
276
  if (rows) {
@@ -456,6 +469,7 @@ function useEmits(emit) {
456
469
  }
457
470
  exports.arrayIsChanged = arrayIsChanged;
458
471
  exports.getBodyRowClass = getBodyRowClass;
472
+ exports.getCellClass = getCellClass;
459
473
  exports.getColFixedNumber = getColFixedNumber;
460
474
  exports.getCols = getCols;
461
475
  exports.getEmptyProps = getEmptyProps;
@@ -137,6 +137,11 @@ export declare function isReserveChecked(columns?: Columns): boolean;
137
137
  * @param fixed 固定值
138
138
  */
139
139
  export declare function getColFixedNumber(fixed?: boolean | string): 0 | 1 | 2;
140
+ /**
141
+ * 获取列类名
142
+ * @param col 列属性
143
+ */
144
+ export declare function getCellClass(col: Column): string | undefined;
140
145
  /**
141
146
  * 获取数据值
142
147
  * @param rows 数据