vxe-table 3.9.0-rc.9 → 3.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/README.md +80 -9
  2. package/es/grid/src/grid.js +116 -62
  3. package/es/grid/style.css +0 -1
  4. package/es/grid/style.min.css +1 -1
  5. package/es/index.esm.js +22 -3
  6. package/es/locale/lang/en-US.js +6 -2
  7. package/es/locale/lang/es-ES.js +5 -1
  8. package/es/locale/lang/hu-HU.js +5 -1
  9. package/es/locale/lang/ja-JP.js +5 -1
  10. package/es/locale/lang/ko-KR.js +5 -1
  11. package/es/locale/lang/pt-BR.js +5 -1
  12. package/es/locale/lang/ru-RU.js +5 -1
  13. package/es/locale/lang/uk-UA.js +5 -1
  14. package/es/locale/lang/vi-VN.js +5 -1
  15. package/es/locale/lang/zh-CHT.js +5 -1
  16. package/es/locale/lang/zh-CN.js +5 -1
  17. package/es/style.css +1 -1
  18. package/es/style.min.css +1 -1
  19. package/es/table/module/custom/panel.js +183 -173
  20. package/es/table/module/edit/mixin.js +35 -40
  21. package/es/table/module/export/export-panel.js +32 -4
  22. package/es/table/module/export/import-panel.js +25 -6
  23. package/es/table/module/export/mixin.js +11 -11
  24. package/es/table/module/menu/mixin.js +2 -2
  25. package/es/table/module/validator/mixin.js +4 -4
  26. package/es/table/render/index.js +17 -11
  27. package/es/table/src/body.js +1 -0
  28. package/es/table/src/columnInfo.js +3 -3
  29. package/es/table/src/methods.js +69 -55
  30. package/es/table/src/props.js +65 -15
  31. package/es/table/src/table.js +63 -29
  32. package/es/table/src/util.js +3 -2
  33. package/es/table/style.css +37 -48
  34. package/es/table/style.min.css +1 -1
  35. package/es/toolbar/src/toolbar.js +21 -7
  36. package/es/toolbar/style.css +0 -1
  37. package/es/toolbar/style.min.css +1 -1
  38. package/es/ui/index.js +5 -3
  39. package/es/ui/src/log.js +1 -1
  40. package/es/vxe-grid/style.css +0 -1
  41. package/es/vxe-grid/style.min.css +1 -1
  42. package/es/vxe-table/style.css +37 -48
  43. package/es/vxe-table/style.min.css +1 -1
  44. package/es/vxe-toolbar/style.css +0 -1
  45. package/es/vxe-toolbar/style.min.css +1 -1
  46. package/lib/colgroup/index.js +3 -3
  47. package/lib/colgroup/index.min.js +1 -1
  48. package/lib/column/index.js +3 -3
  49. package/lib/column/index.min.js +1 -1
  50. package/lib/components.js +9 -11
  51. package/lib/components.min.js +1 -1
  52. package/lib/grid/index.js +3 -3
  53. package/lib/grid/index.min.js +1 -1
  54. package/lib/grid/src/grid.js +577 -487
  55. package/lib/grid/src/grid.min.js +1 -1
  56. package/lib/grid/style/style.css +0 -1
  57. package/lib/grid/style/style.min.css +1 -1
  58. package/lib/index.common.js +3 -4
  59. package/lib/index.umd.js +9148 -17246
  60. package/lib/index.umd.min.js +1 -1
  61. package/lib/locale/lang/en-US.js +6 -2
  62. package/lib/locale/lang/en-US.min.js +1 -1
  63. package/lib/locale/lang/en-US.umd.js +6 -2
  64. package/lib/locale/lang/es-ES.js +5 -1
  65. package/lib/locale/lang/es-ES.min.js +1 -1
  66. package/lib/locale/lang/es-ES.umd.js +5 -1
  67. package/lib/locale/lang/hu-HU.js +5 -1
  68. package/lib/locale/lang/hu-HU.min.js +1 -1
  69. package/lib/locale/lang/hu-HU.umd.js +5 -1
  70. package/lib/locale/lang/ja-JP.js +5 -1
  71. package/lib/locale/lang/ja-JP.min.js +1 -1
  72. package/lib/locale/lang/ja-JP.umd.js +5 -1
  73. package/lib/locale/lang/ko-KR.js +5 -1
  74. package/lib/locale/lang/ko-KR.min.js +1 -1
  75. package/lib/locale/lang/ko-KR.umd.js +5 -1
  76. package/lib/locale/lang/pt-BR.js +5 -1
  77. package/lib/locale/lang/pt-BR.min.js +1 -1
  78. package/lib/locale/lang/pt-BR.umd.js +5 -1
  79. package/lib/locale/lang/ru-RU.js +5 -1
  80. package/lib/locale/lang/ru-RU.min.js +1 -1
  81. package/lib/locale/lang/ru-RU.umd.js +5 -1
  82. package/lib/locale/lang/uk-UA.js +5 -1
  83. package/lib/locale/lang/uk-UA.min.js +1 -1
  84. package/lib/locale/lang/uk-UA.umd.js +5 -1
  85. package/lib/locale/lang/vi-VN.js +5 -1
  86. package/lib/locale/lang/vi-VN.min.js +1 -1
  87. package/lib/locale/lang/zh-CHT.js +5 -1
  88. package/lib/locale/lang/zh-CHT.min.js +1 -1
  89. package/lib/locale/lang/zh-CHT.umd.js +5 -1
  90. package/lib/locale/lang/zh-CN.js +5 -1
  91. package/lib/locale/lang/zh-CN.min.js +1 -1
  92. package/lib/locale/lang/zh-CN.umd.js +5 -1
  93. package/lib/style.css +1 -1
  94. package/lib/style.min.css +1 -1
  95. package/lib/table/index.js +4 -4
  96. package/lib/table/index.min.js +1 -1
  97. package/lib/table/module/custom/mixin.js +53 -44
  98. package/lib/table/module/custom/mixin.min.js +1 -1
  99. package/lib/table/module/custom/panel.js +310 -239
  100. package/lib/table/module/custom/panel.min.js +1 -1
  101. package/lib/table/module/edit/mixin.js +434 -383
  102. package/lib/table/module/edit/mixin.min.js +1 -1
  103. package/lib/table/module/export/export-panel.js +136 -106
  104. package/lib/table/module/export/export-panel.min.js +1 -1
  105. package/lib/table/module/export/import-panel.js +75 -54
  106. package/lib/table/module/export/import-panel.min.js +1 -1
  107. package/lib/table/module/export/mixin.js +592 -597
  108. package/lib/table/module/export/mixin.min.js +1 -1
  109. package/lib/table/module/export/util.js +6 -4
  110. package/lib/table/module/export/util.min.js +1 -1
  111. package/lib/table/module/filter/mixin.js +147 -118
  112. package/lib/table/module/filter/mixin.min.js +1 -1
  113. package/lib/table/module/filter/panel.js +86 -65
  114. package/lib/table/module/filter/panel.min.js +1 -1
  115. package/lib/table/module/keyboard/mixin.js +163 -151
  116. package/lib/table/module/keyboard/mixin.min.js +1 -1
  117. package/lib/table/module/menu/mixin.js +125 -114
  118. package/lib/table/module/menu/mixin.min.js +1 -1
  119. package/lib/table/module/menu/panel.js +36 -34
  120. package/lib/table/module/menu/panel.min.js +1 -1
  121. package/lib/table/module/validator/mixin.js +225 -214
  122. package/lib/table/module/validator/mixin.min.js +1 -1
  123. package/lib/table/render/index.js +401 -297
  124. package/lib/table/render/index.min.js +1 -1
  125. package/lib/table/src/body.js +411 -349
  126. package/lib/table/src/body.min.js +1 -1
  127. package/lib/table/src/cell.js +470 -344
  128. package/lib/table/src/cell.min.js +1 -1
  129. package/lib/table/src/column.js +10 -10
  130. package/lib/table/src/column.min.js +1 -1
  131. package/lib/table/src/columnInfo.js +46 -55
  132. package/lib/table/src/columnInfo.min.js +1 -1
  133. package/lib/table/src/footer.js +157 -132
  134. package/lib/table/src/footer.min.js +1 -1
  135. package/lib/table/src/group.js +1 -1
  136. package/lib/table/src/group.min.js +1 -1
  137. package/lib/table/src/header.js +170 -153
  138. package/lib/table/src/header.min.js +1 -1
  139. package/lib/table/src/methods.js +2770 -2491
  140. package/lib/table/src/methods.min.js +1 -1
  141. package/lib/table/src/props.js +33 -74
  142. package/lib/table/src/props.min.js +1 -1
  143. package/lib/table/src/table.js +436 -395
  144. package/lib/table/src/table.min.js +1 -1
  145. package/lib/table/src/util.js +143 -131
  146. package/lib/table/src/util.min.js +1 -1
  147. package/lib/table/style/style.css +37 -48
  148. package/lib/table/style/style.min.css +1 -1
  149. package/lib/toolbar/index.js +3 -3
  150. package/lib/toolbar/index.min.js +1 -1
  151. package/lib/toolbar/src/toolbar.js +332 -284
  152. package/lib/toolbar/src/toolbar.min.js +1 -1
  153. package/lib/toolbar/style/style.css +0 -1
  154. package/lib/toolbar/style/style.min.css +1 -1
  155. package/lib/ui/index.js +50 -41
  156. package/lib/ui/index.min.js +1 -1
  157. package/lib/ui/src/comp.js +2 -3
  158. package/lib/ui/src/comp.min.js +1 -1
  159. package/lib/ui/src/dom.js +29 -28
  160. package/lib/ui/src/dom.min.js +1 -1
  161. package/lib/ui/src/log.js +6 -4
  162. package/lib/ui/src/log.min.js +1 -1
  163. package/lib/ui/src/utils.js +7 -7
  164. package/lib/v-x-e-table/index.js +3 -4
  165. package/lib/v-x-e-table/index.min.js +1 -1
  166. package/lib/vxe-colgroup/index.js +3 -4
  167. package/lib/vxe-colgroup/index.min.js +1 -1
  168. package/lib/vxe-column/index.js +3 -4
  169. package/lib/vxe-column/index.min.js +1 -1
  170. package/lib/vxe-grid/index.js +3 -4
  171. package/lib/vxe-grid/index.min.js +1 -1
  172. package/lib/vxe-grid/style/style.css +0 -1
  173. package/lib/vxe-grid/style/style.min.css +1 -1
  174. package/lib/vxe-table/index.js +3 -4
  175. package/lib/vxe-table/index.min.js +1 -1
  176. package/lib/vxe-table/style/style.css +37 -48
  177. package/lib/vxe-table/style/style.min.css +1 -1
  178. package/lib/vxe-toolbar/index.js +3 -4
  179. package/lib/vxe-toolbar/index.min.js +1 -1
  180. package/lib/vxe-toolbar/style/style.css +0 -1
  181. package/lib/vxe-toolbar/style/style.min.css +1 -1
  182. package/lib/vxe-ui/index.js +3 -4
  183. package/lib/vxe-ui/index.min.js +1 -1
  184. package/lib/vxe-v-x-e-table/index.js +3 -4
  185. package/lib/vxe-v-x-e-table/index.min.js +1 -1
  186. package/package.json +5 -4
  187. package/packages/grid/src/grid.ts +123 -61
  188. package/packages/locale/lang/en-US.ts +6 -2
  189. package/packages/locale/lang/es-ES.ts +5 -1
  190. package/packages/locale/lang/hu-HU.ts +5 -1
  191. package/packages/locale/lang/ja-JP.ts +5 -1
  192. package/packages/locale/lang/ko-KR.ts +5 -1
  193. package/packages/locale/lang/pt-BR.ts +5 -1
  194. package/packages/locale/lang/ru-RU.ts +5 -1
  195. package/packages/locale/lang/uk-UA.ts +5 -1
  196. package/packages/locale/lang/vi-VN.ts +5 -1
  197. package/packages/locale/lang/zh-CHT.ts +5 -1
  198. package/packages/locale/lang/zh-CN.ts +5 -1
  199. package/packages/table/module/custom/panel.ts +186 -175
  200. package/packages/table/module/edit/mixin.ts +34 -39
  201. package/packages/table/module/export/export-panel.ts +36 -4
  202. package/packages/table/module/export/import-panel.ts +29 -6
  203. package/packages/table/module/export/mixin.ts +11 -11
  204. package/packages/table/module/menu/mixin.ts +2 -2
  205. package/packages/table/module/validator/mixin.ts +4 -4
  206. package/packages/table/render/index.ts +20 -11
  207. package/packages/table/src/body.ts +1 -0
  208. package/packages/table/src/columnInfo.ts +3 -3
  209. package/packages/table/src/methods.ts +70 -55
  210. package/packages/table/src/props.ts +68 -15
  211. package/packages/table/src/table.ts +71 -26
  212. package/packages/table/src/util.ts +3 -2
  213. package/packages/toolbar/src/toolbar.ts +21 -7
  214. package/packages/ui/index.ts +3 -1
  215. package/styles/components/table.scss +82 -17
  216. package/types/all.d.ts +1 -0
  217. /package/es/{iconfont.1726453742001.ttf → iconfont.1728483486168.ttf} +0 -0
  218. /package/es/{iconfont.1726453742001.woff → iconfont.1728483486168.woff} +0 -0
  219. /package/es/{iconfont.1726453742001.woff2 → iconfont.1728483486168.woff2} +0 -0
  220. /package/lib/{iconfont.1726453742001.ttf → iconfont.1728483486168.ttf} +0 -0
  221. /package/lib/{iconfont.1726453742001.woff → iconfont.1728483486168.woff} +0 -0
  222. /package/lib/{iconfont.1726453742001.woff2 → iconfont.1728483486168.woff2} +0 -0
