vxe-table 3.10.0-beta.2 → 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 (98) 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/methods.js +1 -1
  18. package/es/table/style.css +48 -47
  19. package/es/table/style.min.css +1 -1
  20. package/es/ui/index.js +1 -1
  21. package/es/ui/src/log.js +1 -1
  22. package/es/vxe-table/style.css +48 -47
  23. package/es/vxe-table/style.min.css +1 -1
  24. package/lib/index.umd.js +356 -240
  25. package/lib/index.umd.min.js +1 -1
  26. package/lib/locale/lang/en-US.js +1 -0
  27. package/lib/locale/lang/en-US.min.js +1 -1
  28. package/lib/locale/lang/en-US.umd.js +1 -0
  29. package/lib/locale/lang/es-ES.js +1 -0
  30. package/lib/locale/lang/es-ES.min.js +1 -1
  31. package/lib/locale/lang/es-ES.umd.js +1 -0
  32. package/lib/locale/lang/hu-HU.js +1 -0
  33. package/lib/locale/lang/hu-HU.min.js +1 -1
  34. package/lib/locale/lang/hu-HU.umd.js +1 -0
  35. package/lib/locale/lang/ja-JP.js +1 -0
  36. package/lib/locale/lang/ja-JP.min.js +1 -1
  37. package/lib/locale/lang/ja-JP.umd.js +1 -0
  38. package/lib/locale/lang/ko-KR.js +1 -0
  39. package/lib/locale/lang/ko-KR.min.js +1 -1
  40. package/lib/locale/lang/ko-KR.umd.js +1 -0
  41. package/lib/locale/lang/pt-BR.js +1 -0
  42. package/lib/locale/lang/pt-BR.min.js +1 -1
  43. package/lib/locale/lang/pt-BR.umd.js +1 -0
  44. package/lib/locale/lang/ru-RU.js +1 -0
  45. package/lib/locale/lang/ru-RU.min.js +1 -1
  46. package/lib/locale/lang/ru-RU.umd.js +1 -0
  47. package/lib/locale/lang/uk-UA.js +1 -0
  48. package/lib/locale/lang/uk-UA.min.js +1 -1
  49. package/lib/locale/lang/uk-UA.umd.js +1 -0
  50. package/lib/locale/lang/vi-VN.js +1 -0
  51. package/lib/locale/lang/vi-VN.min.js +1 -1
  52. package/lib/locale/lang/zh-CHT.js +1 -0
  53. package/lib/locale/lang/zh-CHT.min.js +1 -1
  54. package/lib/locale/lang/zh-CHT.umd.js +1 -0
  55. package/lib/locale/lang/zh-CN.js +1 -0
  56. package/lib/locale/lang/zh-CN.min.js +1 -1
  57. package/lib/locale/lang/zh-CN.umd.js +1 -0
  58. package/lib/style.css +1 -1
  59. package/lib/style.min.css +1 -1
  60. package/lib/table/module/export/export-panel.js +239 -185
  61. package/lib/table/module/export/export-panel.min.js +1 -1
  62. package/lib/table/module/export/import-panel.js +99 -52
  63. package/lib/table/module/export/import-panel.min.js +1 -1
  64. package/lib/table/module/export/mixin.js +14 -0
  65. package/lib/table/module/export/mixin.min.js +1 -1
  66. package/lib/table/src/methods.js +1 -1
  67. package/lib/table/src/methods.min.js +1 -1
  68. package/lib/table/style/style.css +48 -47
  69. package/lib/table/style/style.min.css +1 -1
  70. package/lib/ui/index.js +1 -1
  71. package/lib/ui/index.min.js +1 -1
  72. package/lib/ui/src/log.js +1 -1
  73. package/lib/ui/src/log.min.js +1 -1
  74. package/lib/vxe-table/style/style.css +48 -47
  75. package/lib/vxe-table/style/style.min.css +1 -1
  76. package/package.json +2 -2
  77. package/packages/locale/lang/en-US.ts +1 -0
  78. package/packages/locale/lang/es-ES.ts +1 -0
  79. package/packages/locale/lang/hu-HU.ts +1 -0
  80. package/packages/locale/lang/ja-JP.ts +1 -0
  81. package/packages/locale/lang/ko-KR.ts +1 -0
  82. package/packages/locale/lang/pt-BR.ts +1 -0
  83. package/packages/locale/lang/ru-RU.ts +1 -0
  84. package/packages/locale/lang/uk-UA.ts +1 -0
  85. package/packages/locale/lang/vi-VN.ts +1 -0
  86. package/packages/locale/lang/zh-CHT.ts +1 -0
  87. package/packages/locale/lang/zh-CN.ts +1 -0
  88. package/packages/table/module/export/export-panel.ts +323 -253
  89. package/packages/table/module/export/import-panel.ts +141 -79
  90. package/packages/table/module/export/mixin.ts +15 -0
  91. package/packages/table/src/methods.ts +1 -1
  92. package/styles/components/table-module/export.scss +17 -14
  93. /package/es/{iconfont.1730365807487.ttf → iconfont.1730447026880.ttf} +0 -0
  94. /package/es/{iconfont.1730365807487.woff → iconfont.1730447026880.woff} +0 -0
  95. /package/es/{iconfont.1730365807487.woff2 → iconfont.1730447026880.woff2} +0 -0
  96. /package/lib/{iconfont.1730365807487.ttf → iconfont.1730447026880.ttf} +0 -0
  97. /package/lib/{iconfont.1730365807487.woff → iconfont.1730447026880.woff} +0 -0
  98. /package/lib/{iconfont.1730365807487.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.2";
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.2"}`;
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) {
@@ -15057,7 +15057,8 @@ const {
15057
15057
  const {
15058
15058
  getI18n: import_panel_getI18n,
15059
15059
  getIcon: import_panel_getIcon,
15060
- globalMixins
15060
+ globalMixins,
15061
+ renderEmptyElement: import_panel_renderEmptyElement
15061
15062
  } = core_.VxeUI;
15062
15063
  /* harmony default export */ var import_panel = ({
15063
15064
  name: 'VxeTableImportPanel',
@@ -15070,6 +15071,11 @@ const {
15070
15071
  // VxeModal,
15071
15072
  // VxeRadio
15072
15073
  },
15074
+ inject: {
15075
+ $xeTable: {
15076
+ default: null
15077
+ }
15078
+ },
15073
15079
  data() {
15074
15080
  return {
15075
15081
  loading: false
@@ -15117,6 +15123,8 @@ const {
15117
15123
  }
15118
15124
  },
15119
15125
  render(h) {
15126
+ const $xeTable = this.$xeTable;
15127
+ const importOpts = $xeTable.importOpts;
15120
15128
  const {
15121
15129
  hasFile,
15122
15130
  parseTypeLabel,
@@ -15124,17 +15132,27 @@ const {
15124
15132
  storeData,
15125
15133
  selectName
15126
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;
15127
15140
  return h('vxe-modal', {
15128
15141
  ref: 'modal',
15129
15142
  props: {
15143
+ id: 'VXE_IMPORT_MODAL',
15130
15144
  value: storeData.visible,
15131
15145
  title: import_panel_getI18n('vxe.import.impTitle'),
15132
15146
  width: 540,
15147
+ minWidth: 360,
15148
+ minHeight: 240,
15133
15149
  mask: true,
15134
15150
  lockView: true,
15135
- showFooter: false,
15151
+ showFooter: true,
15136
15152
  escClosable: true,
15137
15153
  maskClosable: true,
15154
+ showMaximize: true,
15155
+ resize: true,
15138
15156
  loading: this.loading
15139
15157
  },
15140
15158
  on: {
@@ -15142,59 +15160,88 @@ const {
15142
15160
  storeData.visible = value;
15143
15161
  },
15144
15162
  show: this.showEvent
15145
- }
15146
- }, [h('div', {
15147
- class: 'vxe-export--panel'
15148
- }, [h('table', {
15149
- attrs: {
15150
- cellspacing: 0,
15151
- cellpadding: 0,
15152
- border: 0
15153
- }
15154
- }, [h('tbody', [h('tr', [h('td', import_panel_getI18n('vxe.import.impFile')), h('td', [hasFile ? h('div', {
15155
- class: 'vxe-import-selected--file',
15156
- attrs: {
15157
- title: selectName
15158
- }
15159
- }, [h('span', selectName), h('i', {
15160
- class: import_panel_getIcon().INPUT_CLEAR,
15161
- on: {
15162
- click: this.clearFileEvent
15163
- }
15164
- })]) : h('button', {
15165
- ref: 'fileBtn',
15166
- class: 'vxe-import-select--file',
15167
- attrs: {
15168
- type: 'button'
15169
- },
15170
- on: {
15171
- click: this.selectFileEvent
15172
- }
15173
- }, 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', {
15174
- props: {
15175
- value: defaultOptions.mode,
15176
- options: storeData.modeList
15177
15163
  },
15178
- on: {
15179
- input(value) {
15180
- 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'))])]);
15181
15242
  }
15182
15243
  }
15183
- })])])])]), h('div', {
15184
- class: 'vxe-export--panel-btns'
15185
- }, [h('vxe-button', {
15186
- on: {
15187
- click: this.cancelEvent
15188
- }
15189
- }, import_panel_getI18n('vxe.import.impCancel')), h('vxe-button', {
15190
- props: {
15191
- status: 'primary',
15192
- disabled: !hasFile
15193
- },
15194
- on: {
15195
- click: this.importEvent
15196
- }
15197
- }, import_panel_getI18n('vxe.import.impConfirm'))])])]);
15244
+ });
15198
15245
  },
15199
15246
  methods: {
15200
15247
  clearFileEvent() {
@@ -15250,7 +15297,8 @@ const {
15250
15297
  const {
15251
15298
  getI18n: export_panel_getI18n,
15252
15299
  getIcon: export_panel_getIcon,
15253
- globalMixins: export_panel_globalMixins
15300
+ globalMixins: export_panel_globalMixins,
15301
+ renderEmptyElement: export_panel_renderEmptyElement
15254
15302
  } = core_.VxeUI;
15255
15303
  /* harmony default export */ var export_panel = ({
15256
15304
  name: 'VxeTableExportPanel',
@@ -15266,6 +15314,11 @@ const {
15266
15314
  // VxeSelect,
15267
15315
  // VxeOption
15268
15316
  },
15317
+ inject: {
15318
+ $xeTable: {
15319
+ default: null
15320
+ }
15321
+ },
15269
15322
  data() {
15270
15323
  return {
15271
15324
  isAll: false,
@@ -15322,6 +15375,8 @@ const {
15322
15375
  }
15323
15376
  },
15324
15377
  render(h) {
15378
+ const $xeTable = this.$xeTable;
15379
+ const exportOpts = $xeTable.exportOpts;
15325
15380
  const {
15326
15381
  _e,
15327
15382
  checkedAll,
@@ -15337,20 +15392,27 @@ const {
15337
15392
  hasTree,
15338
15393
  hasMerge,
15339
15394
  isPrint,
15340
- hasColgroup
15395
+ hasColgroup,
15396
+ columns
15341
15397
  } = storeData;
15342
15398
  const {
15343
15399
  isHeader
15344
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;
15345
15407
  const cols = [];
15346
- 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 => {
15347
15409
  const colTitle = formatText(column.getTitle(), 1);
15348
15410
  const isColGroup = column.children && column.children.length;
15349
15411
  const isChecked = column.checked;
15350
15412
  const indeterminate = column.halfChecked;
15351
15413
  const isHtml = column.type === 'html';
15352
15414
  cols.push(h('li', {
15353
- class: ['vxe-export--panel-column-option', `level--${column.level}`, {
15415
+ class: ['vxe-table-export--panel-column-option', `level--${column.level}`, {
15354
15416
  'is--group': isColGroup,
15355
15417
  'is--checked': isChecked,
15356
15418
  'is--indeterminate': indeterminate,
@@ -15382,14 +15444,19 @@ const {
15382
15444
  return h('vxe-modal', {
15383
15445
  ref: 'modal',
15384
15446
  props: {
15447
+ id: 'VXE_EXPORT_MODAL',
15385
15448
  value: storeData.visible,
15386
15449
  title: export_panel_getI18n(isPrint ? 'vxe.export.printTitle' : 'vxe.export.expTitle'),
15387
15450
  width: 660,
15451
+ minWidth: 500,
15452
+ minHeight: 400,
15388
15453
  mask: true,
15389
15454
  lockView: true,
15390
- showFooter: false,
15455
+ showFooter: true,
15391
15456
  escClosable: true,
15392
15457
  maskClosable: true,
15458
+ showMaximize: true,
15459
+ resize: true,
15393
15460
  loading: this.loading
15394
15461
  },
15395
15462
  on: {
@@ -15397,187 +15464,220 @@ const {
15397
15464
  storeData.visible = value;
15398
15465
  },
15399
15466
  show: this.showEvent
15400
- }
15401
- }, [h('div', {
15402
- class: 'vxe-export--panel'
15403
- }, [h('table', {
15404
- attrs: {
15405
- cellspacing: 0,
15406
- cellpadding: 0,
15407
- border: 0
15408
- }
15409
- }, [h('tbody', [[isPrint ? _e() : h('tr', [h('td', export_panel_getI18n('vxe.export.expName')), h('td', [h('vxe-input', {
15410
- ref: 'filename',
15411
- props: {
15412
- value: defaultOptions.filename,
15413
- type: 'text',
15414
- clearable: true,
15415
- placeholder: export_panel_getI18n('vxe.export.expNamePlaceholder')
15416
- },
15417
- on: {
15418
- modelValue(value) {
15419
- defaultOptions.filename = value;
15420
- }
15421
- }
15422
- })])]), isPrint ? _e() : h('tr', [h('td', export_panel_getI18n('vxe.export.expType')), h('td', [h('vxe-select', {
15423
- props: {
15424
- value: defaultOptions.type,
15425
- options: storeData.typeList
15426
- },
15427
- on: {
15428
- input(value) {
15429
- defaultOptions.type = value;
15430
- }
15431
- }
15432
- })])]), isPrint || showSheet ? h('tr', [h('td', export_panel_getI18n('vxe.export.expSheetName')), h('td', [h('vxe-input', {
15433
- ref: 'sheetname',
15434
- props: {
15435
- value: defaultOptions.sheetName,
15436
- type: 'text',
15437
- clearable: true,
15438
- placeholder: export_panel_getI18n('vxe.export.expSheetNamePlaceholder')
15439
- },
15440
- on: {
15441
- modelValue(value) {
15442
- defaultOptions.sheetName = value;
15443
- }
15444
- }
15445
- })])]) : _e(), h('tr', [h('td', export_panel_getI18n('vxe.export.expMode')), h('td', [h('vxe-select', {
15446
- props: {
15447
- value: defaultOptions.mode,
15448
- options: storeData.modeList
15449
- },
15450
- on: {
15451
- input(value) {
15452
- defaultOptions.mode = value;
15453
- }
15454
- }
15455
- })])]), h('tr', [h('td', [export_panel_getI18n('vxe.export.expColumn')]), h('td', [h('div', {
15456
- class: 'vxe-export--panel-column'
15457
- }, [h('ul', {
15458
- class: 'vxe-export--panel-column-header'
15459
- }, [h('li', {
15460
- class: ['vxe-export--panel-column-option', {
15461
- 'is--checked': isAllChecked,
15462
- 'is--indeterminate': isAllIndeterminate
15463
- }],
15464
- attrs: {
15465
- title: export_panel_getI18n('vxe.table.allTitle')
15466
- },
15467
- on: {
15468
- click: this.allColumnEvent
15469
- }
15470
- }, [h('span', {
15471
- class: ['vxe-checkbox--icon', isAllIndeterminate ? export_panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? export_panel_getIcon().TABLE_CHECKBOX_CHECKED : export_panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
15472
- }), h('span', {
15473
- class: 'vxe-checkbox--label'
15474
- }, export_panel_getI18n('vxe.export.expCurrentColumn'))])]), h('ul', {
15475
- class: 'vxe-export--panel-column-body'
15476
- }, cols)])])]), h('tr', [h('td', export_panel_getI18n('vxe.export.expOpts')), h('td', [h('div', {
15477
- class: 'vxe-export--panel-option-row'
15478
- }, [h('vxe-checkbox', {
15479
- props: {
15480
- value: isHeader,
15481
- title: export_panel_getI18n('vxe.export.expHeaderTitle'),
15482
- content: export_panel_getI18n('vxe.export.expOptHeader')
15483
- },
15484
- on: {
15485
- input(value) {
15486
- defaultOptions.isHeader = value;
15487
- }
15488
- }
15489
- }), h('vxe-checkbox', {
15490
- props: {
15491
- value: defaultOptions.isFooter,
15492
- disabled: !storeData.hasFooter,
15493
- title: export_panel_getI18n('vxe.export.expFooterTitle'),
15494
- content: export_panel_getI18n('vxe.export.expOptFooter')
15495
- },
15496
- on: {
15497
- input(value) {
15498
- defaultOptions.isFooter = value;
15499
- }
15500
- }
15501
- }), h('vxe-checkbox', {
15502
- props: {
15503
- value: defaultOptions.original,
15504
- title: export_panel_getI18n('vxe.export.expOriginalTitle'),
15505
- content: export_panel_getI18n('vxe.export.expOptOriginal')
15506
- },
15507
- on: {
15508
- input(value) {
15509
- defaultOptions.original = value;
15510
- }
15511
- }
15512
- })]), h('div', {
15513
- class: 'vxe-export--panel-option-row'
15514
- }, [h('vxe-checkbox', {
15515
- props: {
15516
- value: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
15517
- disabled: !isHeader || !hasColgroup || !supportMerge,
15518
- title: export_panel_getI18n('vxe.export.expColgroupTitle'),
15519
- content: export_panel_getI18n('vxe.export.expOptColgroup')
15520
- },
15521
- on: {
15522
- input(value) {
15523
- defaultOptions.isColgroup = value;
15524
- }
15525
- }
15526
- }), h('vxe-checkbox', {
15527
- props: {
15528
- value: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
15529
- disabled: !hasMerge || !supportMerge || !checkedAll,
15530
- title: export_panel_getI18n('vxe.export.expMergeTitle'),
15531
- content: export_panel_getI18n('vxe.export.expOptMerge')
15532
- },
15533
- on: {
15534
- input(value) {
15535
- defaultOptions.isMerge = value;
15536
- }
15537
- }
15538
- }), isPrint ? _e() : h('vxe-checkbox', {
15539
- props: {
15540
- value: supportStyle ? defaultOptions.useStyle : false,
15541
- disabled: !supportStyle,
15542
- title: export_panel_getI18n('vxe.export.expUseStyleTitle'),
15543
- content: export_panel_getI18n('vxe.export.expOptUseStyle')
15544
15467
  },
15545
- on: {
15546
- input(value) {
15547
- defaultOptions.useStyle = value;
15548
- }
15549
- }
15550
- }), h('vxe-checkbox', {
15551
- props: {
15552
- value: hasTree ? defaultOptions.isAllExpand : false,
15553
- disabled: !hasTree,
15554
- title: export_panel_getI18n('vxe.export.expAllExpandTitle'),
15555
- content: export_panel_getI18n('vxe.export.expOptAllExpand')
15556
- },
15557
- on: {
15558
- input(value) {
15559
- 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
+ })])]);
15560
15678
  }
15561
15679
  }
15562
- })])])])]])]), h('div', {
15563
- class: 'vxe-export--panel-btns'
15564
- }, [h('vxe-button', {
15565
- props: {
15566
- content: export_panel_getI18n('vxe.export.expCancel')
15567
- },
15568
- on: {
15569
- click: this.cancelEvent
15570
- }
15571
- }), h('vxe-button', {
15572
- ref: 'confirmBtn',
15573
- props: {
15574
- status: 'primary',
15575
- content: export_panel_getI18n(isPrint ? 'vxe.export.expPrint' : 'vxe.export.expConfirm')
15576
- },
15577
- on: {
15578
- click: this.confirmEvent
15579
- }
15580
- })])])]);
15680
+ });
15581
15681
  },
15582
15682
  methods: {
15583
15683
  changeOption(column) {
@@ -15667,9 +15767,10 @@ const {
15667
15767
  $xetable.print(Object.assign({}, $xetable.printOpts, this.getExportOption()));
15668
15768
  },
15669
15769
  exportEvent() {
15670
- const $xetable = this.$parent;
15770
+ const $xeTable = this.$xeTable;
15771
+ const exportOpts = $xeTable.exportOpts;
15671
15772
  this.loading = true;
15672
- $xetable.exportData(Object.assign({}, $xetable.exportOpts, this.getExportOption())).then(() => {
15773
+ $xeTable.exportData(Object.assign({}, exportOpts, this.getExportOption())).then(() => {
15673
15774
  this.loading = false;
15674
15775
  this.storeData.visible = false;
15675
15776
  }).catch(() => {
@@ -18580,6 +18681,12 @@ function handleFileImport($xetable, file, opts) {
18580
18681
  return Promise.reject(e);
18581
18682
  });
18582
18683
  }
18684
+ function handleCloseExport() {
18685
+ if (core_.VxeUI.modal) {
18686
+ return core_.VxeUI.modal.close('VXE_EXPORT_MODAL');
18687
+ }
18688
+ return Promise.resolve();
18689
+ }
18583
18690
  /**
18584
18691
  * 读取本地文件
18585
18692
  * @param {*} options 参数
@@ -19172,6 +19279,12 @@ const convertToRows = originColumns => {
19172
19279
  };
19173
19280
  });
19174
19281
  },
19282
+ _closeImport() {
19283
+ if (core_.VxeUI.modal) {
19284
+ return core_.VxeUI.modal.close('VXE_IMPORT_MODAL');
19285
+ }
19286
+ return Promise.resolve();
19287
+ },
19175
19288
  _openImport(options) {
19176
19289
  const {
19177
19290
  importOpts
@@ -19230,6 +19343,7 @@ const convertToRows = originColumns => {
19230
19343
  }
19231
19344
  this.initStore.import = true;
19232
19345
  },
19346
+ _closeExport: handleCloseExport,
19233
19347
  _openExport(options) {
19234
19348
  const {
19235
19349
  exportOpts
@@ -19241,6 +19355,7 @@ const convertToRows = originColumns => {
19241
19355
  }
19242
19356
  return handleExportAndPrint(this, Object.assign({}, exportOpts, options));
19243
19357
  },
19358
+ _closePrint: handleCloseExport,
19244
19359
  _openPrint(options) {
19245
19360
  const {
19246
19361
  printOpts
@@ -25124,6 +25239,7 @@ const Toolbar = VxeToolbar;
25124
25239
  checkProp: '当数据量过大时可能会导致复选框卡顿,建议设置参数 "{0}" 提升渲染速度',
25125
25240
  coverProp: '"{0}" 的参数 "{1}" 重复定义,这可能会出现错误',
25126
25241
  uniField: '字段名 "{0}" 重复定义,这可能会出现错误',
25242
+ repeatKey: '主键重复 {0}="{1}",这可能会出现错误',
25127
25243
  delFunc: '方法 "{0}" 已废弃,请使用 "{1}"',
25128
25244
  delProp: '参数 "{0}" 已废弃,请使用 "{1}"',
25129
25245
  delEvent: '事件 "{0}" 已废弃,请使用 "{1}"',