vxe-table 3.9.0-rc.2 → 3.9.0-rc.21

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 (186) hide show
  1. package/es/grid/src/grid.js +120 -66
  2. package/es/locale/lang/en-US.js +2 -8
  3. package/es/locale/lang/es-ES.js +2 -1
  4. package/es/locale/lang/hu-HU.d.ts +2 -0
  5. package/es/locale/lang/hu-HU.js +497 -501
  6. package/es/locale/lang/ja-JP.js +2 -8
  7. package/es/locale/lang/ko-KR.d.ts +2 -0
  8. package/es/locale/lang/ko-KR.js +2 -8
  9. package/es/locale/lang/pt-BR.js +2 -8
  10. package/es/locale/lang/ru-RU.d.ts +2 -0
  11. package/es/locale/lang/ru-RU.js +497 -503
  12. package/es/locale/lang/uk-UA.d.ts +2 -0
  13. package/es/locale/lang/uk-UA.js +667 -0
  14. package/es/locale/lang/vi-VN.js +2 -8
  15. package/es/locale/lang/zh-CHT.d.ts +2 -0
  16. package/es/locale/lang/zh-CHT.js +667 -0
  17. package/es/locale/lang/zh-CN.js +2 -8
  18. package/es/locale/lang/zh-HK.js +2 -2
  19. package/es/locale/lang/zh-MO.js +2 -2
  20. package/es/locale/lang/zh-TC.js +2 -673
  21. package/es/locale/lang/zh-TW.js +2 -2
  22. package/es/style.css +1 -1
  23. package/es/style.min.css +1 -1
  24. package/es/table/index.js +29 -3
  25. package/es/table/module/custom/panel.js +183 -173
  26. package/es/table/module/edit/mixin.js +33 -24
  27. package/es/table/module/export/export-panel.js +32 -4
  28. package/es/table/module/export/import-panel.js +24 -5
  29. package/es/table/module/export/mixin.js +11 -11
  30. package/es/table/module/menu/mixin.js +2 -2
  31. package/es/table/module/validator/mixin.js +4 -4
  32. package/es/table/render/index.js +23 -38
  33. package/es/table/src/body.js +1 -0
  34. package/es/table/src/columnInfo.js +3 -3
  35. package/es/table/src/methods.js +48 -40
  36. package/es/table/src/props.js +65 -15
  37. package/es/table/src/table.js +161 -55
  38. package/es/table/src/util.js +3 -2
  39. package/es/table/style.css +37 -23
  40. package/es/table/style.min.css +1 -1
  41. package/es/toolbar/src/toolbar.js +21 -7
  42. package/es/ui/index.js +5 -4
  43. package/es/ui/src/log.js +1 -1
  44. package/es/ui/src/vn.js +24 -1
  45. package/es/vxe-table/style.css +37 -23
  46. package/es/vxe-table/style.min.css +1 -1
  47. package/lib/grid/src/grid.js +115 -68
  48. package/lib/grid/src/grid.min.js +1 -1
  49. package/lib/index.umd.js +632 -330
  50. package/lib/index.umd.min.js +1 -1
  51. package/lib/locale/lang/en-US.js +2 -8
  52. package/lib/locale/lang/en-US.min.js +1 -1
  53. package/lib/locale/lang/en-US.umd.js +2 -8
  54. package/lib/locale/lang/es-ES.js +2 -1
  55. package/lib/locale/lang/es-ES.min.js +1 -1
  56. package/lib/locale/lang/es-ES.umd.js +2 -1
  57. package/lib/locale/lang/hu-HU.d.ts +2 -0
  58. package/lib/locale/lang/hu-HU.js +497 -501
  59. package/lib/locale/lang/hu-HU.min.js +1 -1
  60. package/lib/locale/lang/hu-HU.umd.js +687 -0
  61. package/lib/locale/lang/ja-JP.js +2 -8
  62. package/lib/locale/lang/ja-JP.min.js +1 -1
  63. package/lib/locale/lang/ja-JP.umd.js +2 -8
  64. package/lib/locale/lang/ko-KR.d.ts +2 -0
  65. package/lib/locale/lang/ko-KR.js +2 -8
  66. package/lib/locale/lang/ko-KR.min.js +1 -1
  67. package/lib/locale/lang/ko-KR.umd.js +687 -0
  68. package/lib/locale/lang/pt-BR.js +2 -8
  69. package/lib/locale/lang/pt-BR.min.js +1 -1
  70. package/lib/locale/lang/pt-BR.umd.js +2 -8
  71. package/lib/locale/lang/ru-RU.d.ts +2 -0
  72. package/lib/locale/lang/ru-RU.js +497 -503
  73. package/lib/locale/lang/ru-RU.min.js +1 -1
  74. package/lib/locale/lang/ru-RU.umd.js +687 -0
  75. package/lib/locale/lang/uk-UA.d.ts +2 -0
  76. package/lib/locale/lang/uk-UA.js +673 -0
  77. package/lib/locale/lang/uk-UA.min.js +1 -0
  78. package/lib/locale/lang/uk-UA.umd.js +687 -0
  79. package/lib/locale/lang/vi-VN.js +2 -8
  80. package/lib/locale/lang/vi-VN.min.js +1 -1
  81. package/lib/locale/lang/zh-CHT.d.ts +2 -0
  82. package/lib/locale/lang/zh-CHT.js +673 -0
  83. package/lib/locale/lang/zh-CHT.min.js +1 -0
  84. package/lib/locale/lang/zh-CHT.umd.js +687 -0
  85. package/lib/locale/lang/zh-CN.js +2 -8
  86. package/lib/locale/lang/zh-CN.min.js +1 -1
  87. package/lib/locale/lang/zh-CN.umd.js +2 -8
  88. package/lib/locale/lang/zh-HK.js +2 -2
  89. package/lib/locale/lang/zh-HK.min.js +1 -1
  90. package/lib/locale/lang/zh-HK.umd.js +7 -677
  91. package/lib/locale/lang/zh-MO.js +2 -2
  92. package/lib/locale/lang/zh-MO.min.js +1 -1
  93. package/lib/locale/lang/zh-MO.umd.js +7 -677
  94. package/lib/locale/lang/zh-TC.js +3 -673
  95. package/lib/locale/lang/zh-TC.min.js +1 -1
  96. package/lib/locale/lang/zh-TC.umd.js +7 -677
  97. package/lib/locale/lang/zh-TW.js +2 -2
  98. package/lib/locale/lang/zh-TW.min.js +1 -1
  99. package/lib/locale/lang/zh-TW.umd.js +7 -677
  100. package/lib/style.css +1 -1
  101. package/lib/style.min.css +1 -1
  102. package/lib/table/index.js +30 -3
  103. package/lib/table/index.min.js +1 -1
  104. package/lib/table/module/custom/panel.js +12 -7
  105. package/lib/table/module/custom/panel.min.js +1 -1
  106. package/lib/table/module/edit/mixin.js +32 -23
  107. package/lib/table/module/edit/mixin.min.js +1 -1
  108. package/lib/table/module/export/export-panel.js +31 -4
  109. package/lib/table/module/export/export-panel.min.js +1 -1
  110. package/lib/table/module/export/import-panel.js +23 -5
  111. package/lib/table/module/export/import-panel.min.js +1 -1
  112. package/lib/table/module/export/mixin.js +11 -11
  113. package/lib/table/module/export/mixin.min.js +1 -1
  114. package/lib/table/module/menu/mixin.js +2 -2
  115. package/lib/table/module/menu/mixin.min.js +1 -1
  116. package/lib/table/module/validator/mixin.js +4 -4
  117. package/lib/table/module/validator/mixin.min.js +1 -1
  118. package/lib/table/render/index.js +27 -41
  119. package/lib/table/render/index.min.js +1 -1
  120. package/lib/table/src/body.js +1 -1
  121. package/lib/table/src/body.min.js +1 -1
  122. package/lib/table/src/columnInfo.js +3 -3
  123. package/lib/table/src/columnInfo.min.js +1 -1
  124. package/lib/table/src/methods.js +47 -40
  125. package/lib/table/src/methods.min.js +1 -1
  126. package/lib/table/src/props.js +7 -0
  127. package/lib/table/src/props.min.js +1 -1
  128. package/lib/table/src/table.js +147 -48
  129. package/lib/table/src/table.min.js +1 -1
  130. package/lib/table/src/util.js +3 -2
  131. package/lib/table/src/util.min.js +1 -1
  132. package/lib/table/style/style.css +37 -23
  133. package/lib/table/style/style.min.css +1 -1
  134. package/lib/toolbar/src/toolbar.js +21 -7
  135. package/lib/toolbar/src/toolbar.min.js +1 -1
  136. package/lib/ui/index.js +6 -5
  137. package/lib/ui/index.min.js +1 -1
  138. package/lib/ui/src/log.js +1 -1
  139. package/lib/ui/src/log.min.js +1 -1
  140. package/lib/ui/src/vn.js +26 -1
  141. package/lib/ui/src/vn.min.js +1 -1
  142. package/lib/vxe-table/style/style.css +37 -23
  143. package/lib/vxe-table/style/style.min.css +1 -1
  144. package/package.json +2 -2
  145. package/packages/grid/src/grid.ts +127 -65
  146. package/packages/locale/lang/en-US.ts +2 -10
  147. package/packages/locale/lang/es-ES.ts +2 -1
  148. package/packages/locale/lang/hu-HU.ts +497 -503
  149. package/packages/locale/lang/ja-JP.ts +2 -10
  150. package/packages/locale/lang/ko-KR.ts +2 -10
  151. package/packages/locale/lang/pt-BR.ts +2 -10
  152. package/packages/locale/lang/ru-RU.ts +497 -505
  153. package/packages/locale/lang/uk-UA.ts +667 -0
  154. package/packages/locale/lang/vi-VN.ts +2 -10
  155. package/packages/locale/lang/zh-CHT.ts +667 -0
  156. package/packages/locale/lang/zh-CN.ts +2 -10
  157. package/packages/locale/lang/zh-HK.ts +2 -2
  158. package/packages/locale/lang/zh-MO.ts +2 -2
  159. package/packages/locale/lang/zh-TC.ts +2 -674
  160. package/packages/locale/lang/zh-TW.ts +2 -2
  161. package/packages/table/index.ts +28 -5
  162. package/packages/table/module/custom/panel.ts +186 -175
  163. package/packages/table/module/edit/mixin.ts +32 -23
  164. package/packages/table/module/export/export-panel.ts +36 -4
  165. package/packages/table/module/export/import-panel.ts +28 -5
  166. package/packages/table/module/export/mixin.ts +11 -11
  167. package/packages/table/module/menu/mixin.ts +2 -2
  168. package/packages/table/module/validator/mixin.ts +4 -4
  169. package/packages/table/render/index.ts +26 -40
  170. package/packages/table/src/body.ts +1 -0
  171. package/packages/table/src/columnInfo.ts +3 -3
  172. package/packages/table/src/methods.ts +47 -40
  173. package/packages/table/src/props.ts +68 -15
  174. package/packages/table/src/table.ts +167 -56
  175. package/packages/table/src/util.ts +3 -2
  176. package/packages/toolbar/src/toolbar.ts +21 -7
  177. package/packages/ui/index.ts +3 -2
  178. package/packages/ui/src/vn.ts +26 -1
  179. package/styles/components/table.scss +82 -17
  180. package/types/all.d.ts +2 -2
  181. /package/es/{iconfont.1726028471123.ttf → iconfont.1727868548661.ttf} +0 -0
  182. /package/es/{iconfont.1726028471123.woff → iconfont.1727868548661.woff} +0 -0
  183. /package/es/{iconfont.1726028471123.woff2 → iconfont.1727868548661.woff2} +0 -0
  184. /package/lib/{iconfont.1726028471123.ttf → iconfont.1727868548661.ttf} +0 -0
  185. /package/lib/{iconfont.1726028471123.woff → iconfont.1727868548661.woff} +0 -0
  186. /package/lib/{iconfont.1726028471123.woff2 → iconfont.1727868548661.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);
