ele-admin-plus 1.1.9 → 1.2.0-beta.1

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 (149) hide show
  1. package/es/core-export.d.ts +1 -0
  2. package/es/core-export.js +1 -0
  3. package/es/ele-alert/index.d.ts +2 -2
  4. package/es/ele-alert/props.d.ts +1 -1
  5. package/es/ele-app/components/message-body.d.ts +39 -0
  6. package/es/ele-app/components/message-body.js +92 -0
  7. package/es/ele-app/el.d.ts +2 -0
  8. package/es/ele-app/style/message/css-var.scss +0 -4
  9. package/es/ele-app/style/message/index.scss +199 -77
  10. package/es/ele-app/style/overwrite/input/index.scss +2 -0
  11. package/es/ele-app/style/overwrite/message-box/index.scss +31 -0
  12. package/es/ele-app/style/overwrite/tag/css-var.scss +0 -16
  13. package/es/ele-app/style/overwrite/tag/index.scss +57 -14
  14. package/es/ele-app/types.d.ts +6 -1
  15. package/es/ele-config-provider/components/receiver-view.js +3 -3
  16. package/es/ele-config-provider/index.d.ts +8 -4
  17. package/es/ele-config-provider/index.js +19 -5
  18. package/es/ele-config-provider/props.d.ts +9 -4
  19. package/es/ele-config-provider/props.js +9 -5
  20. package/es/ele-config-provider/receiver.js +2 -2
  21. package/es/ele-config-provider/types.d.ts +22 -1
  22. package/es/ele-data-table/types.d.ts +2 -0
  23. package/es/ele-drawer/index.d.ts +2 -2
  24. package/es/ele-edit-tag/index.d.ts +9 -4
  25. package/es/ele-edit-tag/index.js +4 -2
  26. package/es/ele-edit-tag/props.d.ts +3 -1
  27. package/es/ele-edit-tag/props.js +2 -0
  28. package/es/ele-edit-tag/style/index.scss +11 -4
  29. package/es/ele-icon-select/index.d.ts +10 -12
  30. package/es/ele-icon-select/props.d.ts +1 -1
  31. package/es/ele-map-picker/index.d.ts +1 -1
  32. package/es/ele-menus/index.d.ts +2 -2
  33. package/es/ele-menus/index.js +11 -0
  34. package/es/ele-modal/index.d.ts +3 -3
  35. package/es/ele-modal/style/index.scss +2 -0
  36. package/es/ele-modal/util.d.ts +1 -1
  37. package/es/ele-modal/util.js +2 -4
  38. package/es/ele-popconfirm/index.d.ts +3 -3
  39. package/es/ele-popconfirm/props.d.ts +1 -1
  40. package/es/ele-popover/index.d.ts +2 -2
  41. package/es/ele-pro-layout/components/pro-header.d.ts +1 -1
  42. package/es/ele-pro-layout/components/pro-sidebar.d.ts +1 -1
  43. package/es/ele-pro-layout/index.js +1 -1
  44. package/es/ele-pro-layout/types.d.ts +4 -4
  45. package/es/ele-pro-table/components/table-tools.d.ts +11 -2
  46. package/es/ele-pro-table/components/table-tools.js +14 -26
  47. package/es/ele-pro-table/components/tool-column.d.ts +1 -0
  48. package/es/ele-pro-table/components/tool-export.d.ts +29 -56
  49. package/es/ele-pro-table/components/tool-export.js +100 -52
  50. package/es/ele-pro-table/components/tool-print-body-cell.js +50 -6
  51. package/es/ele-pro-table/components/tool-print-header-cell.js +4 -1
  52. package/es/ele-pro-table/components/tool-print.d.ts +29 -50
  53. package/es/ele-pro-table/components/tool-print.js +174 -69
  54. package/es/ele-pro-table/index.js +59 -50
  55. package/es/ele-pro-table/style/index.scss +9 -0
  56. package/es/ele-pro-table/types.d.ts +32 -0
  57. package/es/ele-pro-table/util.d.ts +18 -3
  58. package/es/ele-pro-table/util.js +160 -28
  59. package/es/ele-table/style/index.scss +16 -0
  60. package/es/ele-tooltip/index.d.ts +3 -3
  61. package/es/ele-virtual-table/util.d.ts +3 -1
  62. package/es/ele-virtual-table/util.js +7 -2
  63. package/es/icons/LoadingOutlined.js +1 -1
  64. package/es/lang/en_US.js +7 -1
  65. package/es/lang/zh_CN.js +7 -1
  66. package/es/lang/zh_TW.js +7 -1
  67. package/es/style/themes/default.scss +82 -85
  68. package/es/style/themes/rounded.scss +11 -15
  69. package/es/utils/core.d.ts +7 -0
  70. package/es/utils/core.js +16 -2
  71. package/es/utils/message-box.d.ts +25 -0
  72. package/es/utils/message-box.js +71 -0
  73. package/es/utils/message.d.ts +44 -20
  74. package/es/utils/message.js +220 -37
  75. package/lib/core-export.cjs +8 -0
  76. package/lib/core-export.d.ts +1 -0
  77. package/lib/ele-alert/index.d.ts +2 -2
  78. package/lib/ele-alert/props.d.ts +1 -1
  79. package/lib/ele-app/components/message-body.cjs +91 -0
  80. package/lib/ele-app/components/message-body.d.ts +39 -0
  81. package/lib/ele-app/el.d.ts +2 -0
  82. package/lib/ele-app/style/message/css-var.scss +0 -4
  83. package/lib/ele-app/style/message/index.scss +199 -77
  84. package/lib/ele-app/style/overwrite/input/index.scss +2 -0
  85. package/lib/ele-app/style/overwrite/message-box/index.scss +31 -0
  86. package/lib/ele-app/style/overwrite/tag/css-var.scss +0 -16
  87. package/lib/ele-app/style/overwrite/tag/index.scss +57 -14
  88. package/lib/ele-app/types.d.ts +6 -1
  89. package/lib/ele-config-provider/components/receiver-view.cjs +1 -1
  90. package/lib/ele-config-provider/index.cjs +18 -4
  91. package/lib/ele-config-provider/index.d.ts +8 -4
  92. package/lib/ele-config-provider/props.cjs +9 -5
  93. package/lib/ele-config-provider/props.d.ts +9 -4
  94. package/lib/ele-config-provider/receiver.cjs +1 -1
  95. package/lib/ele-config-provider/types.d.ts +22 -1
  96. package/lib/ele-data-table/types.d.ts +2 -0
  97. package/lib/ele-drawer/index.d.ts +2 -2
  98. package/lib/ele-edit-tag/index.cjs +4 -2
  99. package/lib/ele-edit-tag/index.d.ts +9 -4
  100. package/lib/ele-edit-tag/props.cjs +2 -0
  101. package/lib/ele-edit-tag/props.d.ts +3 -1
  102. package/lib/ele-edit-tag/style/index.scss +11 -4
  103. package/lib/ele-icon-select/index.d.ts +10 -12
  104. package/lib/ele-icon-select/props.d.ts +1 -1
  105. package/lib/ele-map-picker/index.d.ts +1 -1
  106. package/lib/ele-menus/index.cjs +11 -0
  107. package/lib/ele-menus/index.d.ts +2 -2
  108. package/lib/ele-modal/index.d.ts +3 -3
  109. package/lib/ele-modal/style/index.scss +2 -0
  110. package/lib/ele-modal/util.cjs +1 -3
  111. package/lib/ele-modal/util.d.ts +1 -1
  112. package/lib/ele-popconfirm/index.d.ts +3 -3
  113. package/lib/ele-popconfirm/props.d.ts +1 -1
  114. package/lib/ele-popover/index.d.ts +2 -2
  115. package/lib/ele-pro-layout/components/pro-header.d.ts +1 -1
  116. package/lib/ele-pro-layout/components/pro-sidebar.d.ts +1 -1
  117. package/lib/ele-pro-layout/index.cjs +1 -1
  118. package/lib/ele-pro-layout/types.d.ts +4 -4
  119. package/lib/ele-pro-table/components/table-tools.cjs +14 -26
  120. package/lib/ele-pro-table/components/table-tools.d.ts +11 -2
  121. package/lib/ele-pro-table/components/tool-column.d.ts +1 -0
  122. package/lib/ele-pro-table/components/tool-export.cjs +99 -51
  123. package/lib/ele-pro-table/components/tool-export.d.ts +29 -56
  124. package/lib/ele-pro-table/components/tool-print-body-cell.cjs +49 -5
  125. package/lib/ele-pro-table/components/tool-print-header-cell.cjs +4 -1
  126. package/lib/ele-pro-table/components/tool-print.cjs +172 -67
  127. package/lib/ele-pro-table/components/tool-print.d.ts +29 -50
  128. package/lib/ele-pro-table/index.cjs +59 -50
  129. package/lib/ele-pro-table/style/index.scss +9 -0
  130. package/lib/ele-pro-table/types.d.ts +32 -0
  131. package/lib/ele-pro-table/util.cjs +160 -28
  132. package/lib/ele-pro-table/util.d.ts +18 -3
  133. package/lib/ele-table/style/index.scss +16 -0
  134. package/lib/ele-tooltip/index.d.ts +3 -3
  135. package/lib/ele-virtual-table/util.cjs +7 -2
  136. package/lib/ele-virtual-table/util.d.ts +3 -1
  137. package/lib/icons/LoadingOutlined.cjs +1 -1
  138. package/lib/lang/en_US.cjs +7 -1
  139. package/lib/lang/zh_CN.cjs +7 -1
  140. package/lib/lang/zh_TW.cjs +7 -1
  141. package/lib/style/themes/default.scss +82 -85
  142. package/lib/style/themes/rounded.scss +11 -15
  143. package/lib/utils/core.cjs +16 -2
  144. package/lib/utils/core.d.ts +7 -0
  145. package/lib/utils/message-box.cjs +71 -0
  146. package/lib/utils/message-box.d.ts +25 -0
  147. package/lib/utils/message.cjs +216 -33
  148. package/lib/utils/message.d.ts +44 -20
  149. package/package.json +14 -14
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  const vue = require("vue");
3
+ const elementPlus = require("element-plus");
4
+ const icons = require("../../icons");
3
5
  const util = require("../../ele-virtual-table/util");