@@ -3,7 +3,7 @@ import { formatText } from '../../../ui/src/utils';
3
3
  import { addClass, removeClass } from '../../../ui/src/dom';
4
4
  import { errLog } from '../../../ui/src/log';
5
5
  import XEUtils from 'xe-utils';
6
- const { getI18n, getIcon } = VxeUI;
6
+ const { getI18n, getIcon, renderEmptyElement } = VxeUI;
7
7
  function updateDropHint(_vm, evnt) {
8
8
  const { $refs } = _vm;
9
9
  const dragHintEl = $refs.dragHintElemRef;
@@ -267,7 +267,11 @@ const renderSimplePanel = (h, _vm) => {
267
267
  : []);
268
268
  };
269
269
  const renderPopupPanel = (h, _vm) => {
270
+ const VxeUIModalComponent = VxeUI.getComponent('VxeModal');
270
271
  const VxeUIButtonComponent = VxeUI.getComponent('VxeButton');
272
+ const VxeUIInputComponent = VxeUI.getComponent('VxeInput');
273
+ const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip');
274
+ const $xeTableCustomPanel = _vm;
271
275
  const { _e, $xetable, customStore } = _vm;
272
276
  const { customOpts, customColumnList, columnOpts, isMaxFixedColumn } = $xetable;
273
277
  const { modalOptions, allowVisible, allowSort, allowFixed, allowResizable, checkMethod, visibleMethod } = customOpts;
@@ -375,18 +379,20 @@ const renderPopupPanel = (h, _vm) => {
375
379
  }, [
376
380
  column.children && column.children.length
377
381
  ? h('span', '-')
378
- : h('vxe-input', {
379
- props: {
380
- type: 'integer',
381
- disabled: isHidden,
382
- value: column.renderResizeWidth
383
- },
384
- on: {
385
- modelValue(value) {
386
- column.renderResizeWidth = Math.max(0, Number(value));
382
+ : (VxeUIInputComponent
383
+ ? h(VxeUIInputComponent, {
384
+ props: {
385
+ type: 'integer',
386
+ disabled: isHidden,
387
+ value: column.renderResizeWidth
388
+ },
389
+ on: {
390
+ modelValue(value) {
391
+ column.renderResizeWidth = Math.max(0, Number(value));
392
+ }
387
393
  }
388
- }
389
- })
394
+ })
395
+ : renderEmptyElement($xeTableCustomPanel))
390
396
  ])
391
397
  : _e(),
392
398
  allowFixed
@@ -420,177 +426,181 @@ const renderPopupPanel = (h, _vm) => {
420
426
  });
