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
@@ -7,7 +7,7 @@ import XEUtils from 'xe-utils'
7
7
 
8
8
  import type { VxeModalComponent, VxeDrawerComponent, VxeButtonComponent, VxeRadioGroupComponent, VxeTooltipComponent, VxeInputComponent } from 'vxe-pc-ui'
9
9
 
10
- const { getI18n, getIcon } = VxeUI
10
+ const { getI18n, getIcon, renderEmptyElement } = VxeUI
11
11
 
12
12
  function updateDropHint (_vm: any, evnt: any) {
13
13
  const { $refs } = _vm
@@ -277,7 +277,11 @@ const renderSimplePanel = (h: CreateElement, _vm: any) => {
277
277
  }
278
278
 
279
279
  const renderPopupPanel = (h: CreateElement, _vm: any) => {
280
+ const VxeUIModalComponent = VxeUI.getComponent<VxeModalComponent>('VxeModal')
280
281
  const VxeUIButtonComponent = VxeUI.getComponent<VxeButtonComponent>('VxeButton')
282
+ const VxeUIInputComponent = VxeUI.getComponent<VxeInputComponent>('VxeInput')
283
+ const VxeUITooltipComponent = VxeUI.getComponent<VxeTooltipComponent>('VxeTooltip')
284
+ const $xeTableCustomPanel = _vm
281
285
 
282
286
  const { _e, $xetable, customStore } = _vm
283
287
  const { customOpts, customColumnList, columnOpts, isMaxFixedColumn } = $xetable
@@ -387,18 +391,21 @@ const renderPopupPanel = (h: CreateElement, _vm: any) => {
387
391
  }, [
388
392
  column.children && column.children.length
389
393
  ? h('span', '-')
390
- : h('vxe-input', {
391
- props: {
392
- type: 'integer',
393
- disabled: isHidden,
394
- value: column.renderResizeWidth
395
- },
396
- on: {
397
- modelValue (value: any) {
398
- column.renderResizeWidth = Math.max(0, Number(value))
399
- }
400
- }
401
- })
394
+ : (VxeUIInputComponent
395
+ ? h(VxeUIInputComponent, {
396
+ props: {
397
+ type: 'integer',
398
+ disabled: isHidden,
399
+ value: column.renderResizeWidth
400
+ },
401
+ on: {
402
+ modelValue (value: any) {
403
+ column.renderResizeWidth = Math.max(0, Number(value))
404
+ }
405
+ }
406
+ })
407
+ : renderEmptyElement($xeTableCustomPanel)
408
+ )
402
409
  ])
403
410
  : _e(),
404
411
  allowFixed
@@ -433,178 +440,182 @@ const renderPopupPanel = (h: CreateElement, _vm: any) => {
433
440
  })
434
441
  const isAllChecked = customStore.isAll
435
442
  const isAllIndeterminate = customStore.isIndeterminate
