vxe-table 3.10.0-beta.2 → 3.10.0-beta.4

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 (102) 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 +1 -1
  18. package/es/table/src/methods.js +10 -3
  19. package/es/table/style.css +48 -47
  20. package/es/table/style.min.css +1 -1
  21. package/es/ui/index.js +1 -1
  22. package/es/ui/src/log.js +1 -1
  23. package/es/vxe-table/style.css +48 -47
  24. package/es/vxe-table/style.min.css +1 -1
  25. package/lib/index.umd.js +368 -243
  26. package/lib/index.umd.min.js +1 -1
  27. package/lib/locale/lang/en-US.js +1 -0
  28. package/lib/locale/lang/en-US.min.js +1 -1
  29. package/lib/locale/lang/en-US.umd.js +1 -0
  30. package/lib/locale/lang/es-ES.js +1 -0
  31. package/lib/locale/lang/es-ES.min.js +1 -1
  32. package/lib/locale/lang/es-ES.umd.js +1 -0
  33. package/lib/locale/lang/hu-HU.js +1 -0
  34. package/lib/locale/lang/hu-HU.min.js +1 -1
  35. package/lib/locale/lang/hu-HU.umd.js +1 -0
  36. package/lib/locale/lang/ja-JP.js +1 -0
  37. package/lib/locale/lang/ja-JP.min.js +1 -1
  38. package/lib/locale/lang/ja-JP.umd.js +1 -0
  39. package/lib/locale/lang/ko-KR.js +1 -0
  40. package/lib/locale/lang/ko-KR.min.js +1 -1
  41. package/lib/locale/lang/ko-KR.umd.js +1 -0
  42. package/lib/locale/lang/pt-BR.js +1 -0
  43. package/lib/locale/lang/pt-BR.min.js +1 -1
  44. package/lib/locale/lang/pt-BR.umd.js +1 -0
  45. package/lib/locale/lang/ru-RU.js +1 -0
  46. package/lib/locale/lang/ru-RU.min.js +1 -1
  47. package/lib/locale/lang/ru-RU.umd.js +1 -0
  48. package/lib/locale/lang/uk-UA.js +1 -0
  49. package/lib/locale/lang/uk-UA.min.js +1 -1
  50. package/lib/locale/lang/uk-UA.umd.js +1 -0
  51. package/lib/locale/lang/vi-VN.js +1 -0
  52. package/lib/locale/lang/vi-VN.min.js +1 -1
  53. package/lib/locale/lang/zh-CHT.js +1 -0
  54. package/lib/locale/lang/zh-CHT.min.js +1 -1
  55. package/lib/locale/lang/zh-CHT.umd.js +1 -0
  56. package/lib/locale/lang/zh-CN.js +1 -0
  57. package/lib/locale/lang/zh-CN.min.js +1 -1
  58. package/lib/locale/lang/zh-CN.umd.js +1 -0
  59. package/lib/style.css +1 -1
  60. package/lib/style.min.css +1 -1
  61. package/lib/table/module/export/export-panel.js +239 -185
  62. package/lib/table/module/export/export-panel.min.js +1 -1
  63. package/lib/table/module/export/import-panel.js +99 -52
  64. package/lib/table/module/export/import-panel.min.js +1 -1
  65. package/lib/table/module/export/mixin.js +14 -0
  66. package/lib/table/module/export/mixin.min.js +1 -1
  67. package/lib/table/src/body.js +1 -1
  68. package/lib/table/src/body.min.js +1 -1
  69. package/lib/table/src/methods.js +12 -3
  70. package/lib/table/src/methods.min.js +1 -1
  71. package/lib/table/style/style.css +48 -47
  72. package/lib/table/style/style.min.css +1 -1
  73. package/lib/ui/index.js +1 -1
  74. package/lib/ui/index.min.js +1 -1
  75. package/lib/ui/src/log.js +1 -1
  76. package/lib/ui/src/log.min.js +1 -1
  77. package/lib/vxe-table/style/style.css +48 -47
  78. package/lib/vxe-table/style/style.min.css +1 -1
  79. package/package.json +2 -2
  80. package/packages/locale/lang/en-US.ts +1 -0
  81. package/packages/locale/lang/es-ES.ts +1 -0
  82. package/packages/locale/lang/hu-HU.ts +1 -0
  83. package/packages/locale/lang/ja-JP.ts +1 -0
  84. package/packages/locale/lang/ko-KR.ts +1 -0
  85. package/packages/locale/lang/pt-BR.ts +1 -0
  86. package/packages/locale/lang/ru-RU.ts +1 -0
  87. package/packages/locale/lang/uk-UA.ts +1 -0
  88. package/packages/locale/lang/vi-VN.ts +1 -0
  89. package/packages/locale/lang/zh-CHT.ts +1 -0
  90. package/packages/locale/lang/zh-CN.ts +1 -0
  91. package/packages/table/module/export/export-panel.ts +323 -253
  92. package/packages/table/module/export/import-panel.ts +141 -79
  93. package/packages/table/module/export/mixin.ts +15 -0
  94. package/packages/table/src/body.ts +1 -1
  95. package/packages/table/src/methods.ts +11 -3
  96. package/styles/components/table-module/export.scss +17 -14
  97. /package/es/{iconfont.1730365807487.ttf → iconfont.1730454529299.ttf} +0 -0
  98. /package/es/{iconfont.1730365807487.woff → iconfont.1730454529299.woff} +0 -0
  99. /package/es/{iconfont.1730365807487.woff2 → iconfont.1730454529299.woff2} +0 -0
  100. /package/lib/{iconfont.1730365807487.ttf → iconfont.1730454529299.ttf} +0 -0
  101. /package/lib/{iconfont.1730365807487.woff → iconfont.1730454529299.woff} +0 -0
  102. /package/lib/{iconfont.1730365807487.woff2 → iconfont.1730454529299.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.4";
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.4"}`;
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
@@ -11370,7 +11370,12 @@ const Methods = {
11370
11370
  },
11371
11371
  // 计算可视渲染相关数据
11372
11372
  computeScrollLoad() {
11373
+ const $xeTable = this;
11374
+ const props = $xeTable;
11373
11375
  return this.$nextTick().then(() => {
11376
+ const {
11377
+ showOverflow
11378
+ } = props;
11374
11379
  const {
11375
11380
  sYOpts,
11376
11381
  sXOpts,
@@ -11384,7 +11389,9 @@ const Methods = {
11384
11389
  const {
11385
11390
  visibleSize: visibleXSize
11386
11391
  } = handleVirtualXVisible(this);
11387
- const offsetXSize = sXOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(sXOpts.oSize) : browse.msie ? 10 : browse.edge ? 5 : 0;
11392
+ // 动态列缓冲量
11393
+ const bufferSize = showOverflow ? 0 : 2;
11394
+ const offsetXSize = Math.max(bufferSize, sXOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(sXOpts.oSize) : browse.msie ? 10 : browse.edge ? 5 : 0);
11388
11395
  scrollXStore.offsetSize = offsetXSize;
11389
11396
  scrollXStore.visibleSize = visibleXSize;
11390
11397
  scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex);
@@ -11401,7 +11408,9 @@ const Methods = {
11401
11408
  visibleSize: visibleYSize
11402
11409
  } = handleVirtualYVisible(this);
11403
11410
  if (scrollYLoad) {
11404
- const offsetYSize = sYOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(sYOpts.oSize) : browse.msie ? 20 : browse.edge ? 10 : 0;
11411
+ // 动态高缓冲量
11412
+ const bufferSize = showOverflow ? 0 : 2;
11413
+ const offsetYSize = Math.max(bufferSize, sYOpts.oSize ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(sYOpts.oSize) : browse.edge ? 10 : 0);
11405
11414
  scrollYStore.offsetSize = offsetYSize;
11406
11415
  scrollYStore.visibleSize = visibleYSize;
11407
11416
  scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
@@ -11937,7 +11946,7 @@ const Methods = {
11937
11946
  }
11938
11947
  };
11939
11948
  // 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(',');
11949
+ 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
11950
  funcs.forEach(name => {
11942
11951
  Methods[name] = function (...args) {
11943
11952
  if (true) {
@@ -12287,7 +12296,7 @@ function renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, ro
12287
12296
  key: columnKey || columnOpts.useKey ? column.id : $columnIndex,
12288
12297
  attrs,
12289
12298
  style: Object.assign({
12290
- height: hasEllipsis && (scrollYRHeight || rowHeight) ? `${scrollYRHeight || rowHeight}px` : scrollYLoad ? `${rest.height || scrollYRHeight || rowHeight}px` : ''
12299
+ height: hasEllipsis && (scrollYRHeight || rowHeight) ? `${scrollYRHeight || rowHeight}px` : scrollYLoad ? `${rest.height || 24}px` : ''
12291
12300
  }, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(compCellStyle) ? compCellStyle(params) : compCellStyle, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(cellStyle) ? cellStyle(params) : cellStyle),
12292
12301
  on: tdOns
12293
12302
  }, tdVNs);
@@ -15057,7 +15066,8 @@ const {
15057
15066
  const {
15058
15067
  getI18n: import_panel_getI18n,
15059
15068
  getIcon: import_panel_getIcon,
15060
- globalMixins
15069
+ globalMixins,
15070
+ renderEmptyElement: import_panel_renderEmptyElement
15061
15071
  } = core_.VxeUI;
15062
15072
  /* harmony default export */ var import_panel = ({
15063
15073
  name: 'VxeTableImportPanel',
@@ -15070,6 +15080,11 @@ const {
15070
15080
  // VxeModal,
15071
15081
  // VxeRadio
15072
15082
  },
15083
+ inject: {
15084
+ $xeTable: {
15085
+ default: null
15086
+ }
15087
+ },
15073
15088
  data() {
15074
15089
  return {
15075
15090
  loading: false
@@ -15117,6 +15132,8 @@ const {
15117
15132
  }
15118
15133
  },
15119
15134
  render(h) {
15135
+ const $xeTable = this.$xeTable;
15136
+ const importOpts = $xeTable.importOpts;
15120
15137
  const {
15121
15138
  hasFile,
15122
15139
  parseTypeLabel,
@@ -15124,17 +15141,27 @@ const {
15124
15141
  storeData,
15125
15142
  selectName
15126
15143
  } = this;
15144
+ const slots = importOpts.slots || {};
15145
+ const topSlot = slots.top;
15146
+ const bottomSlot = slots.bottom;
15147
+ const defaultSlot = slots.default;
15148
+ const footerSlot = slots.footer;
15127
15149
  return h('vxe-modal', {
15128
15150
  ref: 'modal',
15129
15151
  props: {
15152
+ id: 'VXE_IMPORT_MODAL',
15130
15153
  value: storeData.visible,
15131
15154
  title: import_panel_getI18n('vxe.import.impTitle'),
15132
15155
  width: 540,
15156
+ minWidth: 360,
15157
+ minHeight: 240,
15133
15158
  mask: true,
15134
15159
  lockView: true,
15135
- showFooter: false,
15160
+ showFooter: true,
15136
15161
  escClosable: true,
15137
15162
  maskClosable: true,
15163
+ showMaximize: true,
15164
+ resize: true,
15138
15165
  loading: this.loading
15139
15166
  },
15140
15167
  on: {
@@ -15142,59 +15169,88 @@ const {
15142
15169
  storeData.visible = value;
15143
15170
  },
15144
15171
  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
15172
  },
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
- },
15178
- on: {
15179
- input(value) {
15180
- defaultOptions.mode = value;
15173
+ scopedSlots: {
15174
+ default: () => {
15175
+ const params = {
15176
+ $table: $xeTable,
15177
+ $grid: $xeTable.xegrid,
15178
+ options: importOpts,
15179
+ params: importOpts.params
15180
+ };
15181
+ return h('div', {
15182
+ class: 'vxe-table-export--panel'
15183
+ }, [topSlot ? h('div', {
15184
+ class: 'vxe-table-export--panel-top'
15185
+ }, $xeTable.callSlot(topSlot, params, h)) : import_panel_renderEmptyElement(this), h('div', {
15186
+ class: 'vxe-table-export--panel-body'
15187
+ }, defaultSlot ? $xeTable.callSlot(defaultSlot, params, h) : [h('table', {
15188
+ class: 'vxe-table-export--panel-table',
15189
+ attrs: {
15190
+ cellspacing: 0,
15191
+ cellpadding: 0,
15192
+ border: 0
15193
+ }
15194
+ }, [h('tbody', [h('tr', [h('td', import_panel_getI18n('vxe.import.impFile')), h('td', [hasFile ? h('div', {
15195
+ class: 'vxe-table-export--selected--file',
15196
+ attrs: {
15197
+ title: selectName
15198
+ }
15199
+ }, [h('span', selectName), h('i', {
15200
+ class: import_panel_getIcon().INPUT_CLEAR,
15201
+ on: {
15202
+ click: this.clearFileEvent
15203
+ }
15204
+ })]) : h('button', {
15205
+ ref: 'fileBtn',
15206
+ class: 'vxe-table-export--select--file',
15207
+ attrs: {
15208
+ type: 'button'
15209
+ },
15210
+ on: {
15211
+ click: this.selectFileEvent
15212
+ }
15213
+ }, 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', {
15214
+ props: {
15215
+ value: defaultOptions.mode,
15216
+ options: storeData.modeList
15217
+ },
15218
+ on: {
15219
+ input(value) {
15220
+ defaultOptions.mode = value;
15221
+ }
15222
+ }
15223
+ })])])])])]), bottomSlot ? h('div', {
15224
+ class: 'vxe-table-export--panel-bottom'
15225
+ }, $xeTable.callSlot(bottomSlot, params, h)) : import_panel_renderEmptyElement(this)]);
15226
+ },
15227
+ footer: () => {
15228
+ const params = {
15229
+ $table: $xeTable,
15230
+ $grid: $xeTable.xegrid,
15231
+ options: importOpts,
15232
+ params: importOpts.params
15233
+ };
15234
+ return h('div', {
15235
+ class: 'vxe-table-export--panel-footer'
15236
+ }, footerSlot ? $xeTable.callSlot(footerSlot, params, h) : [h('div', {
15237
+ class: 'vxe-table-export--panel-btns'
15238
+ }, [h('vxe-button', {
15239
+ on: {
15240
+ click: this.cancelEvent
15241
+ }
15242
+ }, import_panel_getI18n('vxe.import.impCancel')), h('vxe-button', {
15243
+ props: {
15244
+ status: 'primary',
15245
+ disabled: !hasFile
15246
+ },
15247
+ on: {
15248
+ click: this.importEvent
15249
+ }
15250
+ }, import_panel_getI18n('vxe.import.impConfirm'))])]);
15181
15251
  }
15182
15252
  }
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'))])])]);
15253
+ });
15198
15254
  },
15199
15255
  methods: {
15200
15256
  clearFileEvent() {
@@ -15250,7 +15306,8 @@ const {
15250
15306
  const {
15251
15307
  getI18n: export_panel_getI18n,
15252
15308
  getIcon: export_panel_getIcon,
15253
- globalMixins: export_panel_globalMixins
15309
+ globalMixins: export_panel_globalMixins,
15310
+ renderEmptyElement: export_panel_renderEmptyElement
15254
15311
  } = core_.VxeUI;
15255
15312
  /* harmony default export */ var export_panel = ({
15256
15313
  name: 'VxeTableExportPanel',
@@ -15266,6 +15323,11 @@ const {
15266
15323
  // VxeSelect,
15267
15324
  // VxeOption
15268
15325
  },
15326
+ inject: {
15327
+ $xeTable: {
15328
+ default: null
15329
+ }
15330
+ },
15269
15331
  data() {
15270
15332
  return {
15271
15333
  isAll: false,
@@ -15322,6 +15384,8 @@ const {
15322
15384
  }
15323
15385
  },
15324
15386
  render(h) {
15387
+ const $xeTable = this.$xeTable;
15388
+ const exportOpts = $xeTable.exportOpts;
15325
15389
  const {
15326
15390
  _e,
15327
15391
  checkedAll,
@@ -15337,20 +15401,27 @@ const {
15337
15401
  hasTree,
15338
15402
  hasMerge,
15339
15403
  isPrint,
15340
- hasColgroup
15404
+ hasColgroup,
15405
+ columns
15341
15406
  } = storeData;
15342
15407
  const {
15343
15408
  isHeader
15344
15409
  } = defaultOptions;
15410
+ const slots = exportOpts.slots || {};
15411
+ const topSlot = slots.top;
15412
+ const bottomSlot = slots.bottom;
15413
+ const defaultSlot = slots.default;
15414
+ const footerSlot = slots.footer;
15415
+ const parameterSlot = slots.parameter;
15345
15416
  const cols = [];
15346
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(storeData.columns, column => {
15417
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(columns, column => {
15347
15418
  const colTitle = formatText(column.getTitle(), 1);
15348
15419
  const isColGroup = column.children && column.children.length;
15349
15420
  const isChecked = column.checked;
15350
15421
  const indeterminate = column.halfChecked;
15351
15422
  const isHtml = column.type === 'html';
15352
15423
  cols.push(h('li', {
15353
- class: ['vxe-export--panel-column-option', `level--${column.level}`, {
15424
+ class: ['vxe-table-export--panel-column-option', `level--${column.level}`, {
15354
15425
  'is--group': isColGroup,
15355
15426
  'is--checked': isChecked,
15356
15427
  'is--indeterminate': indeterminate,
@@ -15382,14 +15453,19 @@ const {
15382
15453
  return h('vxe-modal', {
15383
15454
  ref: 'modal',
15384
15455
  props: {
15456
+ id: 'VXE_EXPORT_MODAL',
15385
15457
  value: storeData.visible,
15386
15458
  title: export_panel_getI18n(isPrint ? 'vxe.export.printTitle' : 'vxe.export.expTitle'),
15387
15459
  width: 660,
15460
+ minWidth: 500,
15461
+ minHeight: 400,
15388
15462
  mask: true,
15389
15463
  lockView: true,
15390
- showFooter: false,
15464
+ showFooter: true,
15391
15465
  escClosable: true,
15392
15466
  maskClosable: true,
15467
+ showMaximize: true,
15468
+ resize: true,
15393
15469
  loading: this.loading
15394
15470
  },
15395
15471
  on: {
@@ -15397,187 +15473,220 @@ const {
15397
15473
  storeData.visible = value;
15398
15474
  },
15399
15475
  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
15476
  },
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
- },
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;
15477
+ scopedSlots: {
15478
+ default: () => {
15479
+ const params = {
15480
+ $table: $xeTable,
15481
+ $grid: $xeTable.xegrid,
15482
+ options: exportOpts,
15483
+ columns,
15484
+ params: exportOpts.params
15485
+ };
15486
+ return h('div', {
15487
+ class: 'vxe-table-export--panel'
15488
+ }, [topSlot ? h('div', {
15489
+ class: 'vxe-table-export--panel-top'
15490
+ }, $xeTable.callSlot(topSlot, params, h)) : export_panel_renderEmptyElement(this), h('div', {
15491
+ class: 'vxe-table-export--panel-body'
15492
+ }, defaultSlot ? $xeTable.callSlot(defaultSlot, params, h) : [h('table', {
15493
+ attrs: {
15494
+ class: 'vxe-table-export--panel-table',
15495
+ cellspacing: 0,
15496
+ cellpadding: 0,
15497
+ border: 0
15498
+ }
15499
+ }, [h('tbody', [[isPrint ? _e() : h('tr', [h('td', export_panel_getI18n('vxe.export.expName')), h('td', [h('vxe-input', {
15500
+ ref: 'filename',
15501
+ props: {
15502
+ value: defaultOptions.filename,
15503
+ type: 'text',
15504
+ clearable: true,
15505
+ placeholder: export_panel_getI18n('vxe.export.expNamePlaceholder')
15506
+ },
15507
+ on: {
15508
+ modelValue(value) {
15509
+ defaultOptions.filename = value;
15510
+ }
15511
+ }
15512
+ })])]), isPrint ? _e() : h('tr', [h('td', export_panel_getI18n('vxe.export.expType')), h('td', [h('vxe-select', {
15513
+ props: {
15514
+ value: defaultOptions.type,
15515
+ options: storeData.typeList
15516
+ },
15517
+ on: {
15518
+ input(value) {
15519
+ defaultOptions.type = value;
15520
+ }
15521
+ }
15522
+ })])]), isPrint || showSheet ? h('tr', [h('td', export_panel_getI18n('vxe.export.expSheetName')), h('td', [h('vxe-input', {
15523
+ ref: 'sheetname',
15524
+ props: {
15525
+ value: defaultOptions.sheetName,
15526
+ type: 'text',
15527
+ clearable: true,
15528
+ placeholder: export_panel_getI18n('vxe.export.expSheetNamePlaceholder')
15529
+ },
15530
+ on: {
15531
+ modelValue(value) {
15532
+ defaultOptions.sheetName = value;
15533
+ }
15534
+ }
15535
+ })])]) : _e(), h('tr', [h('td', export_panel_getI18n('vxe.export.expMode')), h('td', [h('vxe-select', {
15536
+ props: {
15537
+ value: defaultOptions.mode,
15538
+ options: storeData.modeList
15539
+ },
15540
+ on: {
15541
+ input(value) {
15542
+ defaultOptions.mode = value;
15543
+ }
15544
+ }
15545
+ })])]), h('tr', [h('td', [export_panel_getI18n('vxe.export.expColumn')]), h('td', [h('div', {
15546
+ class: 'vxe-table-export--panel-column'
15547
+ }, [h('ul', {
15548
+ class: 'vxe-table-export--panel-column-header'
15549
+ }, [h('li', {
15550
+ class: ['vxe-table-export--panel-column-option', {
15551
+ 'is--checked': isAllChecked,
15552
+ 'is--indeterminate': isAllIndeterminate
15553
+ }],
15554
+ attrs: {
15555
+ title: export_panel_getI18n('vxe.table.allTitle')
15556
+ },
15557
+ on: {
15558
+ click: this.allColumnEvent
15559
+ }
15560
+ }, [h('span', {
15561
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? export_panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? export_panel_getIcon().TABLE_CHECKBOX_CHECKED : export_panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
15562
+ }), h('span', {
15563
+ class: 'vxe-checkbox--label'
15564
+ }, export_panel_getI18n('vxe.export.expCurrentColumn'))])]), h('ul', {
15565
+ class: 'vxe-table-export--panel-column-body'
15566
+ }, cols)])])]), h('tr', [h('td', export_panel_getI18n('vxe.export.expOpts')), parameterSlot ? h('td', [h('div', {
15567
+ class: 'vxe-table-export--panel-option-row'
15568
+ }, $xeTable.callSlot(parameterSlot, params))]) : h('td', [h('div', {
15569
+ class: 'vxe-table-export--panel-option-row'
15570
+ }, [h('vxe-checkbox', {
15571
+ props: {
15572
+ value: isHeader,
15573
+ title: export_panel_getI18n('vxe.export.expHeaderTitle'),
15574
+ content: export_panel_getI18n('vxe.export.expOptHeader')
15575
+ },
15576
+ on: {
15577
+ input(value) {
15578
+ defaultOptions.isHeader = value;
15579
+ }
15580
+ }
15581
+ }), h('vxe-checkbox', {
15582
+ props: {
15583
+ value: defaultOptions.isFooter,
15584
+ disabled: !storeData.hasFooter,
15585
+ title: export_panel_getI18n('vxe.export.expFooterTitle'),
15586
+ content: export_panel_getI18n('vxe.export.expOptFooter')
15587
+ },
15588
+ on: {
15589
+ input(value) {
15590
+ defaultOptions.isFooter = value;
15591
+ }
15592
+ }
15593
+ }), h('vxe-checkbox', {
15594
+ props: {
15595
+ value: defaultOptions.original,
15596
+ title: export_panel_getI18n('vxe.export.expOriginalTitle'),
15597
+ content: export_panel_getI18n('vxe.export.expOptOriginal')
15598
+ },
15599
+ on: {
15600
+ input(value) {
15601
+ defaultOptions.original = value;
15602
+ }
15603
+ }
15604
+ })]), h('div', {
15605
+ class: 'vxe-table-export--panel-option-row'
15606
+ }, [h('vxe-checkbox', {
15607
+ props: {
15608
+ value: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
15609
+ disabled: !isHeader || !hasColgroup || !supportMerge,
15610
+ title: export_panel_getI18n('vxe.export.expColgroupTitle'),
15611
+ content: export_panel_getI18n('vxe.export.expOptColgroup')
15612
+ },
15613
+ on: {
15614
+ input(value) {
15615
+ defaultOptions.isColgroup = value;
15616
+ }
15617
+ }
15618
+ }), h('vxe-checkbox', {
15619
+ props: {
15620
+ value: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
15621
+ disabled: !hasMerge || !supportMerge || !checkedAll,
15622
+ title: export_panel_getI18n('vxe.export.expMergeTitle'),
15623
+ content: export_panel_getI18n('vxe.export.expOptMerge')
15624
+ },
15625
+ on: {
15626
+ input(value) {
15627
+ defaultOptions.isMerge = value;
15628
+ }
15629
+ }
15630
+ }), isPrint ? _e() : h('vxe-checkbox', {
15631
+ props: {
15632
+ value: supportStyle ? defaultOptions.useStyle : false,
15633
+ disabled: !supportStyle,
15634
+ title: export_panel_getI18n('vxe.export.expUseStyleTitle'),
15635
+ content: export_panel_getI18n('vxe.export.expOptUseStyle')
15636
+ },
15637
+ on: {
15638
+ input(value) {
15639
+ defaultOptions.useStyle = value;
15640
+ }
15641
+ }
15642
+ }), h('vxe-checkbox', {
15643
+ props: {
15644
+ value: hasTree ? defaultOptions.isAllExpand : false,
15645
+ disabled: !hasTree,
15646
+ title: export_panel_getI18n('vxe.export.expAllExpandTitle'),
15647
+ content: export_panel_getI18n('vxe.export.expOptAllExpand')
15648
+ },
15649
+ on: {
15650
+ input(value) {
15651
+ defaultOptions.isAllExpand = value;
15652
+ }
15653
+ }
15654
+ })])])])]])])]), bottomSlot ? h('div', {
15655
+ class: 'vxe-table-export--panel-bottom'
15656
+ }, $xeTable.callSlot(bottomSlot, params, h)) : export_panel_renderEmptyElement(this)]);
15657
+ },
15658
+ footer: () => {
15659
+ const params = {
15660
+ $table: $xeTable,
15661
+ $grid: $xeTable.xegrid,
15662
+ options: exportOpts,
15663
+ columns,
15664
+ params: exportOpts.params
15665
+ };
15666
+ return h('div', {
15667
+ class: 'vxe-table-export--panel-footer'
15668
+ }, footerSlot ? $xeTable.callSlot(footerSlot, params) : [h('div', {
15669
+ class: 'vxe-table-export--panel-btns'
15670
+ }, [h('vxe-button', {
15671
+ props: {
15672
+ content: export_panel_getI18n('vxe.export.expCancel')
15673
+ },
15674
+ on: {
15675
+ click: this.cancelEvent
15676
+ }
15677
+ }), h('vxe-button', {
15678
+ ref: 'confirmBtn',
15679
+ props: {
15680
+ status: 'primary',
15681
+ content: export_panel_getI18n(isPrint ? 'vxe.export.expPrint' : 'vxe.export.expConfirm')
15682
+ },
15683
+ on: {
15684
+ click: this.confirmEvent
15685
+ }
15686
+ })])]);
15560
15687
  }
15561
15688
  }
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
- })])])]);
15689
+ });
15581
15690
  },
15582
15691
  methods: {
15583
15692
  changeOption(column) {
@@ -15667,9 +15776,10 @@ const {
15667
15776
  $xetable.print(Object.assign({}, $xetable.printOpts, this.getExportOption()));
15668
15777
  },
15669
15778
  exportEvent() {
15670
- const $xetable = this.$parent;
15779
+ const $xeTable = this.$xeTable;
15780
+ const exportOpts = $xeTable.exportOpts;
15671
15781
  this.loading = true;
15672
- $xetable.exportData(Object.assign({}, $xetable.exportOpts, this.getExportOption())).then(() => {
15782
+ $xeTable.exportData(Object.assign({}, exportOpts, this.getExportOption())).then(() => {
15673
15783
  this.loading = false;
15674
15784
  this.storeData.visible = false;
15675
15785
  }).catch(() => {
@@ -18580,6 +18690,12 @@ function handleFileImport($xetable, file, opts) {
18580
18690
  return Promise.reject(e);
18581
18691
  });
18582
18692
  }
18693
+ function handleCloseExport() {
18694
+ if (core_.VxeUI.modal) {
18695
+ return core_.VxeUI.modal.close('VXE_EXPORT_MODAL');
18696
+ }
18697
+ return Promise.resolve();
18698
+ }
18583
18699
  /**
18584
18700
  * 读取本地文件
18585
18701
  * @param {*} options 参数
@@ -19172,6 +19288,12 @@ const convertToRows = originColumns => {
19172
19288
  };
19173
19289
  });
19174
19290
  },
19291
+ _closeImport() {
19292
+ if (core_.VxeUI.modal) {
19293
+ return core_.VxeUI.modal.close('VXE_IMPORT_MODAL');
19294
+ }
19295
+ return Promise.resolve();
19296
+ },
19175
19297
  _openImport(options) {
19176
19298
  const {
19177
19299
  importOpts
@@ -19230,6 +19352,7 @@ const convertToRows = originColumns => {
19230
19352
  }
19231
19353
  this.initStore.import = true;
19232
19354
  },
19355
+ _closeExport: handleCloseExport,
19233
19356
  _openExport(options) {
19234
19357
  const {
19235
19358
  exportOpts
@@ -19241,6 +19364,7 @@ const convertToRows = originColumns => {
19241
19364
  }
19242
19365
  return handleExportAndPrint(this, Object.assign({}, exportOpts, options));
19243
19366
  },
19367
+ _closePrint: handleCloseExport,
19244
19368
  _openPrint(options) {
19245
19369
  const {
19246
19370
  printOpts
@@ -25124,6 +25248,7 @@ const Toolbar = VxeToolbar;
25124
25248
  checkProp: '当数据量过大时可能会导致复选框卡顿,建议设置参数 "{0}" 提升渲染速度',
25125
25249
  coverProp: '"{0}" 的参数 "{1}" 重复定义,这可能会出现错误',
25126
25250
  uniField: '字段名 "{0}" 重复定义,这可能会出现错误',
25251
+ repeatKey: '主键重复 {0}="{1}",这可能会出现错误',
25127
25252
  delFunc: '方法 "{0}" 已废弃,请使用 "{1}"',
25128
25253
  delProp: '参数 "{0}" 已废弃,请使用 "{1}"',
25129
25254
  delEvent: '事件 "{0}" 已废弃,请使用 "{1}"',