vxe-table 3.10.0-beta.1 → 3.10.0-beta.3

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 (107) hide show
  1. package/es/locale/lang/en-US.js +1 -0
  2. package/es/locale/lang/es-ES.js +1 -0
  3. package/es/locale/lang/hu-HU.js +1 -0
  4. package/es/locale/lang/ja-JP.js +1 -0
  5. package/es/locale/lang/ko-KR.js +1 -0
  6. package/es/locale/lang/pt-BR.js +1 -0
  7. package/es/locale/lang/ru-RU.js +1 -0
  8. package/es/locale/lang/uk-UA.js +1 -0
  9. package/es/locale/lang/vi-VN.js +1 -0
  10. package/es/locale/lang/zh-CHT.js +1 -0
  11. package/es/locale/lang/zh-CN.js +1 -0
  12. package/es/style.css +1 -1
  13. package/es/style.min.css +1 -1
  14. package/es/table/module/export/export-panel.js +325 -258
  15. package/es/table/module/export/import-panel.js +138 -81
  16. package/es/table/module/export/mixin.js +14 -0
  17. package/es/table/src/body.js +0 -1
  18. package/es/table/src/methods.js +1 -1
  19. package/es/table/src/table.js +1 -1
  20. package/es/table/style.css +53 -70
  21. package/es/table/style.min.css +1 -1
  22. package/es/ui/index.js +1 -1
  23. package/es/ui/src/log.js +1 -1
  24. package/es/vxe-table/style.css +53 -70
  25. package/es/vxe-table/style.min.css +1 -1
  26. package/lib/index.umd.js +357 -242
  27. package/lib/index.umd.min.js +1 -1
  28. package/lib/locale/lang/en-US.js +1 -0
  29. package/lib/locale/lang/en-US.min.js +1 -1
  30. package/lib/locale/lang/en-US.umd.js +1 -0
  31. package/lib/locale/lang/es-ES.js +1 -0
  32. package/lib/locale/lang/es-ES.min.js +1 -1
  33. package/lib/locale/lang/es-ES.umd.js +1 -0
  34. package/lib/locale/lang/hu-HU.js +1 -0
  35. package/lib/locale/lang/hu-HU.min.js +1 -1
  36. package/lib/locale/lang/hu-HU.umd.js +1 -0
  37. package/lib/locale/lang/ja-JP.js +1 -0
  38. package/lib/locale/lang/ja-JP.min.js +1 -1
  39. package/lib/locale/lang/ja-JP.umd.js +1 -0
  40. package/lib/locale/lang/ko-KR.js +1 -0
  41. package/lib/locale/lang/ko-KR.min.js +1 -1
  42. package/lib/locale/lang/ko-KR.umd.js +1 -0
  43. package/lib/locale/lang/pt-BR.js +1 -0
  44. package/lib/locale/lang/pt-BR.min.js +1 -1
  45. package/lib/locale/lang/pt-BR.umd.js +1 -0
  46. package/lib/locale/lang/ru-RU.js +1 -0
  47. package/lib/locale/lang/ru-RU.min.js +1 -1
  48. package/lib/locale/lang/ru-RU.umd.js +1 -0
  49. package/lib/locale/lang/uk-UA.js +1 -0
  50. package/lib/locale/lang/uk-UA.min.js +1 -1
  51. package/lib/locale/lang/uk-UA.umd.js +1 -0
  52. package/lib/locale/lang/vi-VN.js +1 -0
  53. package/lib/locale/lang/vi-VN.min.js +1 -1
  54. package/lib/locale/lang/zh-CHT.js +1 -0
  55. package/lib/locale/lang/zh-CHT.min.js +1 -1
  56. package/lib/locale/lang/zh-CHT.umd.js +1 -0
  57. package/lib/locale/lang/zh-CN.js +1 -0
  58. package/lib/locale/lang/zh-CN.min.js +1 -1
  59. package/lib/locale/lang/zh-CN.umd.js +1 -0
  60. package/lib/style.css +1 -1
  61. package/lib/style.min.css +1 -1
  62. package/lib/table/module/export/export-panel.js +239 -185
  63. package/lib/table/module/export/export-panel.min.js +1 -1
  64. package/lib/table/module/export/import-panel.js +99 -52
  65. package/lib/table/module/export/import-panel.min.js +1 -1
  66. package/lib/table/module/export/mixin.js +14 -0
  67. package/lib/table/module/export/mixin.min.js +1 -1
  68. package/lib/table/src/body.js +0 -1
  69. package/lib/table/src/body.min.js +1 -1
  70. package/lib/table/src/methods.js +1 -1
  71. package/lib/table/src/methods.min.js +1 -1
  72. package/lib/table/src/table.js +1 -1
  73. package/lib/table/src/table.min.js +1 -1
  74. package/lib/table/style/style.css +53 -70
  75. package/lib/table/style/style.min.css +1 -1
  76. package/lib/ui/index.js +1 -1
  77. package/lib/ui/index.min.js +1 -1
  78. package/lib/ui/src/log.js +1 -1
  79. package/lib/ui/src/log.min.js +1 -1
  80. package/lib/vxe-table/style/style.css +53 -70
  81. package/lib/vxe-table/style/style.min.css +1 -1
  82. package/package.json +2 -2
  83. package/packages/locale/lang/en-US.ts +1 -0
  84. package/packages/locale/lang/es-ES.ts +1 -0
  85. package/packages/locale/lang/hu-HU.ts +1 -0
  86. package/packages/locale/lang/ja-JP.ts +1 -0
  87. package/packages/locale/lang/ko-KR.ts +1 -0
  88. package/packages/locale/lang/pt-BR.ts +1 -0
  89. package/packages/locale/lang/ru-RU.ts +1 -0
  90. package/packages/locale/lang/uk-UA.ts +1 -0
  91. package/packages/locale/lang/vi-VN.ts +1 -0
  92. package/packages/locale/lang/zh-CHT.ts +1 -0
  93. package/packages/locale/lang/zh-CN.ts +1 -0
  94. package/packages/table/module/export/export-panel.ts +323 -253
  95. package/packages/table/module/export/import-panel.ts +141 -79
  96. package/packages/table/module/export/mixin.ts +15 -0
  97. package/packages/table/src/body.ts +0 -1
  98. package/packages/table/src/methods.ts +1 -1
  99. package/packages/table/src/table.ts +1 -1
  100. package/styles/components/table-module/export.scss +17 -14
  101. package/styles/components/table.scss +6 -28
  102. /package/es/{iconfont.1730364042434.ttf → iconfont.1730447026880.ttf} +0 -0
  103. /package/es/{iconfont.1730364042434.woff → iconfont.1730447026880.woff} +0 -0
  104. /package/es/{iconfont.1730364042434.woff2 → iconfont.1730447026880.woff2} +0 -0
  105. /package/lib/{iconfont.1730364042434.ttf → iconfont.1730447026880.ttf} +0 -0
  106. /package/lib/{iconfont.1730364042434.woff → iconfont.1730447026880.woff} +0 -0
  107. /package/lib/{iconfont.1730364042434.woff2 → iconfont.1730447026880.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
2220
2220
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2221
2221
 
2222
2222
 
2223
- const version = "3.10.0-beta.1";
2223
+ const version = "3.10.0-beta.3";
2224
2224
  core_.VxeUI.version = version;
2225
2225
  core_.VxeUI.tableVersion = version;
2226
2226
  core_.VxeUI.setConfig({
@@ -2764,7 +2764,7 @@ function isNodeElement(elem) {
2764
2764
  const {
2765
2765
  log: log_log
2766
2766
  } = core_.VxeUI;
2767
- const log_version = `table v${"3.10.0-beta.1"}`;
2767
+ const log_version = `table v${"3.10.0-beta.3"}`;
2768
2768
  const warnLog = log_log.create('warn', log_version);
2769
2769
  const errLog = log_log.create('error', log_version);
2770
2770
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -11937,7 +11937,7 @@ const Methods = {
11937
11937
  }
11938
11938
  };
11939
11939
  // Module methods
11940
- const funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,openPrint,getPrintHtml,exportData,openImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom'.split(',');
11940
+ const funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom'.split(',');
11941
11941
  funcs.forEach(name => {
11942
11942
  Methods[name] = function (...args) {
11943
11943
  if (true) {
@@ -12278,7 +12278,6 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
12278
12278
  'col--tree-node': treeNode,
12279
12279
  'col--edit': isEdit,
12280
12280
  'col--ellipsis': hasEllipsis,
12281
- 'col--height': !!rowOpts.height,
12282
12281
  'fixed--hidden': fixedHiddenColumn,
12283
12282
  'col--dirty': isDirty,
12284
12283
  'col--active': editConfig && isEdit && actived.row === row && (actived.column === column || editOpts.mode === 'row'),
@@ -15058,7 +15057,8 @@ const {
15058
15057
  const {
15059
15058
  getI18n: import_panel_getI18n,
15060
15059
  getIcon: import_panel_getIcon,
15061
- globalMixins
15060
+ globalMixins,
15061
+ renderEmptyElement: import_panel_renderEmptyElement
15062
15062
  } = core_.VxeUI;
15063
15063
  /* harmony default export */ var import_panel = ({
15064
15064
  name: 'VxeTableImportPanel',
@@ -15071,6 +15071,11 @@ const {
15071
15071
  // VxeModal,
15072
15072
  // VxeRadio
15073
15073
  },
15074
+ inject: {
15075
+ $xeTable: {
15076
+ default: null
15077
+ }
15078
+ },
15074
15079
  data() {
15075
15080
  return {
15076
15081
  loading: false
@@ -15118,6 +15123,8 @@ const {
15118
15123
  }
15119
15124
  },
15120
15125
  render(h) {
15126
+ const $xeTable = this.$xeTable;
15127
+ const importOpts = $xeTable.importOpts;
15121
15128
  const {
15122
15129
  hasFile,
15123
15130
  parseTypeLabel,
@@ -15125,17 +15132,27 @@ const {
15125
15132
  storeData,
15126
15133
  selectName
15127
15134
  } = this;
15135
+ const slots = importOpts.slots || {};
15136
+ const topSlot = slots.top;
15137
+ const bottomSlot = slots.bottom;
15138
+ const defaultSlot = slots.default;
15139
+ const footerSlot = slots.footer;
15128
15140
  return h('vxe-modal', {
15129
15141
  ref: 'modal',
15130
15142
  props: {
15143
+ id: 'VXE_IMPORT_MODAL',
15131
15144
  value: storeData.visible,
15132
15145
  title: import_panel_getI18n('vxe.import.impTitle'),
15133
15146
  width: 540,
15147
+ minWidth: 360,
15148
+ minHeight: 240,
15134
15149
  mask: true,
15135
15150
  lockView: true,
15136
- showFooter: false,
15151
+ showFooter: true,
15137
15152
  escClosable: true,
15138
15153
  maskClosable: true,
15154
+ showMaximize: true,
15155
+ resize: true,
15139
15156
  loading: this.loading
15140
15157
  },
15141
15158
  on: {
@@ -15143,59 +15160,88 @@ const {
15143
15160
  storeData.visible = value;
15144
15161
  },
15145
15162
  show: this.showEvent
15146
- }
15147
- }, [h('div', {
15148
- class: 'vxe-export--panel'
15149
- }, [h('table', {
15150
- attrs: {
15151
- cellspacing: 0,
15152
- cellpadding: 0,
15153
- border: 0
15154
- }
15155
- }, [h('tbody', [h('tr', [h('td', import_panel_getI18n('vxe.import.impFile')), h('td', [hasFile ? h('div', {
15156
- class: 'vxe-import-selected--file',
15157
- attrs: {
15158
- title: selectName
15159
- }
15160
- }, [h('span', selectName), h('i', {
15161
- class: import_panel_getIcon().INPUT_CLEAR,
15162
- on: {
15163
- click: this.clearFileEvent
15164
- }
15165
- })]) : h('button', {
15166
- ref: 'fileBtn',
15167
- class: 'vxe-import-select--file',
15168
- attrs: {
15169
- type: 'button'
15170
- },
15171
- on: {
15172
- click: this.selectFileEvent
15173
- }
15174
- }, import_panel_getI18n('vxe.import.impSelect'))])]), h('tr', [h('td', import_panel_getI18n('vxe.import.impType')), h('td', parseTypeLabel)]), h('tr', [h('td', import_panel_getI18n('vxe.import.impMode')), h('td', [h('vxe-select', {
15175
- props: {
15176
- value: defaultOptions.mode,
15177
- options: storeData.modeList
15178
15163
  },
15179
- on: {
15180
- input(value) {
15181
- defaultOptions.mode = value;
15164
+ scopedSlots: {
15165
+ default: () => {
15166
+ const params = {
15167
+ $table: $xeTable,
15168
+ $grid: $xeTable.xegrid,
15169
+ options: importOpts,
15170
+ params: importOpts.params
15171
+ };
15172
+ return h('div', {
15173
+ class: 'vxe-table-export--panel'
15174
+ }, [topSlot ? h('div', {
15175
+ class: 'vxe-table-export--panel-top'
15176
+ }, $xeTable.callSlot(topSlot, params, h)) : import_panel_renderEmptyElement(this), h('div', {
15177
+ class: 'vxe-table-export--panel-body'
15178
+ }, defaultSlot ? $xeTable.callSlot(defaultSlot, params, h) : [h('table', {
15179
+ class: 'vxe-table-export--panel-table',
15180
+ attrs: {
15181
+ cellspacing: 0,
15182
+ cellpadding: 0,
15183
+ border: 0
15184
+ }
15185
+ }, [h('tbody', [h('tr', [h('td', import_panel_getI18n('vxe.import.impFile')), h('td', [hasFile ? h('div', {
15186
+ class: 'vxe-table-export--selected--file',
15187
+ attrs: {
15188
+ title: selectName
15189
+ }
15190
+ }, [h('span', selectName), h('i', {
15191
+ class: import_panel_getIcon().INPUT_CLEAR,
15192
+ on: {
15193
+ click: this.clearFileEvent
15194
+ }
15195
+ })]) : h('button', {
15196
+ ref: 'fileBtn',
15197
+ class: 'vxe-table-export--select--file',
15198
+ attrs: {
15199
+ type: 'button'
15200
+ },
15201
+ on: {
15202
+ click: this.selectFileEvent
15203
+ }
15204
+ }, import_panel_getI18n('vxe.import.impSelect'))])]), h('tr', [h('td', import_panel_getI18n('vxe.import.impType')), h('td', parseTypeLabel)]), h('tr', [h('td', import_panel_getI18n('vxe.import.impMode')), h('td', [h('vxe-select', {
15205
+ props: {
15206
+ value: defaultOptions.mode,
15207
+ options: storeData.modeList
15208
+ },
15209
+ on: {
15210
+ input(value) {
15211
+ defaultOptions.mode = value;
15212
+ }
15213
+ }
15214
+ })])])])])]), bottomSlot ? h('div', {
15215
+ class: 'vxe-table-export--panel-bottom'
15216
+ }, $xeTable.callSlot(bottomSlot, params, h)) : import_panel_renderEmptyElement(this)]);
15217
+ },
15218
+ footer: () => {
15219
+ const params = {
15220
+ $table: $xeTable,
15221
+ $grid: $xeTable.xegrid,
15222
+ options: importOpts,
15223
+ params: importOpts.params
15224
+ };
15225
+ return h('div', {
15226
+ class: 'vxe-table-export--panel-footer'
15227
+ }, footerSlot ? $xeTable.callSlot(footerSlot, params, h) : [h('div', {
15228
+ class: 'vxe-table-export--panel-btns'
15229
+ }, [h('vxe-button', {
15230
+ on: {
15231
+ click: this.cancelEvent
15232
+ }
15233
+ }, import_panel_getI18n('vxe.import.impCancel')), h('vxe-button', {
15234
+ props: {
15235
+ status: 'primary',
15236
+ disabled: !hasFile
15237
+ },
15238
+ on: {
15239
+ click: this.importEvent
15240
+ }
15241
+ }, import_panel_getI18n('vxe.import.impConfirm'))])]);
15182
15242
  }
15183
15243
  }
15184
- })])])])]), h('div', {
15185
- class: 'vxe-export--panel-btns'
15186
- }, [h('vxe-button', {
15187
- on: {
15188
- click: this.cancelEvent
15189
- }
15190
- }, import_panel_getI18n('vxe.import.impCancel')), h('vxe-button', {
15191
- props: {
15192
- status: 'primary',
15193
- disabled: !hasFile
15194
- },
15195
- on: {
15196
- click: this.importEvent
15197
- }
15198
- }, import_panel_getI18n('vxe.import.impConfirm'))])])]);
15244
+ });
15199
15245
  },
15200
15246
  methods: {
15201
15247
  clearFileEvent() {
@@ -15251,7 +15297,8 @@ const {
15251
15297
  const {
15252
15298
  getI18n: export_panel_getI18n,
15253
15299
  getIcon: export_panel_getIcon,
15254
- globalMixins: export_panel_globalMixins
15300
+ globalMixins: export_panel_globalMixins,
15301
+ renderEmptyElement: export_panel_renderEmptyElement
15255
15302
  } = core_.VxeUI;
15256
15303
  /* harmony default export */ var export_panel = ({
15257
15304
  name: 'VxeTableExportPanel',
@@ -15267,6 +15314,11 @@ const {
15267
15314
  // VxeSelect,
15268
15315
  // VxeOption
15269
15316
  },
15317
+ inject: {
15318
+ $xeTable: {
15319
+ default: null
15320
+ }
15321
+ },
15270
15322
  data() {
15271
15323
  return {
15272
15324
  isAll: false,
@@ -15323,6 +15375,8 @@ const {
15323
15375
  }
15324
15376
  },
15325
15377
  render(h) {
15378
+ const $xeTable = this.$xeTable;
15379
+ const exportOpts = $xeTable.exportOpts;
15326
15380
  const {
15327
15381
  _e,
15328
15382
  checkedAll,
@@ -15338,20 +15392,27 @@ const {
15338
15392
  hasTree,
15339
15393
  hasMerge,
15340
15394
  isPrint,
15341
- hasColgroup
15395
+ hasColgroup,
15396
+ columns
15342
15397
  } = storeData;
15343
15398
  const {
15344
15399
  isHeader
15345
15400
  } = defaultOptions;
15401
+ const slots = exportOpts.slots || {};
15402
+ const topSlot = slots.top;
15403
+ const bottomSlot = slots.bottom;
15404
+ const defaultSlot = slots.default;
15405
+ const footerSlot = slots.footer;
15406
+ const parameterSlot = slots.parameter;
15346
15407
  const cols = [];
15347
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(storeData.columns, column => {
15408
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(columns, column => {
15348
15409
  const colTitle = formatText(column.getTitle(), 1);
15349
15410
  const isColGroup = column.children && column.children.length;
15350
15411
  const isChecked = column.checked;
15351
15412
  const indeterminate = column.halfChecked;
15352
15413
  const isHtml = column.type === 'html';
15353
15414
  cols.push(h('li', {
15354
- class: ['vxe-export--panel-column-option', `level--${column.level}`, {
15415
+ class: ['vxe-table-export--panel-column-option', `level--${column.level}`, {
15355
15416
  'is--group': isColGroup,
15356
15417
  'is--checked': isChecked,
15357
15418
  'is--indeterminate': indeterminate,
@@ -15383,14 +15444,19 @@ const {
15383
15444
  return h('vxe-modal', {
15384
15445
  ref: 'modal',
15385
15446
  props: {
15447
+ id: 'VXE_EXPORT_MODAL',
15386
15448
  value: storeData.visible,
15387
15449
  title: export_panel_getI18n(isPrint ? 'vxe.export.printTitle' : 'vxe.export.expTitle'),
15388
15450
  width: 660,
15451
+ minWidth: 500,
15452
+ minHeight: 400,
15389
15453
  mask: true,
15390
15454
  lockView: true,
15391
- showFooter: false,
15455
+ showFooter: true,
15392
15456
  escClosable: true,
15393
15457
  maskClosable: true,
15458
+ showMaximize: true,
15459
+ resize: true,
15394
15460
  loading: this.loading
15395
15461
  },
15396
15462
  on: {
@@ -15398,187 +15464,220 @@ const {
15398
15464
  storeData.visible = value;
15399
15465
  },
15400
15466
  show: this.showEvent
15401
- }
15402
- }, [h('div', {
15403
- class: 'vxe-export--panel'
15404
- }, [h('table', {
15405
- attrs: {
15406
- cellspacing: 0,
15407
- cellpadding: 0,
15408
- border: 0
15409
- }
15410
- }, [h('tbody', [[isPrint ? _e() : h('tr', [h('td', export_panel_getI18n('vxe.export.expName')), h('td', [h('vxe-input', {
15411
- ref: 'filename',
15412
- props: {
15413
- value: defaultOptions.filename,
15414
- type: 'text',
15415
- clearable: true,
15416
- placeholder: export_panel_getI18n('vxe.export.expNamePlaceholder')
15417
- },
15418
- on: {
15419
- modelValue(value) {
15420
- defaultOptions.filename = value;
15421
- }
15422
- }
15423
- })])]), isPrint ? _e() : h('tr', [h('td', export_panel_getI18n('vxe.export.expType')), h('td', [h('vxe-select', {
15424
- props: {
15425
- value: defaultOptions.type,
15426
- options: storeData.typeList
15427
- },
15428
- on: {
15429
- input(value) {
15430
- defaultOptions.type = value;
15431
- }
15432
- }
15433
- })])]), isPrint || showSheet ? h('tr', [h('td', export_panel_getI18n('vxe.export.expSheetName')), h('td', [h('vxe-input', {
15434
- ref: 'sheetname',
15435
- props: {
15436
- value: defaultOptions.sheetName,
15437
- type: 'text',
15438
- clearable: true,
15439
- placeholder: export_panel_getI18n('vxe.export.expSheetNamePlaceholder')
15440
- },
15441
- on: {
15442
- modelValue(value) {
15443
- defaultOptions.sheetName = value;
15444
- }
15445
- }
15446
- })])]) : _e(), h('tr', [h('td', export_panel_getI18n('vxe.export.expMode')), h('td', [h('vxe-select', {
15447
- props: {
15448
- value: defaultOptions.mode,
15449
- options: storeData.modeList
15450
- },
15451
- on: {
15452
- input(value) {
15453
- defaultOptions.mode = value;
15454
- }
15455
- }
15456
- })])]), h('tr', [h('td', [export_panel_getI18n('vxe.export.expColumn')]), h('td', [h('div', {
15457
- class: 'vxe-export--panel-column'
15458
- }, [h('ul', {
15459
- class: 'vxe-export--panel-column-header'
15460
- }, [h('li', {
15461
- class: ['vxe-export--panel-column-option', {
15462
- 'is--checked': isAllChecked,
15463
- 'is--indeterminate': isAllIndeterminate
15464
- }],
15465
- attrs: {
15466
- title: export_panel_getI18n('vxe.table.allTitle')
15467
- },
15468
- on: {
15469
- click: this.allColumnEvent
15470
- }
15471
- }, [h('span', {
15472
- class: ['vxe-checkbox--icon', isAllIndeterminate ? export_panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? export_panel_getIcon().TABLE_CHECKBOX_CHECKED : export_panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
15473
- }), h('span', {
15474
- class: 'vxe-checkbox--label'
15475
- }, export_panel_getI18n('vxe.export.expCurrentColumn'))])]), h('ul', {
15476
- class: 'vxe-export--panel-column-body'
15477
- }, cols)])])]), h('tr', [h('td', export_panel_getI18n('vxe.export.expOpts')), h('td', [h('div', {
15478
- class: 'vxe-export--panel-option-row'
15479
- }, [h('vxe-checkbox', {
15480
- props: {
15481
- value: isHeader,
15482
- title: export_panel_getI18n('vxe.export.expHeaderTitle'),
15483
- content: export_panel_getI18n('vxe.export.expOptHeader')
15484
- },
15485
- on: {
15486
- input(value) {
15487
- defaultOptions.isHeader = value;
15488
- }
15489
- }
15490
- }), h('vxe-checkbox', {
15491
- props: {
15492
- value: defaultOptions.isFooter,
15493
- disabled: !storeData.hasFooter,
15494
- title: export_panel_getI18n('vxe.export.expFooterTitle'),
15495
- content: export_panel_getI18n('vxe.export.expOptFooter')
15496
- },
15497
- on: {
15498
- input(value) {
15499
- defaultOptions.isFooter = value;
15500
- }
15501
- }
15502
- }), h('vxe-checkbox', {
15503
- props: {
15504
- value: defaultOptions.original,
15505
- title: export_panel_getI18n('vxe.export.expOriginalTitle'),
15506
- content: export_panel_getI18n('vxe.export.expOptOriginal')
15507
- },
15508
- on: {
15509
- input(value) {
15510
- defaultOptions.original = value;
15511
- }
15512
- }
15513
- })]), h('div', {
15514
- class: 'vxe-export--panel-option-row'
15515
- }, [h('vxe-checkbox', {
15516
- props: {
15517
- value: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
15518
- disabled: !isHeader || !hasColgroup || !supportMerge,
15519
- title: export_panel_getI18n('vxe.export.expColgroupTitle'),
15520
- content: export_panel_getI18n('vxe.export.expOptColgroup')
15521
- },
15522
- on: {
15523
- input(value) {
15524
- defaultOptions.isColgroup = value;
15525
- }
15526
- }
15527
- }), h('vxe-checkbox', {
15528
- props: {
15529
- value: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
15530
- disabled: !hasMerge || !supportMerge || !checkedAll,
15531
- title: export_panel_getI18n('vxe.export.expMergeTitle'),
15532
- content: export_panel_getI18n('vxe.export.expOptMerge')
15533
- },
15534
- on: {
15535
- input(value) {
15536
- defaultOptions.isMerge = value;
15537
- }
15538
- }
15539
- }), isPrint ? _e() : h('vxe-checkbox', {
15540
- props: {
15541
- value: supportStyle ? defaultOptions.useStyle : false,
15542
- disabled: !supportStyle,
15543
- title: export_panel_getI18n('vxe.export.expUseStyleTitle'),
15544
- content: export_panel_getI18n('vxe.export.expOptUseStyle')
15545
15467
  },
15546
- on: {
15547
- input(value) {
15548
- defaultOptions.useStyle = value;
15549
- }
15550
- }
15551
- }), h('vxe-checkbox', {
15552
- props: {
15553
- value: hasTree ? defaultOptions.isAllExpand : false,
15554
- disabled: !hasTree,
15555
- title: export_panel_getI18n('vxe.export.expAllExpandTitle'),
15556
- content: export_panel_getI18n('vxe.export.expOptAllExpand')
15557
- },
15558
- on: {
15559
- input(value) {
15560
- defaultOptions.isAllExpand = value;
15468
+ scopedSlots: {
15469
+ default: () => {
15470
+ const params = {
15471
+ $table: $xeTable,
15472
+ $grid: $xeTable.xegrid,
15473
+ options: exportOpts,
15474
+ columns,
15475
+ params: exportOpts.params
15476
+ };
15477
+ return h('div', {
15478
+ class: 'vxe-table-export--panel'
15479
+ }, [topSlot ? h('div', {
15480
+ class: 'vxe-table-export--panel-top'
15481
+ }, $xeTable.callSlot(topSlot, params, h)) : export_panel_renderEmptyElement(this), h('div', {
15482
+ class: 'vxe-table-export--panel-body'
15483
+ }, defaultSlot ? $xeTable.callSlot(defaultSlot, params, h) : [h('table', {
15484
+ attrs: {
15485
+ class: 'vxe-table-export--panel-table',
15486
+ cellspacing: 0,
15487
+ cellpadding: 0,
15488
+ border: 0
15489
+ }
15490
+ }, [h('tbody', [[isPrint ? _e() : h('tr', [h('td', export_panel_getI18n('vxe.export.expName')), h('td', [h('vxe-input', {
15491
+ ref: 'filename',
15492
+ props: {
15493
+ value: defaultOptions.filename,
15494
+ type: 'text',
15495
+ clearable: true,
15496
+ placeholder: export_panel_getI18n('vxe.export.expNamePlaceholder')
15497
+ },
15498
+ on: {
15499
+ modelValue(value) {
15500
+ defaultOptions.filename = value;
15501
+ }
15502
+ }
15503
+ })])]), isPrint ? _e() : h('tr', [h('td', export_panel_getI18n('vxe.export.expType')), h('td', [h('vxe-select', {
15504
+ props: {
15505
+ value: defaultOptions.type,
15506
+ options: storeData.typeList
15507
+ },
15508
+ on: {
15509
+ input(value) {
15510
+ defaultOptions.type = value;
15511
+ }
15512
+ }
15513
+ })])]), isPrint || showSheet ? h('tr', [h('td', export_panel_getI18n('vxe.export.expSheetName')), h('td', [h('vxe-input', {
15514
+ ref: 'sheetname',
15515
+ props: {
15516
+ value: defaultOptions.sheetName,
15517
+ type: 'text',
15518
+ clearable: true,
15519
+ placeholder: export_panel_getI18n('vxe.export.expSheetNamePlaceholder')
15520
+ },
15521
+ on: {
15522
+ modelValue(value) {
15523
+ defaultOptions.sheetName = value;
15524
+ }
15525
+ }
15526
+ })])]) : _e(), h('tr', [h('td', export_panel_getI18n('vxe.export.expMode')), h('td', [h('vxe-select', {
15527
+ props: {
15528
+ value: defaultOptions.mode,
15529
+ options: storeData.modeList
15530
+ },
15531
+ on: {
15532
+ input(value) {
15533
+ defaultOptions.mode = value;
15534
+ }
15535
+ }
15536
+ })])]), h('tr', [h('td', [export_panel_getI18n('vxe.export.expColumn')]), h('td', [h('div', {
15537
+ class: 'vxe-table-export--panel-column'
15538
+ }, [h('ul', {
15539
+ class: 'vxe-table-export--panel-column-header'
15540
+ }, [h('li', {
15541
+ class: ['vxe-table-export--panel-column-option', {
15542
+ 'is--checked': isAllChecked,
15543
+ 'is--indeterminate': isAllIndeterminate
15544
+ }],
15545
+ attrs: {
15546
+ title: export_panel_getI18n('vxe.table.allTitle')
15547
+ },
15548
+ on: {
15549
+ click: this.allColumnEvent
15550
+ }
15551
+ }, [h('span', {
15552
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? export_panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? export_panel_getIcon().TABLE_CHECKBOX_CHECKED : export_panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
15553
+ }), h('span', {
15554
+ class: 'vxe-checkbox--label'
15555
+ }, export_panel_getI18n('vxe.export.expCurrentColumn'))])]), h('ul', {
15556
+ class: 'vxe-table-export--panel-column-body'
15557
+ }, cols)])])]), h('tr', [h('td', export_panel_getI18n('vxe.export.expOpts')), parameterSlot ? h('td', [h('div', {
15558
+ class: 'vxe-table-export--panel-option-row'
15559
+ }, $xeTable.callSlot(parameterSlot, params))]) : h('td', [h('div', {
15560
+ class: 'vxe-table-export--panel-option-row'
15561
+ }, [h('vxe-checkbox', {
15562
+ props: {
15563
+ value: isHeader,
15564
+ title: export_panel_getI18n('vxe.export.expHeaderTitle'),
15565
+ content: export_panel_getI18n('vxe.export.expOptHeader')
15566
+ },
15567
+ on: {
15568
+ input(value) {
15569
+ defaultOptions.isHeader = value;
15570
+ }
15571
+ }
15572
+ }), h('vxe-checkbox', {
15573
+ props: {
15574
+ value: defaultOptions.isFooter,
15575
+ disabled: !storeData.hasFooter,
15576
+ title: export_panel_getI18n('vxe.export.expFooterTitle'),
15577
+ content: export_panel_getI18n('vxe.export.expOptFooter')
15578
+ },
15579
+ on: {
15580
+ input(value) {
15581
+ defaultOptions.isFooter = value;
15582
+ }
15583
+ }
15584
+ }), h('vxe-checkbox', {
15585
+ props: {
15586
+ value: defaultOptions.original,
15587
+ title: export_panel_getI18n('vxe.export.expOriginalTitle'),
15588
+ content: export_panel_getI18n('vxe.export.expOptOriginal')
15589
+ },
15590
+ on: {
15591
+ input(value) {
15592
+ defaultOptions.original = value;
15593
+ }
15594
+ }
15595
+ })]), h('div', {
15596
+ class: 'vxe-table-export--panel-option-row'
15597
+ }, [h('vxe-checkbox', {
15598
+ props: {
15599
+ value: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
15600
+ disabled: !isHeader || !hasColgroup || !supportMerge,
15601
+ title: export_panel_getI18n('vxe.export.expColgroupTitle'),
15602
+ content: export_panel_getI18n('vxe.export.expOptColgroup')
15603
+ },
15604
+ on: {
15605
+ input(value) {
15606
+ defaultOptions.isColgroup = value;
15607
+ }
15608
+ }
15609
+ }), h('vxe-checkbox', {
15610
+ props: {
15611
+ value: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
15612
+ disabled: !hasMerge || !supportMerge || !checkedAll,
15613
+ title: export_panel_getI18n('vxe.export.expMergeTitle'),
15614
+ content: export_panel_getI18n('vxe.export.expOptMerge')
15615
+ },
15616
+ on: {
15617
+ input(value) {
15618
+ defaultOptions.isMerge = value;
15619
+ }
15620
+ }
15621
+ }), isPrint ? _e() : h('vxe-checkbox', {
15622
+ props: {
15623
+ value: supportStyle ? defaultOptions.useStyle : false,
15624
+ disabled: !supportStyle,
15625
+ title: export_panel_getI18n('vxe.export.expUseStyleTitle'),
15626
+ content: export_panel_getI18n('vxe.export.expOptUseStyle')
15627
+ },
15628
+ on: {
15629
+ input(value) {
15630
+ defaultOptions.useStyle = value;
15631
+ }
15632
+ }
15633
+ }), h('vxe-checkbox', {
15634
+ props: {
15635
+ value: hasTree ? defaultOptions.isAllExpand : false,
15636
+ disabled: !hasTree,
15637
+ title: export_panel_getI18n('vxe.export.expAllExpandTitle'),
15638
+ content: export_panel_getI18n('vxe.export.expOptAllExpand')
15639
+ },
15640
+ on: {
15641
+ input(value) {
15642
+ defaultOptions.isAllExpand = value;
15643
+ }
15644
+ }
15645
+ })])])])]])])]), bottomSlot ? h('div', {
15646
+ class: 'vxe-table-export--panel-bottom'
15647
+ }, $xeTable.callSlot(bottomSlot, params, h)) : export_panel_renderEmptyElement(this)]);
15648
+ },
15649
+ footer: () => {
15650
+ const params = {
15651
+ $table: $xeTable,
15652
+ $grid: $xeTable.xegrid,
15653
+ options: exportOpts,
15654
+ columns,
15655
+ params: exportOpts.params
15656
+ };
15657
+ return h('div', {
15658
+ class: 'vxe-table-export--panel-footer'
15659
+ }, footerSlot ? $xeTable.callSlot(footerSlot, params) : [h('div', {
15660
+ class: 'vxe-table-export--panel-btns'
15661
+ }, [h('vxe-button', {
15662
+ props: {
15663
+ content: export_panel_getI18n('vxe.export.expCancel')
15664
+ },
15665
+ on: {
15666
+ click: this.cancelEvent
15667
+ }
15668
+ }), h('vxe-button', {
15669
+ ref: 'confirmBtn',
15670
+ props: {
15671
+ status: 'primary',
15672
+ content: export_panel_getI18n(isPrint ? 'vxe.export.expPrint' : 'vxe.export.expConfirm')
15673
+ },
15674
+ on: {
15675
+ click: this.confirmEvent
15676
+ }
15677
+ })])]);
15561
15678
  }
15562
15679
  }
15563
- })])])])]])]), h('div', {
15564
- class: 'vxe-export--panel-btns'
15565
- }, [h('vxe-button', {
15566
- props: {
15567
- content: export_panel_getI18n('vxe.export.expCancel')
15568
- },
15569
- on: {
15570
- click: this.cancelEvent
15571
- }
15572
- }), h('vxe-button', {
15573
- ref: 'confirmBtn',
15574
- props: {
15575
- status: 'primary',
15576
- content: export_panel_getI18n(isPrint ? 'vxe.export.expPrint' : 'vxe.export.expConfirm')
15577
- },
15578
- on: {
15579
- click: this.confirmEvent
15580
- }
15581
- })])])]);
15680
+ });
15582
15681
  },
15583
15682
  methods: {
15584
15683
  changeOption(column) {
@@ -15668,9 +15767,10 @@ const {
15668
15767
  $xetable.print(Object.assign({}, $xetable.printOpts, this.getExportOption()));
15669
15768
  },
15670
15769
  exportEvent() {
15671
- const $xetable = this.$parent;
15770
+ const $xeTable = this.$xeTable;
15771
+ const exportOpts = $xeTable.exportOpts;
15672
15772
  this.loading = true;
15673
- $xetable.exportData(Object.assign({}, $xetable.exportOpts, this.getExportOption())).then(() => {
15773
+ $xeTable.exportData(Object.assign({}, exportOpts, this.getExportOption())).then(() => {
15674
15774
  this.loading = false;
15675
15775
  this.storeData.visible = false;
15676
15776
  }).catch(() => {
@@ -18581,6 +18681,12 @@ function handleFileImport($xetable, file, opts) {
18581
18681
  return Promise.reject(e);
18582
18682
  });
18583
18683
  }
18684
+ function handleCloseExport() {
18685
+ if (core_.VxeUI.modal) {
18686
+ return core_.VxeUI.modal.close('VXE_EXPORT_MODAL');
18687
+ }
18688
+ return Promise.resolve();
18689
+ }
18584
18690
  /**
18585
18691
  * 读取本地文件
18586
18692
  * @param {*} options 参数
@@ -19173,6 +19279,12 @@ const convertToRows = originColumns => {
19173
19279
  };
19174
19280
  });
19175
19281
  },
19282
+ _closeImport() {
19283
+ if (core_.VxeUI.modal) {
19284
+ return core_.VxeUI.modal.close('VXE_IMPORT_MODAL');
19285
+ }
19286
+ return Promise.resolve();
19287
+ },
19176
19288
  _openImport(options) {
19177
19289
  const {
19178
19290
  importOpts
@@ -19231,6 +19343,7 @@ const convertToRows = originColumns => {
19231
19343
  }
19232
19344
  this.initStore.import = true;
19233
19345
  },
19346
+ _closeExport: handleCloseExport,
19234
19347
  _openExport(options) {
19235
19348
  const {
19236
19349
  exportOpts
@@ -19242,6 +19355,7 @@ const convertToRows = originColumns => {
19242
19355
  }
19243
19356
  return handleExportAndPrint(this, Object.assign({}, exportOpts, options));
19244
19357
  },
19358
+ _closePrint: handleCloseExport,
19245
19359
  _openPrint(options) {
19246
19360
  const {
19247
19361
  printOpts
@@ -20797,7 +20911,7 @@ function handleUupdateResize(_vm) {
20797
20911
  return Object.assign({}, table_getConfig().table.columnConfig, this.columnConfig);
20798
20912
  },
20799
20913
  computeCellOpts() {
20800
- return Object.assign({}, table_getConfig().table.cellConfig, this.rowConfig);
20914
+ return Object.assign({}, table_getConfig().table.cellConfig, this.cellConfig);
20801
20915
  },
20802
20916
  rowOpts() {
20803
20917
  return this.computeRowOpts;
@@ -25125,6 +25239,7 @@ const Toolbar = VxeToolbar;
25125
25239
  checkProp: '当数据量过大时可能会导致复选框卡顿,建议设置参数 "{0}" 提升渲染速度',
25126
25240
  coverProp: '"{0}" 的参数 "{1}" 重复定义,这可能会出现错误',
25127
25241
  uniField: '字段名 "{0}" 重复定义,这可能会出现错误',
25242
+ repeatKey: '主键重复 {0}="{1}",这可能会出现错误',
25128
25243
  delFunc: '方法 "{0}" 已废弃,请使用 "{1}"',
25129
25244
  delProp: '参数 "{0}" 已废弃,请使用 "{1}"',
25130
25245
  delEvent: '事件 "{0}" 已废弃,请使用 "{1}"',