421
427
  const isAllChecked = customStore.isAll;
422
428
  const isAllIndeterminate = customStore.isIndeterminate;
423
- return h('vxe-modal', {
424
- key: 'modal',
425
- props: {
426
- className: ['vxe-table-custom-popup-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
427
- value: customStore.visible,
428
- title: modalOpts.title || getI18n('vxe.custom.cstmTitle'),
429
- width: modalOpts.width || Math.min(880, document.documentElement.clientWidth),
430
- minWidth: modalOpts.minWidth || 700,
431
- height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
432
- minHeight: modalOpts.minHeight || 400,
433
- showZoom: !!modalOpts.showZoom,
434
- mask: !!modalOpts.mask,
435
- lockView: !!modalOpts.lockView,
436
- resize: !!modalOpts.resize,
437
- escClosable: !!modalOpts.escClosable,
438
- destroyOnClose: true,
439
- showFooter: true
440
- },
441
- on: {
442
- input(value) {
443
- customStore.visible = value;
444
- }
445
- },
446
- scopedSlots: {
447
- default: () => {
448
- return h('div', {
449
- ref: 'bodyElemRef',
450
- class: 'vxe-table-custom-popup--body'
451
- }, [
452
- h('div', {
453
- class: 'vxe-table-custom-popup--table-wrapper'
429
+ return VxeUIModalComponent
430
+ ? h(VxeUIModalComponent, {
431
+ key: 'modal',
432
+ props: {
433
+ className: ['vxe-table-custom-popup-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
434
+ value: customStore.visible,
435
+ title: modalOpts.title || getI18n('vxe.custom.cstmTitle'),
436
+ width: modalOpts.width || Math.min(880, document.documentElement.clientWidth),
437
+ minWidth: modalOpts.minWidth || 700,
438
+ height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
439
+ minHeight: modalOpts.minHeight || 400,
440
+ showZoom: !!modalOpts.showZoom,
441
+ mask: !!modalOpts.mask,
442
+ lockView: !!modalOpts.lockView,
443
+ resize: !!modalOpts.resize,
444
+ escClosable: !!modalOpts.escClosable,
445
+ destroyOnClose: true,
446
+ showFooter: true
447
+ },
448
+ on: {
449
+ input(value) {
450
+ customStore.visible = value;
451
+ }
452
+ },
453
+ scopedSlots: {
454
+ default: () => {
455
+ return h('div', {
456
+ ref: 'bodyElemRef',
457
+ class: 'vxe-table-custom-popup--body'
454
458
  }, [
455
- h('table', {}, [
456
- h('colgroup', {}, [
457
- allowVisible
458
- ? h('col', {
459
- style: {
460
- width: '80px'
461
- }
462
- })
463
- : _e(),
464
- allowSort
465
- ? h('col', {
466
- style: {
467
- width: '80px'
468
- }
469
- })
470
- : _e(),
471
- h('col', {
472
- style: {
473
- minWidth: '120px'
474
- }
475
- }),
476
- allowResizable
477
- ? h('col', {
478
- style: {
479
- width: '140px'
480
- }
481
- })
482
- : _e(),
483
- allowFixed
484
- ? h('col', {
485
- style: {
486
- width: '200px'
487
- }
488
- })
489
- : _e()
490
- ]),
491
- h('thead', {}, [
492
- h('tr', {}, [
459
+ h('div', {
460
+ class: 'vxe-table-custom-popup--table-wrapper'
461
+ }, [
462
+ h('table', {}, [
463
+ h('colgroup', {}, [
493
464
  allowVisible
494
- ? h('th', {}, [
495
- h('div', {
496
- class: ['vxe-table-custom--checkbox-option', {
497
- 'is--checked': isAllChecked,
498
- 'is--indeterminate': isAllIndeterminate
499
- }],
500
- attrs: {
501
- title: getI18n('vxe.table.allTitle')
502
- },
503
- on: {
504
- click: _vm.allOptionEvent
505
- }
506
- }, [
507
- h('span', {
508
- class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
509
- }),
510
- h('span', {
511
- class: 'vxe-checkbox--label'
512
- }, getI18n('vxe.toolbar.customAll'))
513
- ])
514
- ])
465
+ ? h('col', {
466
+ style: {
467
+ width: '80px'
468
+ }
469
+ })
515
470
  : _e(),
516
471
  allowSort
517
- ? h('th', {}, [
518
- h('span', {
519
- class: 'vxe-table-custom-popup--table-sort-help-title'
520
- }, getI18n('vxe.custom.setting.colSort')),
521
- h('vxe-tooltip', {
522
- props: {
523
- enterable: true,
524
- content: getI18n('vxe.custom.setting.sortHelpTip'),
525
- popupClassName: 'vxe-table--ignore-clear'
526
- },
527
- scopedSlots: {
528
- default: () => {
529
- return h('i', {
530
- class: 'vxe-table-custom-popup--table-sort-help-icon vxe-icon-question-circle-fill'
531
- });
532
- }
533
- }
534
- })
535
- ])
472
+ ? h('col', {
473
+ style: {
474
+ width: '80px'
475
+ }
476
+ })
536
477
  : _e(),
537
- h('th', {}, getI18n('vxe.custom.setting.colTitle')),
478
+ h('col', {
479
+ style: {
480
+ minWidth: '120px'
481
+ }
482
+ }),
538
483
  allowResizable
539
- ? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
484
+ ? h('col', {
485
+ style: {
486
+ width: '140px'
487
+ }
488
+ })
540
489
  : _e(),
541
490
  allowFixed
542
- ? h('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
491
+ ? h('col', {
492
+ style: {
493
+ width: '200px'
494
+ }
495
+ })
543
496
  : _e()
544
- ])
545
- ]),
546
- h('transition-group', {
547
- class: 'vxe-table-custom--body',
548
- props: {
549
- tag: 'tbody',
550
- name: 'vxe-table-custom--list'
551
- }
552
- }, trVNs)
553
- ])
554
- ]),
555
- h('div', {
556
- ref: 'dragHintElemRef',
557
- class: 'vxe-table-custom-popup--drag-hint'
558
- }, getI18n('vxe.custom.cstmDragTarget', [_vm.dragColumn ? _vm.dragColumn.getTitle() : '']))
559
- ]);
560
- },
561
- footer: () => {
562
- return h('div', {
563
- class: 'vxe-table-custom-popup--footer'
564
- }, [
565
- h(VxeUIButtonComponent, {
566
- props: {
567
- content: customOpts.resetButtonText || getI18n('vxe.custom.cstmRestore')
568
- },
569
- on: {
570
- click: _vm.resetCustomEvent
571
- }
572
- }),
573
- h(VxeUIButtonComponent, {
574
- props: {
575
- content: customOpts.resetButtonText || getI18n('vxe.custom.cstmCancel')
576
- },
577
- on: {
578
- click: _vm.cancelCustomEvent
579
- }
580
- }),
581
- h(VxeUIButtonComponent, {
582
- props: {
583
- status: 'primary',
584
- content: customOpts.confirmButtonText || getI18n('vxe.custom.cstmConfirm')
585
- },
586
- on: {
587
- click: _vm.confirmCustomEvent
588
- }
589
- })
590
- ]);
497
+ ]),
498
+ h('thead', {}, [
499
+ h('tr', {}, [
500
+ allowVisible
501
+ ? h('th', {}, [
502
+ h('div', {
503
+ class: ['vxe-table-custom--checkbox-option', {
504
+ 'is--checked': isAllChecked,
505
+ 'is--indeterminate': isAllIndeterminate
506
+ }],
507
+ attrs: {
508
+ title: getI18n('vxe.table.allTitle')
509
+ },
510
+ on: {
511
+ click: _vm.allOptionEvent
512
+ }
513
+ }, [
514
+ h('span', {
515
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
516
+ }),
517
+ h('span', {
518
+ class: 'vxe-checkbox--label'
519
+ }, getI18n('vxe.toolbar.customAll'))
520
+ ])
521
+ ])
522
+ : _e(),
523
+ allowSort
524
+ ? h('th', {}, [
525
+ h('span', {
526
+ class: 'vxe-table-custom-popup--table-sort-help-title'
527
+ }, getI18n('vxe.custom.setting.colSort')),
528
+ VxeUITooltipComponent
529
+ ? h(VxeUITooltipComponent, {
530
+ props: {
531
+ enterable: true,
532
+ content: getI18n('vxe.custom.setting.sortHelpTip'),
533
+ popupClassName: 'vxe-table--ignore-clear'
534
+ },
535
+ scopedSlots: {
536
+ default: () => {
537
+ return h('i', {
538
+ class: 'vxe-table-custom-popup--table-sort-help-icon vxe-icon-question-circle-fill'
539
+ });
540
+ }
541
+ }
542
+ })
543
+ : renderEmptyElement($xeTableCustomPanel)
544
+ ])
545
+ : _e(),
546
+ h('th', {}, getI18n('vxe.custom.setting.colTitle')),
547
+ allowResizable
548
+ ? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
549
+ : _e(),
550
+ allowFixed
551
+ ? h('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
552
+ : _e()
553
+ ])
554
+ ]),
555
+ h('transition-group', {
556
+ class: 'vxe-table-custom--body',
557
+ props: {
558
+ tag: 'tbody',
559
+ name: 'vxe-table-custom--list'
560
+ }
561
+ }, trVNs)
562
+ ])
563
+ ]),
564
+ h('div', {
565
+ ref: 'dragHintElemRef',
566
+ class: 'vxe-table-custom-popup--drag-hint'
567
+ }, getI18n('vxe.custom.cstmDragTarget', [_vm.dragColumn ? _vm.dragColumn.getTitle() : '']))
568
+ ]);
569
+ },
570
+ footer: () => {
571
+ return h('div', {
572
+ class: 'vxe-table-custom-popup--footer'
573
+ }, [
574
+ h(VxeUIButtonComponent, {
575
+ props: {
576
+ content: customOpts.resetButtonText || getI18n('vxe.custom.cstmRestore')
577
+ },
578
+ on: {
579
+ click: _vm.resetCustomEvent
580
+ }
581
+ }),
582
+ h(VxeUIButtonComponent, {
583
+ props: {
584
+ content: customOpts.resetButtonText || getI18n('vxe.custom.cstmCancel')
585
+ },
586
+ on: {
587
+ click: _vm.cancelCustomEvent
588
+ }
589
+ }),
590
+ h(VxeUIButtonComponent, {
591
+ props: {
592
+ status: 'primary',
593
+ content: customOpts.confirmButtonText || getI18n('vxe.custom.cstmConfirm')
594
+ },
595
+ on: {
596
+ click: _vm.confirmCustomEvent
597
+ }
598
+ })
599
+ ]);
600
+ }
591
601
  }
592
- }
593
- });
602
+ })
603
+ : renderEmptyElement($xeTableCustomPanel);
594
604
  };
595
605
  export default {
596
606
  name: 'VxeTableCustomPanel',
@@ -33,7 +33,7 @@ function insertTreeRow(_vm, newRecords, isAppend) {
33
33
  fullAllDataRowIdData[rowid] = rest;
34
34
  }
35
35
  else {
36
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
36
+ if (process.env.NODE_ENV === 'development') {
37
37
  if (parentRowId) {
38
38
  warnLog('vxe.error.unableInsert');
39
39
  }
@@ -100,7 +100,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
100
100
  const parentLevel = parentRest ? parentRest.level : 0;
101
101
  newRecords.forEach((item, i) => {
102
102
  const rowid = getRowid(_vm, item);
103
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
103
+ if (process.env.NODE_ENV === 'development') {
104
104
  if (item[treeOpts.parentField]) {
105
105
  if (parentRow && item[treeOpts.parentField] !== parentRow[rowField]) {
106
106
  errLog('vxe.error.errProp', [`${treeOpts.parentField}=${item[treeOpts.parentField]}`, `${treeOpts.parentField}=${parentRow[rowField]}`]);
@@ -133,7 +133,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
133
133
  }
134
134
  }
135
135
  else {
136
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
136
+ if (process.env.NODE_ENV === 'development') {
137
137
  warnLog('vxe.error.unableInsert');
138
138
  }
139
139
  insertTreeRow(_vm, newRecords, true);
@@ -478,24 +478,10 @@ export default {
478
478
  }
479
479
  });
480
480
  }
481
- this.emitEvent(type, {
482
- row,
483
- rowIndex: this.getRowIndex(row),
484
- $rowIndex: this.getVMRowIndex(row),
485
- column,
486
- columnIndex: this.getColumnIndex(column),
487
- $columnIndex: this.getVMColumnIndex(column)
488
- }, evnt);
481
+ this.emitEvent(type, params, evnt);
489
482
  // v4已废弃
490
483
  if (type === 'edit-activated') {
491
- this.emitEvent('edit-actived', {
492
- row,
493
- rowIndex: this.getRowIndex(row),
494
- $rowIndex: this.getVMRowIndex(row),
495
- column,
496
- columnIndex: this.getColumnIndex(column),
497
- $columnIndex: this.getVMColumnIndex(column)
498
- }, evnt);
484
+ this.emitEvent('edit-actived', params, evnt);
499
485
  }
500
486
  }
501
487
  else {
@@ -561,7 +547,7 @@ export default {
561
547
  }
562
548
  },
563
549
  _clearActived(evnt) {
564
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
550
+ if (process.env.NODE_ENV === 'development') {
565
551
  warnLog('vxe.error.delFunc', ['clearActived', 'clearEdit']);
566
552
  }
567
553
  // 即将废弃
@@ -599,7 +585,7 @@ export default {
599
585
  return this.$nextTick();
600
586
  },
601
587
  _getActiveRecord() {
602
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
588
+ if (process.env.NODE_ENV === 'development') {
603
589
  warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditRecord']);
604
590
  }
605
591
  // 即将废弃
@@ -615,7 +601,7 @@ export default {
615
601
  return null;
616
602
  },
617
603
  _isActiveByRow(row) {
618
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
604
+ if (process.env.NODE_ENV === 'development') {
619
605
  warnLog('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow']);
620
606
  }
621
607
  // 即将废弃
@@ -632,6 +618,7 @@ export default {
632
618
  * 处理聚焦
633
619
  */
634
620
  handleFocus(params) {
621
+ const { editOpts } = this;
635
622
  const { row, column, cell } = params;
636
623
  const { editRender } = column;
637
624
  if (isEnableConf(editRender)) {
@@ -639,20 +626,23 @@ export default {
639
626
  let autoFocus = editRender.autofocus || editRender.autoFocus;
640
627
  let autoSelect = editRender.autoSelect || editRender.autoselect;
641
628
  let inputElem;
642
- if (!autoFocus && compRender) {
643
- autoFocus = compRender.tableAutoFocus || compRender.tableAutofocus || compRender.autoFocus || compRender.autofocus;
644
- }
645
- if (!autoSelect && compRender) {
646
- autoSelect = compRender.tableAutoSelect || compRender.autoSelect || compRender.autoselect;
647
- }
648
- // 如果指定了聚焦 class
649
- if (XEUtils.isFunction(autoFocus)) {
650
- inputElem = autoFocus.call(this, params);
651
- }
652
- else if (autoFocus) {
653
- inputElem = cell.querySelector(autoFocus);
654
- if (inputElem) {
655
- inputElem.focus();
629
+ // 是否启用聚焦
630
+ if (editOpts.autoFocus) {
631
+ if (!autoFocus && compRender) {
632
+ autoFocus = compRender.tableAutoFocus || compRender.tableAutofocus || compRender.autoFocus || compRender.autofocus;
633
+ }
634
+ if (!autoSelect && compRender) {
635
+ autoSelect = compRender.tableAutoSelect || compRender.autoSelect || compRender.autoselect;
636
+ }
637
+ // 如果指定了聚焦 class
638
+ if (XEUtils.isFunction(autoFocus)) {
639
+ inputElem = autoFocus.call(this, params);
640
+ }
641
+ else if (autoFocus) {
642
+ inputElem = cell.querySelector(autoFocus);
643
+ if (inputElem) {
644
+ inputElem.focus();
645
+ }
656
646
  }
657
647
  }
658
648
  if (inputElem) {
@@ -669,13 +659,18 @@ export default {
669
659
  }
670
660
  }
671
661
  else {
672
- // 显示到可视区中
673
- this.scrollToRow(row, column);
662
+ // 是否自动定位
663
+ if (editOpts.autoPos) {
664
+ if (!column.fixed) {
665
+ // 显示到可视区中
666
+ this.scrollToRow(row, column);
667
+ }
668
+ }
674
669
  }
675
670
  }
676
671
  },
677
672
  _setActiveRow(row) {
678
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
673
+ if (process.env.NODE_ENV === 'development') {
679
674
  warnLog('vxe.error.delFunc', ['setActiveRow', 'setEditRow']);
680
675
  }
681
676
  // 即将废弃
@@ -692,7 +687,7 @@ export default {
692
687
  return this.setEditCell(row, column);
693
688
  },
694
689
  _setActiveCell(row, fieldOrColumn) {
695
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
690
+ if (process.env.NODE_ENV === 'development') {
696
691
  warnLog('vxe.error.delFunc', ['setActiveCell', 'setEditCell']);
697
692
  }
698
693
  // 即将废弃
@@ -1,9 +1,13 @@
1
1
  import { VxeUI } from '../../../ui';
2
2
  import XEUtils from 'xe-utils';
3
3
  import { formatText } from '../../../ui/src/utils';
4
- const { getI18n, getIcon } = VxeUI;
4
+ import { errLog } from '../../../ui/src/log';
5
+ const { getI18n, getIcon, globalMixins } = VxeUI;
5
6
  export default {
6
7
  name: 'VxeTableExportPanel',
8
+ mixins: [
9
+ globalMixins.sizeMixin
10
+ ],
7
11
  props: {
8
12
  defaultOptions: Object,
9
13
  storeData: Object
@@ -23,9 +27,6 @@ export default {
23
27
  };
24
28
  },
25
29
  computed: {
26
- vSize() {
27
- return this.size || this.$parent.size || this.$parent.vSize;
28
- },
29
30
  checkedAll() {
30
31
  return this.storeData.columns.every((column) => column.checked);
31
32
  },
@@ -41,6 +42,33 @@ export default {
41
42
  return !defaultOptions.original && ['xlsx'].indexOf(defaultOptions.type) > -1;
42
43
  }
43
44
  },
45
+ created() {
46
+ const $xeTableExportPanel = this;
47
+ if (process.env.NODE_ENV === 'development') {
48
+ const VxeUIModalComponent = VxeUI.getComponent('VxeModal');
49
+ const VxeUIButtonComponent = VxeUI.getComponent('VxeButton');
50
+ const VxeUISelectComponent = VxeUI.getComponent('VxeSelect');
51
+ const VxeUIInputComponent = VxeUI.getComponent('VxeInput');
52
+ const VxeUICheckboxComponent = VxeUI.getComponent('VxeCheckbox');
53
+ $xeTableExportPanel.$nextTick(() => {
54
+ if (!VxeUIModalComponent) {
55
+ errLog('vxe.error.reqComp', ['vxe-modal']);
56
+ }
57
+ if (!VxeUIButtonComponent) {
58
+ errLog('vxe.error.reqComp', ['vxe-button']);
59
+ }
60
+ if (!VxeUISelectComponent) {
61
+ errLog('vxe.error.reqComp', ['vxe-select']);
62
+ }
63
+ if (!VxeUIInputComponent) {
64
+ errLog('vxe.error.reqComp', ['vxe-input']);
65
+ }
66
+ if (!VxeUICheckboxComponent) {
67
+ errLog('vxe.error.reqComp', ['vxe-checkbox']);
68
+ }
69
+ });
70
+ }
71
+ },
44
72
  render(h) {
45
73
  const { _e, checkedAll, isAll: isAllChecked, isIndeterminate: isAllIndeterminate, showSheet, supportMerge, supportStyle, defaultOptions, storeData } = this;
46
74
  const { hasTree, hasMerge, isPrint, hasColgroup } = storeData;