@@ -561,7 +561,7 @@ export default {
561
561
  }
562
562
  },
563
563
  _clearActived(evnt) {
564
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
564
+ if (process.env.NODE_ENV === 'development') {
565
565
  warnLog('vxe.error.delFunc', ['clearActived', 'clearEdit']);
566
566
  }
567
567
  // 即将废弃
@@ -599,7 +599,7 @@ export default {
599
599
  return this.$nextTick();
600
600
  },
601
601
  _getActiveRecord() {
602
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
602
+ if (process.env.NODE_ENV === 'development') {
603
603
  warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditRecord']);
604
604
  }
605
605
  // 即将废弃
@@ -615,7 +615,7 @@ export default {
615
615
  return null;
616
616
  },
617
617
  _isActiveByRow(row) {
618
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
618
+ if (process.env.NODE_ENV === 'development') {
619
619
  warnLog('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow']);
620
620
  }
621
621
  // 即将废弃
@@ -632,6 +632,7 @@ export default {
632
632
  * 处理聚焦
633
633
  */
634
634
  handleFocus(params) {
635
+ const { editOpts } = this;
635
636
  const { row, column, cell } = params;
636
637
  const { editRender } = column;
637
638
  if (isEnableConf(editRender)) {
@@ -639,20 +640,23 @@ export default {
639
640
  let autoFocus = editRender.autofocus || editRender.autoFocus;
640
641
  let autoSelect = editRender.autoSelect || editRender.autoselect;
641
642
  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();
643
+ // 是否启用聚焦
644
+ if (editOpts.autoFocus) {
645
+ if (!autoFocus && compRender) {
646
+ autoFocus = compRender.tableAutoFocus || compRender.tableAutofocus || compRender.autoFocus || compRender.autofocus;
647
+ }
648
+ if (!autoSelect && compRender) {
649
+ autoSelect = compRender.tableAutoSelect || compRender.autoSelect || compRender.autoselect;
650
+ }
651
+ // 如果指定了聚焦 class
652
+ if (XEUtils.isFunction(autoFocus)) {
653
+ inputElem = autoFocus.call(this, params);
654
+ }
655
+ else if (autoFocus) {
656
+ inputElem = cell.querySelector(autoFocus);
657
+ if (inputElem) {
658
+ inputElem.focus();
659
+ }
656
660
  }
657
661
  }
658
662
  if (inputElem) {
@@ -669,13 +673,18 @@ export default {
669
673
  }
670
674
  }
671
675
  else {
672
- // 显示到可视区中
673
- this.scrollToRow(row, column);
676
+ // 是否自动定位
677
+ if (editOpts.autoPos) {
678
+ if (!column.fixed) {
679
+ // 显示到可视区中
680
+ this.scrollToRow(row, column);
681
+ }
682
+ }
674
683
  }
675
684
  }
676
685
  },
677
686
  _setActiveRow(row) {
678
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
687
+ if (process.env.NODE_ENV === 'development') {
679
688
  warnLog('vxe.error.delFunc', ['setActiveRow', 'setEditRow']);
680
689
  }
681
690
  // 即将废弃
@@ -692,7 +701,7 @@ export default {
692
701
  return this.setEditCell(row, column);
693
702
  },
694
703
  _setActiveCell(row, fieldOrColumn) {
695
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
704
+ if (process.env.NODE_ENV === 'development') {
696
705
  warnLog('vxe.error.delFunc', ['setActiveCell', 'setEditCell']);
697
706
  }
698
707
  // 即将废弃
@@ -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;
@@ -1,10 +1,13 @@
1
1
  import { VxeUI } from '../../../ui';
2
2
  import XEUtils from 'xe-utils';
3
3
  import { parseFile } from '../../../ui/src/utils';
4
- // import { errLog } from '../../../ui/src/log'
5
- const { getI18n, getIcon } = VxeUI;
4
+ import { errLog } from '../../../ui/src/log';
5
+ const { getI18n, getIcon, globalMixins } = VxeUI;
6
6
  export default {
7
7
  name: 'VxeTableImportPanel',
8
+ mixins: [
9
+ globalMixins.sizeMixin
10
+ ],
8
11
  props: {
9
12
  defaultOptions: Object,
10
13
  storeData: Object
@@ -19,9 +22,6 @@ export default {
19
22
  };
20
23
  },
21
24
  computed: {
22
- vSize() {
23
- return this.size || this.$parent.size || this.$parent.vSize;
24
- },
25
25
  selectName() {
26
26
  return `${this.storeData.filename}.${this.storeData.type}`;
27
27
  },
@@ -38,6 +38,25 @@ export default {
38
38
  return `*.${typeList.map((item) => item.value).join(', *.')}`;
39
39
  }
40
40
  },
41
+ created() {
42
+ const $xeTableImportPanel = this;
43
+ if (process.env.NODE_ENV === 'development') {
44
+ const VxeUIModalComponent = VxeUI.getComponent('VxeModal');
45
+ const VxeUIButtonComponent = VxeUI.getComponent('VxeButton');
46
+ const VxeUISelectComponent = VxeUI.getComponent('VxeSelect');
47
+ $xeTableImportPanel.$nextTick(() => {
48
+ if (!VxeUIModalComponent) {
49
+ errLog('vxe.error.reqComp', ['vxe-modal']);
50
+ }
51
+ if (!VxeUIButtonComponent) {
52
+ errLog('vxe.error.reqComp', ['vxe-button']);
53
+ }
54
+ if (!VxeUISelectComponent) {
55
+ errLog('vxe.error.reqComp', ['vxe-select']);
56
+ }
57
+ });
58
+ }
59
+ },
41
60
  render(h) {
42
61
  const { hasFile, parseTypeLabel, defaultOptions, storeData, selectName } = this;
43
62
  return h('vxe-modal', {