4
6
  const _sfc_main = vue.defineComponent({
5
7
  name: "ToolPrintBodyCell",
6
- components: { CellRender: util.CellRender },
8
+ components: { ElIcon: elementPlus.ElIcon, ArrowDown: icons.ArrowDown, CellRender: util.CellRender },
7
9
  props: {
8
10
  /** 列数据 */
9
11
  col: {
@@ -21,8 +23,9 @@ const _sfc_main = vue.defineComponent({
21
23
  const renderOpt = vue.computed(() => {
22
24
  const { text, row, column, index: $index } = props.col;
23
25
  const params = [{ row, column, $index }];
24
- if (column && !["expand", "selection", "index"].includes(column.type || "") && column.slot && typeof slots[column.slot] === "function") {
25
- return { render: slots[column.slot], params };
26
+ const slotName = column ? column.printSlot || column.slot : void 0;
27
+ if (column && !["expand", "selection", "index"].includes(column.type || "") && slotName && typeof slots[slotName] === "function") {
28
+ return { render: slots[slotName], params };
26
29
  }
27
30
  return { render: () => text, params };
28
31
  });
@@ -36,13 +39,16 @@ const _sfc_main = vue.defineComponent({
36
39
  });
37
40
  const cellStyle = vue.computed(() => {
38
41
  if (typeof props.bodyCellStyle === "function") {
42
+ if (cellParam.value.column == null) {
43
+ return;
44
+ }
39
45
  return props.bodyCellStyle(cellParam.value);
40
46
  }
41
47
  return props.bodyCellStyle;
42
48
  });
43
49
  const cellClass = vue.computed(() => {
44
50
  const classes = [];
45
- const column = props.col.column;
51
+ const column = cellParam.value.column;
46
52
  if (column) {
47
53
  if (column.align) {
48
54
  classes.push("is-align-" + column.align);
@@ -73,6 +79,9 @@ const _export_sfc = (sfc, props) => {
73
79
  };
74
80
  const _hoisted_1 = ["colspan", "rowspan"];
75
81
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
82
+ var _a;
83
+ const _component_ArrowDown = vue.resolveComponent("ArrowDown");
84
+ const _component_ElIcon = vue.resolveComponent("ElIcon");
76
85
  const _component_CellRender = vue.resolveComponent("CellRender");
77
86
  return vue.openBlock(), vue.createElementBlock("td", {
78
87
  colspan: _ctx.col.colspan,
@@ -80,7 +89,42 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
80
89
  style: vue.normalizeStyle(_ctx.cellStyle),
81
90
  class: vue.normalizeClass(_ctx.cellClass)
82
91
  }, [
83
- vue.createVNode(_component_CellRender, vue.normalizeProps(vue.guardReactiveProps(_ctx.renderOpt)), null, 16)
92
+ "expand" === ((_a = _ctx.col.column) == null ? void 0 : _a.type) ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
93
+ _ctx.col.text ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
94
+ vue.createTextVNode(vue.toDisplayString(_ctx.col.text), 1)
95
+ ], 64)) : (vue.openBlock(), vue.createBlock(_component_ElIcon, {
96
+ key: 1,
97
+ style: { "vertical-align": "middle" },
98
+ class: "ele-print-expand-icon"
99
+ }, {
100
+ default: vue.withCtx(() => [
101
+ vue.createVNode(_component_ArrowDown)
102
+ ]),
103
+ _: 1
104
+ }))
105
+ ], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
106
+ _ctx.col.isTreeCell ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
107
+ _ctx.col.indent ? (vue.openBlock(), vue.createElementBlock("span", {
108
+ key: 0,
109
+ style: vue.normalizeStyle({ paddingLeft: `${_ctx.col.indent * 16}px` }),
110
+ class: "ele-print-tree-indent"
111
+ }, null, 4)) : vue.createCommentVNode("", true),
112
+ vue.createVNode(_component_ElIcon, {
113
+ style: vue.normalizeStyle({
114
+ verticalAlign: "middle",
115
+ marginRight: "2px",
116
+ visibility: _ctx.col.isTreeLeaf ? "hidden" : void 0
117
+ }),
118
+ class: "ele-print-tree-icon"
119
+ }, {
120
+ default: vue.withCtx(() => [
121
+ vue.createVNode(_component_ArrowDown)
122
+ ]),
123
+ _: 1
124
+ }, 8, ["style"])
125
+ ], 64)) : vue.createCommentVNode("", true),
126
+ vue.createVNode(_component_CellRender, vue.normalizeProps(vue.guardReactiveProps(_ctx.renderOpt)), null, 16)
127
+ ], 64))
84
128
  ], 14, _hoisted_1);
85
129
  }