436
- return h('vxe-modal', {
437
- key: 'modal',
438
- props: {
439
- className: ['vxe-table-custom-popup-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
440
- value: customStore.visible,
441
- title: modalOpts.title || getI18n('vxe.custom.cstmTitle'),
442
- width: modalOpts.width || Math.min(880, document.documentElement.clientWidth),
443
- minWidth: modalOpts.minWidth || 700,
444
- height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
445
- minHeight: modalOpts.minHeight || 400,
446
- showZoom: !!modalOpts.showZoom,
447
- mask: !!modalOpts.mask,
448
- lockView: !!modalOpts.lockView,
449
- resize: !!modalOpts.resize,
450
- escClosable: !!modalOpts.escClosable,
451
- destroyOnClose: true,
452
- showFooter: true
453
- },
454
- on: {
455
- input (value: any) {
456
- customStore.visible = value
457
- }
458
- },
459
- scopedSlots: {
460
- default: () => {
461
- return h('div', {
462
- ref: 'bodyElemRef',
463
- class: 'vxe-table-custom-popup--body'
464
- }, [
465
- h('div', {
466
- class: 'vxe-table-custom-popup--table-wrapper'
443
+ return VxeUIModalComponent
444
+ ? h(VxeUIModalComponent, {
445
+ key: 'modal',
446
+ props: {
447
+ className: ['vxe-table-custom-popup-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
448
+ value: customStore.visible,
449
+ title: modalOpts.title || getI18n('vxe.custom.cstmTitle'),
450
+ width: modalOpts.width || Math.min(880, document.documentElement.clientWidth),
451
+ minWidth: modalOpts.minWidth || 700,
452
+ height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
453
+ minHeight: modalOpts.minHeight || 400,
454
+ showZoom: !!modalOpts.showZoom,
455
+ mask: !!modalOpts.mask,
456
+ lockView: !!modalOpts.lockView,
457
+ resize: !!modalOpts.resize,
458
+ escClosable: !!modalOpts.escClosable,
459
+ destroyOnClose: true,
460
+ showFooter: true
461
+ },
462
+ on: {
463
+ input (value: any) {
464
+ customStore.visible = value
465
+ }
466
+ },
467
+ scopedSlots: {
468
+ default: () => {
469
+ return h('div', {
470
+ ref: 'bodyElemRef',
471
+ class: 'vxe-table-custom-popup--body'
467
472
  }, [
468
- h('table', {}, [
469
- h('colgroup', {}, [
470
- allowVisible
471
- ? h('col', {
472
- style: {
473
- width: '80px'
474
- }
475
- })
476
- : _e(),
477
- allowSort
478
- ? h('col', {
479
- style: {
480
- width: '80px'
481
- }
482
- })
483
- : _e(),
484
- h('col', {
485
- style: {
486
- minWidth: '120px'
487
- }
488
- }),
489
- allowResizable
490
- ? h('col', {
491
- style: {
492
- width: '140px'
493
- }
494
- })
495
- : _e(),
496
- allowFixed
497
- ? h('col', {
498
- style: {
499
- width: '200px'
500
- }
501
- })
502
- : _e()
503
- ]),
504
- h('thead', {}, [
505
- h('tr', {}, [
473
+ h('div', {
474
+ class: 'vxe-table-custom-popup--table-wrapper'
475
+ }, [
476
+ h('table', {}, [
477
+ h('colgroup', {}, [
506
478
  allowVisible
507
- ? h('th', {}, [
508
- h('div', {
509
- class: ['vxe-table-custom--checkbox-option', {
510
- 'is--checked': isAllChecked,
511
- 'is--indeterminate': isAllIndeterminate
512
- }],
513
- attrs: {
514
- title: getI18n('vxe.table.allTitle')
515
- },
516
- on: {
517
- click: _vm.allOptionEvent
518
- }
519
-
520
- }, [
521
- h('span', {
522
- class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
523
- }),
524
- h('span', {
525
- class: 'vxe-checkbox--label'
526
- }, getI18n('vxe.toolbar.customAll'))
527
- ])
528
- ])
479
+ ? h('col', {
480
+ style: {
481
+ width: '80px'
482
+ }
483
+ })
529
484
  : _e(),
530
485
  allowSort
531
- ? h('th', {}, [
532
- h('span', {
533
- class: 'vxe-table-custom-popup--table-sort-help-title'
534
- }, getI18n('vxe.custom.setting.colSort')),
535
- h('vxe-tooltip', {
536
- props: {
537
- enterable: true,
538
- content: getI18n('vxe.custom.setting.sortHelpTip'),
539
- popupClassName: 'vxe-table--ignore-clear'
540
- },
541
- scopedSlots: {
542
- default: () => {
543
- return h('i', {
544
- class: 'vxe-table-custom-popup--table-sort-help-icon vxe-icon-question-circle-fill'
545
- })
546
- }
547
- }
548
- })
549
- ])
486
+ ? h('col', {
487
+ style: {
488
+ width: '80px'
489
+ }
490
+ })
550
491
  : _e(),
551
- h('th', {}, getI18n('vxe.custom.setting.colTitle')),
492
+ h('col', {
493
+ style: {
494
+ minWidth: '120px'
495
+ }
496
+ }),
552
497
  allowResizable
553
- ? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
498
+ ? h('col', {
499
+ style: {
500
+ width: '140px'
501
+ }
502
+ })
554
503
  : _e(),
555
504
  allowFixed
556
- ? h('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
505
+ ? h('col', {
506
+ style: {
507
+ width: '200px'
508
+ }
509
+ })
557
510
  : _e()
558
- ])
559
- ]),
560
- h('transition-group', {
561
- class: 'vxe-table-custom--body',
562
- props: {
563
- tag: 'tbody',
564
- name: 'vxe-table-custom--list'
565
- }
566
- }, trVNs)
567
- ])
568
- ]),
569
- h('div', {
570
- ref: 'dragHintElemRef',
571
- class: 'vxe-table-custom-popup--drag-hint'
572
- }, getI18n('vxe.custom.cstmDragTarget', [_vm.dragColumn ? _vm.dragColumn.getTitle() : '']))
573
- ])
574
- },
575
- footer: () => {
576
- return h('div', {
577
- class: 'vxe-table-custom-popup--footer'
578
- }, [
579
- h(VxeUIButtonComponent, {
580
- props: {
581
- content: customOpts.resetButtonText || getI18n('vxe.custom.cstmRestore')
582
- },
583
- on: {
584
- click: _vm.resetCustomEvent
585
- }
586
- }),
587
- h(VxeUIButtonComponent, {
588
- props: {
589
- content: customOpts.resetButtonText || getI18n('vxe.custom.cstmCancel')
590
- },
591
- on: {
592
- click: _vm.cancelCustomEvent
593
- }
594
- }),
595
- h(VxeUIButtonComponent, {
596
- props: {
597
- status: 'primary',
598
- content: customOpts.confirmButtonText || getI18n('vxe.custom.cstmConfirm')
599
- },
600
- on: {
601
- click: _vm.confirmCustomEvent
602
- }
603
- })
604
- ])
511
+ ]),
512
+ h('thead', {}, [
513
+ h('tr', {}, [
514
+ allowVisible
515
+ ? h('th', {}, [
516
+ h('div', {
517
+ class: ['vxe-table-custom--checkbox-option', {
518
+ 'is--checked': isAllChecked,
519
+ 'is--indeterminate': isAllIndeterminate
520
+ }],
521
+ attrs: {
522
+ title: getI18n('vxe.table.allTitle')
523
+ },
524
+ on: {
525
+ click: _vm.allOptionEvent
526
+ }
527
+
528
+ }, [
529
+ h('span', {
530
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
531
+ }),
532
+ h('span', {
533
+ class: 'vxe-checkbox--label'
534
+ }, getI18n('vxe.toolbar.customAll'))
535
+ ])
536
+ ])
537
+ : _e(),
538
+ allowSort
539
+ ? h('th', {}, [
540
+ h('span', {
541
+ class: 'vxe-table-custom-popup--table-sort-help-title'
542
+ }, getI18n('vxe.custom.setting.colSort')),
543
+ VxeUITooltipComponent
544
+ ? h(VxeUITooltipComponent, {
545
+ props: {
546
+ enterable: true,
547
+ content: getI18n('vxe.custom.setting.sortHelpTip'),
548
+ popupClassName: 'vxe-table--ignore-clear'
549
+ },
550
+ scopedSlots: {
551
+ default: () => {
552
+ return h('i', {
553
+ class: 'vxe-table-custom-popup--table-sort-help-icon vxe-icon-question-circle-fill'
554
+ })
555
+ }
556
+ }
557
+ })
558
+ : renderEmptyElement($xeTableCustomPanel)
559
+ ])
560
+ : _e(),
561
+ h('th', {}, getI18n('vxe.custom.setting.colTitle')),
562
+ allowResizable
563
+ ? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
564
+ : _e(),
565
+ allowFixed
566
+ ? h('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
567
+ : _e()
568
+ ])
569
+ ]),
570
+ h('transition-group', {
571
+ class: 'vxe-table-custom--body',
572
+ props: {
573
+ tag: 'tbody',
574
+ name: 'vxe-table-custom--list'
575
+ }
576
+ }, trVNs)
577
+ ])
578
+ ]),
579
+ h('div', {
580
+ ref: 'dragHintElemRef',
581
+ class: 'vxe-table-custom-popup--drag-hint'
582
+ }, getI18n('vxe.custom.cstmDragTarget', [_vm.dragColumn ? _vm.dragColumn.getTitle() : '']))
583
+ ])
584
+ },
585
+ footer: () => {
586
+ return h('div', {
587
+ class: 'vxe-table-custom-popup--footer'
588
+ }, [
589
+ h(VxeUIButtonComponent, {
590
+ props: {
591
+ content: customOpts.resetButtonText || getI18n('vxe.custom.cstmRestore')
592
+ },
593
+ on: {
594
+ click: _vm.resetCustomEvent
595
+ }
596
+ }),
597
+ h(VxeUIButtonComponent, {
598
+ props: {
599
+ content: customOpts.resetButtonText || getI18n('vxe.custom.cstmCancel')
600
+ },
601
+ on: {
602
+ click: _vm.cancelCustomEvent
603
+ }
604
+ }),
605
+ h(VxeUIButtonComponent, {
606
+ props: {
607
+ status: 'primary',
608
+ content: customOpts.confirmButtonText || getI18n('vxe.custom.cstmConfirm')
609
+ },
610
+ on: {
611
+ click: _vm.confirmCustomEvent
612
+ }
613
+ })
614
+ ])
615
+ }
605
616
  }
606
- }
607
- })
617
+ })
618
+ : renderEmptyElement($xeTableCustomPanel)
608
619
  }
609
620
 
610
621
  export default {
@@ -34,7 +34,7 @@ function insertTreeRow (_vm: any, newRecords: any[], isAppend: any) {
34
34
  fullDataRowIdData[rowid] = rest
35
35
  fullAllDataRowIdData[rowid] = rest
36
36
  } else {
37
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
37
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
38
38
  if (parentRowId) {
39
39
  warnLog('vxe.error.unableInsert')
40
40
  }
@@ -98,7 +98,7 @@ function handleInsertRowAt (_vm: any, records: any[], row: any, isInsertNextRow?
98
98
  const parentLevel = parentRest ? parentRest.level : 0
99
99
  newRecords.forEach((item: any, i: any) => {
100
100
  const rowid = getRowid(_vm, item)
101
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
101
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
102
102
  if (item[treeOpts.parentField]) {
103
103
  if (parentRow && item[treeOpts.parentField] !== parentRow[rowField]) {
104
104
  errLog('vxe.error.errProp', [`${treeOpts.parentField}=${item[treeOpts.parentField]}`, `${treeOpts.parentField}=${parentRow[rowField]}`])
@@ -131,7 +131,7 @@ function handleInsertRowAt (_vm: any, records: any[], row: any, isInsertNextRow?
131
131
  }
132
132
  }
133
133
  } else {
134
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
134
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
135
135
  warnLog('vxe.error.unableInsert')
136
136
  }
137
137
  insertTreeRow(_vm, newRecords, true)
@@ -469,25 +469,11 @@ export default {
469
469
  }
470
470
  })
471
471
  }
472
- this.emitEvent(type, {
473
- row,
474
- rowIndex: this.getRowIndex(row),
475
- $rowIndex: this.getVMRowIndex(row),
476
- column,
477
- columnIndex: this.getColumnIndex(column),
478
- $columnIndex: this.getVMColumnIndex(column)
479
- }, evnt)
472
+ this.emitEvent(type, params, evnt)
480
473
 
481
474
  // v4已废弃
482
475
  if (type === 'edit-activated') {
483
- this.emitEvent('edit-actived', {
484
- row,
485
- rowIndex: this.getRowIndex(row),
486
- $rowIndex: this.getVMRowIndex(row),
487
- column,
488
- columnIndex: this.getColumnIndex(column),
489
- $columnIndex: this.getVMColumnIndex(column)
490
- }, evnt)
476
+ this.emitEvent('edit-actived', params, evnt)
491
477
  }
492
478
  } else {
493
479
  const { column: oldColumn } = actived
@@ -551,7 +537,7 @@ export default {
551
537
  }
552
538
  },
553
539
  _clearActived (evnt: any) {
554
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
540
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
555
541
  warnLog('vxe.error.delFunc', ['clearActived', 'clearEdit'])
556
542
  }
557
543
  // 即将废弃
@@ -589,7 +575,7 @@ export default {
589
575
  return this.$nextTick()
590
576
  },
591
577
  _getActiveRecord () {
592
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
578
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
593
579
  warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditRecord'])
594
580
  }
595
581
  // 即将废弃
@@ -605,7 +591,7 @@ export default {
605
591
  return null
606
592
  },
607
593
  _isActiveByRow (row: any) {
608
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
594
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
609
595
  warnLog('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow'])
610
596
  }
611
597
  // 即将废弃
@@ -622,6 +608,7 @@ export default {
622
608
  * 处理聚焦
623
609
  */
624
610
  handleFocus (params: any) {
611
+ const { editOpts } = this
625
612
  const { row, column, cell } = params
626
613
  const { editRender } = column
627
614
  if (isEnableConf(editRender)) {
@@ -629,19 +616,22 @@ export default {
629
616
  let autoFocus = editRender.autofocus || editRender.autoFocus
630
617
  let autoSelect = editRender.autoSelect || editRender.autoselect
631
618
  let inputElem
632
- if (!autoFocus && compRender) {
633
- autoFocus = compRender.tableAutoFocus || compRender.tableAutofocus || (compRender as any).autoFocus || compRender.autofocus
634
- }
635
- if (!autoSelect && compRender) {
636
- autoSelect = compRender.tableAutoSelect || (compRender as any).autoSelect || compRender.autoselect
637
- }
638
- // 如果指定了聚焦 class
639
- if (XEUtils.isFunction(autoFocus)) {
640
- inputElem = autoFocus.call(this, params)
641
- } else if (autoFocus) {
642
- inputElem = cell.querySelector(autoFocus)
643
- if (inputElem) {
644
- inputElem.focus()
619
+ // 是否启用聚焦
620
+ if (editOpts.autoFocus) {
621
+ if (!autoFocus && compRender) {
622
+ autoFocus = compRender.tableAutoFocus || compRender.tableAutofocus || (compRender as any).autoFocus || compRender.autofocus
623
+ }
624
+ if (!autoSelect && compRender) {
625
+ autoSelect = compRender.tableAutoSelect || (compRender as any).autoSelect || compRender.autoselect
626
+ }
627
+ // 如果指定了聚焦 class
628
+ if (XEUtils.isFunction(autoFocus)) {
629
+ inputElem = autoFocus.call(this, params)
630
+ } else if (autoFocus) {
631
+ inputElem = cell.querySelector(autoFocus)
632
+ if (inputElem) {
633
+ inputElem.focus()
634
+ }
645
635
  }
646
636
  }
647
637
  if (inputElem) {
@@ -656,13 +646,18 @@ export default {
656
646
  }
657
647
  }
658
648
  } else {
659
- // 显示到可视区中
660
- this.scrollToRow(row, column)
649
+ // 是否自动定位
650
+ if (editOpts.autoPos) {
651
+ if (!column.fixed) {
652
+ // 显示到可视区中
653
+ this.scrollToRow(row, column)
654
+ }
655
+ }
661
656
  }
662
657
  }
663
658
  },
664
659
  _setActiveRow (row: any) {
665
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
660
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
666
661
  warnLog('vxe.error.delFunc', ['setActiveRow', 'setEditRow'])
667
662
  }
668
663
  // 即将废弃
@@ -679,7 +674,7 @@ export default {
679
674
  return this.setEditCell(row, column)
680
675
  },
681
676
  _setActiveCell (row: any, fieldOrColumn: any) {
682
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
677
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
683
678
  warnLog('vxe.error.delFunc', ['setActiveCell', 'setEditCell'])
684
679
  }
685
680
  // 即将废弃
@@ -2,11 +2,17 @@ import { CreateElement } from 'vue'
2
2
  import { VxeUI } from '../../../ui'
3
3
  import XEUtils from 'xe-utils'
4
4
  import { formatText } from '../../../ui/src/utils'
5
+ import { errLog } from '../../../ui/src/log'
5
6
 
6
- const { getI18n, getIcon } = VxeUI
7
+ import type { VxeModalComponent, VxeInputComponent, VxeCheckboxComponent, VxeSelectComponent, VxeButtonComponent } from 'vxe-pc-ui'
8
+
9
+ const { getI18n, getIcon, globalMixins } = VxeUI
7
10
 
8
11
  export default {
9
12
  name: 'VxeTableExportPanel',
13
+ mixins: [
14
+ globalMixins.sizeMixin
15
+ ],
10
16
  props: {
11
17
  defaultOptions: Object,
12
18
  storeData: Object
@@ -26,9 +32,6 @@ export default {
26
32
  }
27
33
  },
28
34
  computed: {
29
- vSize () {
30
- return this.size || this.$parent.size || this.$parent.vSize
31
- },
32
35
  checkedAll () {
33
36
  return this.storeData.columns.every((column: any) => column.checked)
34
37
  },
@@ -44,6 +47,35 @@ export default {
44
47
  return !defaultOptions.original && ['xlsx'].indexOf(defaultOptions.type) > -1
45
48
  }
46
49
  } as any,
50
+ created (this: any) {
51
+ const $xeTableExportPanel = this
52
+
53
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
54
+ const VxeUIModalComponent = VxeUI.getComponent<VxeModalComponent>('VxeModal')
55
+ const VxeUIButtonComponent = VxeUI.getComponent<VxeButtonComponent>('VxeButton')
56
+ const VxeUISelectComponent = VxeUI.getComponent<VxeSelectComponent>('VxeSelect')
57
+ const VxeUIInputComponent = VxeUI.getComponent<VxeInputComponent>('VxeInput')
58
+ const VxeUICheckboxComponent = VxeUI.getComponent<VxeCheckboxComponent>('VxeCheckbox')
59
+
60
+ $xeTableExportPanel.$nextTick(() => {
61
+ if (!VxeUIModalComponent) {
62
+ errLog('vxe.error.reqComp', ['vxe-modal'])
63
+ }
64
+ if (!VxeUIButtonComponent) {
65
+ errLog('vxe.error.reqComp', ['vxe-button'])
66
+ }
67
+ if (!VxeUISelectComponent) {
68
+ errLog('vxe.error.reqComp', ['vxe-select'])
69
+ }
70
+ if (!VxeUIInputComponent) {
71
+ errLog('vxe.error.reqComp', ['vxe-input'])
72
+ }
73
+ if (!VxeUICheckboxComponent) {
74
+ errLog('vxe.error.reqComp', ['vxe-checkbox'])
75
+ }
76
+ })
77
+ }
78
+ },
47
79
  render (this: any, h: CreateElement) {
48
80
  const { _e, checkedAll, isAll: isAllChecked, isIndeterminate: isAllIndeterminate, showSheet, supportMerge, supportStyle, defaultOptions, storeData } = this
49
81
  const { hasTree, hasMerge, isPrint, hasColgroup } = storeData