86
130
  const toolPrintBodyCell = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
@@ -35,13 +35,16 @@ const _sfc_main = vue.defineComponent({
35
35
  });
36
36
  const cellStyle = vue.computed(() => {
37
37
  if (typeof props.headerCellStyle === "function") {
38
+ if (cellParam.value.column == null) {
39
+ return;
40
+ }
38
41
  return props.headerCellStyle(cellParam.value);
39
42
  }
40
43
  return props.headerCellStyle;
41
44
  });
42
45
  const cellClass = vue.computed(() => {
43
46
  const classes = [];
44
- const column = props.col.column;
47
+ const column = cellParam.value.column;
45
48
  if (column) {
46
49
  const align = column.headerAlign || column.align;
47
50
  if (align) {
@@ -33,30 +33,13 @@ const _sfc_main = vue.defineComponent({
33
33
  ToolPrintHeaderCell
34
34
  },
35
35
  props: {
36
- /** 提示文字 */
37
- title: String,
38
36
  /** 提示位置 */
39
37
  placement: String,
40
- /** 全选文字 */
41
- checkAllText: String,
42
- /** 重置文字 */
43
- resetText: String,
44
- /** 无标题列文字 */
45
- untitledText: String,
46
- /** 选择数据文字 */
47
- selectDataText: String,
48
- /** 选择字段文字 */
49
- selectColumnText: String,
50
- /** 当前页数据文字 */
51
- dataTypePageText: String,
52
- /** 选中数据文字 */
53
- dataTypeSelectedText: String,
54
- /** 全部数据文字 */
55
- dataTypeAllText: String,
56
- /** 取消文字 */
57
- cancelText: String,
58
- /** 确定文字 */
59
- okText: String,
38
+ /** 表格国际化 */
39
+ locale: {
40
+ type: Object,
41
+ required: true
42
+ },
60
43
  /** 弹窗参数 */
61
44
  modalProps: Object,
62
45
  /** 打印组件参数 */
@@ -73,6 +56,8 @@ const _sfc_main = vue.defineComponent({
73
56
  datasource: [Array, Function],
74
57
  /** 单元格合并行列方法 */
75
58
  spanMethod: Function,
59
+ /** 表格是否有表头 */
60
+ tableHeader: Boolean,
76
61
  /** 是否显示合计行 */
77
62
  showSummary: Boolean,
78
63
  /** 合计行文本 */
@@ -89,6 +74,8 @@ const _sfc_main = vue.defineComponent({
89
74
  headerCellClassName: [String, Function],
90
75
  /** 序号列起始索引 */
91
76
  pageIndex: Number,
77
+ /** 子级字段名 */
78
+ childrenField: String,
92
79
  /** 表格请求数据方法 */
93
80
  fetch: Function,
94
81
  /** 默认数据类型 */
@@ -106,6 +93,10 @@ const _sfc_main = vue.defineComponent({
106
93
  const colItems = vue.ref([]);
107
94
  const isCheckAll = vue.ref(false);
108
95
  const isIndeterminate = vue.ref(false);
96
+ const showHeader = vue.ref(true);
97
+ const showFooter = vue.ref(false);
98
+ const showTreeIndex = vue.ref(false);
99
+ const treeIndexDisabled = vue.ref(true);
109
100
  const printOptions = vue.reactive({
110
101
  printing: false,
111
102
  headerData: [],
@@ -144,9 +135,12 @@ const _sfc_main = vue.defineComponent({
144
135
  columns,
145
136
  props.spanMethod,
146
137
  props.pageIndex,
147
- props.showSummary,
138
+ showFooter.value,
148
139
  props.sumText,
149
- props.summaryMethod
140
+ props.summaryMethod,
141
+ props.childrenField,
142
+ showTreeIndex.value,
143
+ showHeader.value
150
144
  );
151
145
  if (typeof props.beforePrint === "function") {
152
146
  const flag = props.beforePrint({
@@ -202,7 +196,9 @@ const _sfc_main = vue.defineComponent({
202
196
  const initColItems = () => {
203
197
  colItems.value = util$1.getColItems(
204
198
  props.columns,
205
- props.untitledText,
199
+ props.locale.columnUntitled,
200
+ props.locale.columnIndex,
201
+ props.locale.columnExpand,
206
202
  util$1.columnsPrintFilter,
207
203
  true,
208
204
  true
@@ -223,11 +219,12 @@ const _sfc_main = vue.defineComponent({
223
219
  isCheckAll.value = colItems.value.length > 0 && checkAll;
224
220
  isIndeterminate.value = !checkAll && indeterminate;
225
221
  };
226
- const onCheckedChange = (item, checked) => {
222
+ const onCheckedChange = (item, checked, type) => {
227
223
  let checkAll = true;
228
224
  let indeterminate = false;
229
225
  core.eachTree(colItems.value, (d) => {
230
- if (d.uid === item.uid) {
226
+ const flag = item == null ? type === d.type : d.uid === item.uid;
227
+ if (flag) {
231
228
  d.checked = checked;
232
229
  }
233
230
  if (!d.checked && checkAll) {
@@ -236,7 +233,7 @@ const _sfc_main = vue.defineComponent({
236
233
  if (d.checked && !indeterminate) {
237
234
  indeterminate = true;
238
235
  }
239
- if (d.uid === item.uid && !checkAll && indeterminate) {
236
+ if (flag && !checkAll && indeterminate) {
240
237
  return false;
241
238
  }
242
239
  });
@@ -267,10 +264,27 @@ const _sfc_main = vue.defineComponent({
267
264
  const onReset = () => {
268
265
  initColItems();
269
266
  };
267
+ const handleTreeIndexChange = (checked) => {
268
+ if (checked) {
269
+ onCheckedChange(void 0, false, "index");
270
+ }
271
+ };
270
272
  vue.watch(visible, (visible2) => {
271
273
  if (visible2) {
272
274
  dataType.value = props.defaultDataType;
273
275
  initColItems();
276
+ showHeader.value = props.tableHeader;
277
+ showFooter.value = props.showSummary;
278
+ treeIndexDisabled.value = !(props.pageData && props.pageData.some(
279
+ (d) => {
280
+ var _a;
281
+ return props.childrenField && ((_a = d[props.childrenField]) == null ? void 0 : _a.length);
282
+ }
283
+ )) && core.findTree(colItems.value, (c) => c.type === "expand") == null;
284
+ if (treeIndexDisabled.value) {
285
+ showTreeIndex.value = false;
286
+ }
287
+ handleTreeIndexChange(showTreeIndex.value);
274
288
  return;
275
289
  }
276
290
  printOptions.data = [];
@@ -290,6 +304,10 @@ const _sfc_main = vue.defineComponent({
290
304
  colItems,
291
305
  isCheckAll,
292
306
  isIndeterminate,
307
+ showHeader,
308
+ showFooter,
309
+ showTreeIndex,
310
+ treeIndexDisabled,
293
311
  printOptions,
294
312
  openModal,
295
313
  closeModal,
@@ -298,7 +316,8 @@ const _sfc_main = vue.defineComponent({
298
316
  onCheckedChange,
299
317
  onSortChange,
300
318
  onCheckAllChange,
301
- onReset
319
+ onReset,
320
+ handleTreeIndexChange
302
321
  };
303
322
  }
304
323
  });
@@ -312,9 +331,14 @@ const _export_sfc = (sfc, props) => {
312
331
  const _hoisted_1 = { class: "ele-tool-column is-sortable" };
313
332
  const _hoisted_2 = { class: "ele-tool-column-header" };
314
333
  const _hoisted_3 = { class: "ele-tool-column-label" };
315
- const _hoisted_4 = ["width"];
316
- const _hoisted_5 = { key: 0 };
317
- const _hoisted_6 = { key: 1 };
334
+ const _hoisted_4 = { class: "ele-tool-form-options" };
335
+ const _hoisted_5 = ["width"];
336
+ const _hoisted_6 = { key: 0 };
337
+ const _hoisted_7 = ["colspan", "rowspan"];
338
+ const _hoisted_8 = ["rowspan", "colspan"];
339
+ const _hoisted_9 = ["colspan", "rowspan"];
340
+ const _hoisted_10 = { key: 1 };
341
+ const _hoisted_11 = ["colspan", "rowspan"];
318
342
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
319
343
  const _component_PrinterOutlined = vue.resolveComponent("PrinterOutlined");
320
344
  const _component_ElIcon = vue.resolveComponent("ElIcon");
@@ -333,7 +357,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
333
357
  const _component_ElePrinter = vue.resolveComponent("ElePrinter");
334
358
  const _component_EleTool = vue.resolveComponent("EleTool");
335
359
  return vue.openBlock(), vue.createBlock(_component_EleTool, {
336
- title: _ctx.title,
360
+ title: _ctx.locale.print,
337
361
  placement: _ctx.placement,
338
362
  onClick: _ctx.openModal
339
363
  }, {
@@ -347,16 +371,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
347
371
  vue.createVNode(_component_EleModal, vue.mergeProps({
348
372
  form: true,
349
373
  width: "460px",
350
- title: _ctx.title,
374
+ title: _ctx.locale.print,
351
375
  position: "center"
352
376
  }, _ctx.modalProps || {}, {
353
377
  modelValue: _ctx.visible,
354
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.visible = $event)
378
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => _ctx.visible = $event)
355
379
  }), {
356
380
  footer: vue.withCtx(() => [
357
381
  vue.createVNode(_component_ElButton, { onClick: _ctx.closeModal }, {
358
382
  default: vue.withCtx(() => [
359
- vue.createTextVNode(vue.toDisplayString(_ctx.cancelText), 1)
383
+ vue.createTextVNode(vue.toDisplayString(_ctx.locale.exportCancel), 1)
360
384
  ]),
361
385
  _: 1
362
386
  }, 8, ["onClick"]),
@@ -366,7 +390,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
366
390
  onClick: _ctx.handlePrint
367
391
  }, {
368
392
  default: vue.withCtx(() => [
369
- vue.createTextVNode(vue.toDisplayString(_ctx.okText), 1)
393
+ vue.createTextVNode(vue.toDisplayString(_ctx.locale.exportOk), 1)
370
394
  ]),
371
395
  _: 1
372
396
  }, 8, ["loading", "onClick"])
@@ -374,33 +398,35 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
374
398
  default: vue.withCtx(() => [
375
399
  vue.createVNode(_component_ElForm, {
376
400
  labelWidth: "80px",
377
- onSubmit: _cache[2] || (_cache[2] = vue.withModifiers(() => {
401
+ onSubmit: _cache[5] || (_cache[5] = vue.withModifiers(() => {
378
402
  }, ["prevent"])),
379
403
  class: "ele-tool-print-form"
380
404
  }, {
381
405
  default: vue.withCtx(() => [
382
- vue.createVNode(_component_ElFormItem, { label: _ctx.selectDataText }, {
406
+ vue.createVNode(_component_ElFormItem, {
407
+ label: _ctx.locale.exportSelectData
408
+ }, {
383
409
  default: vue.withCtx(() => [
384
410
  vue.createVNode(_component_ElSelect, {
385
411
  modelValue: _ctx.dataType,
386
412
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.dataType = $event),
387
- placeholder: _ctx.selectDataText
413
+ placeholder: _ctx.locale.exportSelectData
388
414
  }, {
389
415
  default: vue.withCtx(() => [
390
416
  _ctx.pageData != null ? (vue.openBlock(), vue.createBlock(_component_ElOption, {
391
417
  key: 0,
392
418
  value: "pageData",
393
- label: _ctx.dataTypePageText
419
+ label: _ctx.locale.exportDataTypePage
394
420
  }, null, 8, ["label"])) : vue.createCommentVNode("", true),
395
421
  _ctx.selections != null ? (vue.openBlock(), vue.createBlock(_component_ElOption, {
396
422
  key: 1,
397
423
  value: "selections",
398
- label: _ctx.dataTypeSelectedText
424
+ label: _ctx.locale.exportDataTypeSelected
399
425
  }, null, 8, ["label"])) : vue.createCommentVNode("", true),
400
426
  _ctx.datasource != null ? (vue.openBlock(), vue.createBlock(_component_ElOption, {
401
427
  key: 2,
402
428
  value: "data",
403
- label: _ctx.dataTypeAllText
429
+ label: _ctx.locale.exportDataTypeAll
404
430
  }, null, 8, ["label"])) : vue.createCommentVNode("", true)
405
431
  ]),
406
432
  _: 1
@@ -408,13 +434,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
408
434
  ]),
409
435
  _: 1
410
436
  }, 8, ["label"]),
411
- vue.createVNode(_component_ElFormItem, { label: _ctx.selectColumnText }, {
437
+ vue.createVNode(_component_ElFormItem, {
438
+ label: _ctx.locale.exportSelectColumn
439
+ }, {
412
440
  default: vue.withCtx(() => [
413
441
  vue.createElementVNode("div", _hoisted_1, [
414
442
  vue.createElementVNode("div", _hoisted_2, [
415
443
  vue.createElementVNode("div", _hoisted_3, [
416
444
  vue.createVNode(_component_ElCheckbox, {
417
- label: _ctx.checkAllText,
445
+ label: _ctx.locale.columnTitle,
418
446
  modelValue: _ctx.isCheckAll,
419
447
  indeterminate: _ctx.isIndeterminate,
420
448
  "onUpdate:modelValue": _ctx.onCheckAllChange
@@ -423,7 +451,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
423
451
  vue.createElementVNode("div", {
424
452
  class: "ele-tool-column-link",
425
453
  onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onReset && _ctx.onReset(...args))
426
- }, vue.toDisplayString(_ctx.resetText), 1)
454
+ }, vue.toDisplayString(_ctx.locale.columnReset), 1)
427
455
  ]),
428
456
  vue.createVNode(_component_ToolColumnList, {
429
457
  data: _ctx.colItems,
@@ -434,6 +462,34 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
434
462
  ])
435
463
  ]),
436
464
  _: 1
465
+ }, 8, ["label"]),
466
+ vue.createVNode(_component_ElFormItem, {
467
+ label: _ctx.locale.exportOther
468
+ }, {
469
+ default: vue.withCtx(() => [
470
+ vue.createElementVNode("div", _hoisted_4, [
471
+ vue.createVNode(_component_ElCheckbox, {
472
+ label: _ctx.locale.exportOtherHeader,
473
+ modelValue: _ctx.showHeader,
474
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.showHeader = $event),
475
+ disabled: !_ctx.tableHeader
476
+ }, null, 8, ["label", "modelValue", "disabled"]),
477
+ vue.createVNode(_component_ElCheckbox, {
478
+ label: _ctx.locale.exportOtherFooter,
479
+ modelValue: _ctx.showFooter,
480
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.showFooter = $event),
481
+ disabled: !_ctx.showSummary
482
+ }, null, 8, ["label", "modelValue", "disabled"]),
483
+ vue.createVNode(_component_ElCheckbox, {
484
+ label: _ctx.locale.exportOtherTreeIndex,
485
+ modelValue: _ctx.showTreeIndex,
486
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.showTreeIndex = $event),
487
+ disabled: _ctx.treeIndexDisabled,
488
+ onChange: _ctx.handleTreeIndexChange
489
+ }, null, 8, ["label", "modelValue", "disabled", "onChange"])
490
+ ])
491
+ ]),
492
+ _: 1
437
493
  }, 8, ["label"])
438
494
  ]),
439
495
  _: 1
@@ -443,7 +499,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
443
499
  }, 16, ["title", "modelValue"]),
444
500
  vue.createVNode(_component_ElePrinter, vue.mergeProps({ target: "_iframe" }, _ctx.printerProps || {}, {
445
501
  modelValue: _ctx.printOptions.printing,
446
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.printOptions.printing = $event),
502
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => _ctx.printOptions.printing = $event),
447
503
  onDone: _ctx.onPrintDone
448
504
  }), {
449
505
  default: vue.withCtx(() => [
@@ -462,16 +518,25 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
462
518
  return vue.openBlock(), vue.createElementBlock("col", {
463
519
  key: col.key,
464
520
  width: col.width
465
- }, null, 8, _hoisted_4);
521
+ }, null, 8, _hoisted_5);
466
522
  }), 128))
467
523
  ]),
468
- _ctx.printOptions.hasHeader ? (vue.openBlock(), vue.createElementBlock("thead", _hoisted_5, [
524
+ _ctx.printOptions.hasHeader ? (vue.openBlock(), vue.createElementBlock("thead", _hoisted_6, [
469
525
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.printOptions.headerData, (item, index) => {
470
526
  return vue.openBlock(), vue.createElementBlock("tr", { key: index }, [
471
527
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item, (col, columnIndex) => {
472
- return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
473
- col.rowspan != 0 && col.colspan != 0 ? (vue.openBlock(), vue.createBlock(_component_ToolPrintHeaderCell, {
474
- key: col.key,
528
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
529
+ key: col.key
530
+ }, [
531
+ col.isTreeIndex ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
532
+ col.rowspan !== 0 && col.colspan !== 0 ? (vue.openBlock(), vue.createElementBlock("th", {
533
+ key: 0,
534
+ colspan: col.colspan,
535
+ rowspan: col.rowspan,
536
+ class: "ele-print-tree-index"
537
+ }, null, 8, _hoisted_7)) : vue.createCommentVNode("", true)
538
+ ], 64)) : col.rowspan !== 0 && col.colspan !== 0 ? (vue.openBlock(), vue.createBlock(_component_ToolPrintHeaderCell, {
539
+ key: 1,
475
540
  col,
476
541
  columnIndex,
477
542
  headerCellStyle: _ctx.headerCellStyle,
@@ -489,7 +554,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
489
554
  })
490
555
  ]), 1032, ["col", "columnIndex", "headerCellStyle", "headerCellClass"])) : vue.createCommentVNode("", true)
491
556
  ], 64);
492
- }), 256))
557
+ }), 128))
493
558
  ]);
494
559
  }), 128))
495
560
  ])) : vue.createCommentVNode("", true),
@@ -497,9 +562,44 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
497
562
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.printOptions.bodyData, (item, index) => {
498
563
  return vue.openBlock(), vue.createElementBlock("tr", { key: index }, [
499
564
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item, (col, columnIndex) => {
500
- return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
501
- col.rowspan != 0 && col.colspan != 0 ? (vue.openBlock(), vue.createBlock(_component_ToolPrintBodyCell, {
502
- key: col.key,
565
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
566
+ key: col.key
567
+ }, [
568
+ col.isExpandCell ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
569
+ col.rowspan !== 0 && col.colspan !== 0 ? (vue.openBlock(), vue.createElementBlock("td", {
570
+ key: 0,
571
+ rowspan: col.rowspan,
572
+ colspan: col.colspan,
573
+ style: { "padding-left": "0", "padding-right": "0" },
574
+ class: "ele-print-expand-td"
575
+ }, [
576
+ col.column && (col.column.printSlot || col.column.slot) && !["printTop", "printBottom"].includes(
577
+ col.column.printSlot || col.column.slot
578
+ ) ? vue.renderSlot(_ctx.$slots, col.column.printSlot || col.column.slot, vue.normalizeProps(vue.mergeProps({ key: 0 }, {
579
+ row: col.row,
580
+ column: col.column,
581
+ $index: col.index
582
+ }))) : vue.createCommentVNode("", true)
583
+ ], 8, _hoisted_8)) : vue.createCommentVNode("", true)
584
+ ], 64)) : col.isTreeIndex ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
585
+ col.rowspan !== 0 && col.colspan !== 0 ? (vue.openBlock(), vue.createElementBlock("td", {
586
+ key: 0,
587
+ colspan: col.colspan,
588
+ rowspan: col.rowspan,
589
+ style: vue.normalizeStyle({
590
+ paddingLeft: 0,
591
+ paddingRight: 0,
592
+ textAlign: "center",
593
+ verticalAlign: "top",
594
+ borderLeftColor: col.text ? void 0 : "transparent"
595
+ }),
596
+ class: vue.normalizeClass([
597
+ "ele-print-tree-index",
598
+ { "is-placeholder": !col.text }
599
+ ])
600
+ }, vue.toDisplayString(col.text), 15, _hoisted_9)) : vue.createCommentVNode("", true)
601
+ ], 64)) : col.rowspan !== 0 && col.colspan !== 0 ? (vue.openBlock(), vue.createBlock(_component_ToolPrintBodyCell, {
602
+ key: 2,
503
603
  col,
504
604
  columnIndex,
505
605
  bodyCellStyle: _ctx.cellStyle,
@@ -517,23 +617,28 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
517
617
  })
518
618
  ]), 1032, ["col", "columnIndex", "bodyCellStyle", "bodyCellClass"])) : vue.createCommentVNode("", true)
519
619
  ], 64);
520
- }), 256))
620
+ }), 128))
521
621
  ]);
522
622
  }), 128))
523
623
  ]),
524
- _ctx.printOptions.hasFooter ? (vue.openBlock(), vue.createElementBlock("tfoot", _hoisted_6, [
624
+ _ctx.printOptions.hasFooter ? (vue.openBlock(), vue.createElementBlock("tfoot", _hoisted_10, [
525
625
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.printOptions.footerData, (item, index) => {
526
626
  return vue.openBlock(), vue.createElementBlock("tr", { key: index }, [
527
627
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item, (col) => {
528
- return vue.openBlock(), vue.createElementBlock("td", {
529
- key: col.key
530
- }, [
531
- vue.createVNode(_component_CellRender, {
532
- render: () => col.text,
533
- params: []
534
- }, null, 8, ["render"])
535
- ]);
536
- }), 128))
628
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
629
+ col.rowspan !== 0 && col.colspan !== 0 ? (vue.openBlock(), vue.createElementBlock("td", {
630
+ key: col.key,
631
+ colspan: col.colspan,
632
+ rowspan: col.rowspan
633
+ }, [
634
+ !col.isExpandCell ? (vue.openBlock(), vue.createBlock(_component_CellRender, {
635
+ key: 0,
636
+ render: () => col.text,
637
+ params: []
638
+ }, null, 8, ["render"])) : vue.createCommentVNode("", true)
639
+ ], 8, _hoisted_11)) : vue.createCommentVNode("", true)
640
+ ], 64);
641
+ }), 256))
537
642
  ]);
538
643
  }), 128))
539
644
  ])) : vue.createCommentVNode("", true)