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
@@ -1,18 +1,41 @@
1
- import { VueConstructor } from 'vue'
1
+ import Vue, { VueConstructor } from 'vue'
2
2
  import { VxeUI } from '../ui'
3
3
  import VxeTableComponent from './src/table'
4
4
  import './render'
5
5
 
6
+ let isReg = false
7
+
6
8
  export const VxeTable = Object.assign({}, VxeTableComponent, {
7
9
  install (app: VueConstructor) {
10
+ if (typeof window !== 'undefined' && (window as any).VXETableMixin) {
11
+ VxeTableComponent.mixins.push((window as any).VXETableMixin)
12
+ delete (window as any).VXETableMixin
13
+ }
14
+ // 兼容老版本
15
+ if (typeof window !== 'undefined' && (window as any).VxeTableExtendCellArea && (window as any).VxeTableExtendCellArea.init) {
16
+ (window as any).VxeTableExtendCellArea.init(VxeUI)
17
+ delete (window as any).VxeTableExtendCellArea
18
+ delete (window as any).VXETablePro
19
+ } else if (typeof window !== 'undefined' && (window as any).VXETablePro && (window as any).VXETablePro.init) {
20
+ (window as any).VXETablePro.init(VxeUI)
21
+ delete (window as any).VXETablePro
22
+ }
23
+ if (!Vue.prototype.$vxe) {
24
+ Vue.prototype.$vxe = { t: VxeUI.t, _t: VxeUI._t }
25
+ } else {
26
+ Vue.prototype.$vxe.t = VxeUI.t
27
+ Vue.prototype.$vxe._t = VxeUI._t
28
+ }
29
+ if (!isReg) {
30
+ isReg = true
31
+ if (VxeUI.dynamicApp) {
32
+ VxeUI.dynamicApp.component(VxeTableComponent.name as string, VxeTableComponent)
33
+ }
34
+ }
8
35
  app.component(VxeTableComponent.name as string, VxeTableComponent)
9
36
  }
10
37
  })
11
38
 
12
- if (VxeUI.dynamicApp) {
13
- VxeUI.dynamicApp.component(VxeTableComponent.name as string, VxeTableComponent)
14
- }
15
-
16
39
  VxeUI.component(VxeTableComponent)
17
40
 
18
41
  export const Table = VxeTable
@@ -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)
@@ -551,7 +551,7 @@ export default {
551
551
  }
552
552
  },
553
553
  _clearActived (evnt: any) {
554
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
554
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
555
555
  warnLog('vxe.error.delFunc', ['clearActived', 'clearEdit'])
556
556
  }
557
557
  // 即将废弃
@@ -589,7 +589,7 @@ export default {
589
589
  return this.$nextTick()
590
590
  },
591
591
  _getActiveRecord () {
592
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
592
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
593
593
  warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditRecord'])
594
594
  }
595
595
  // 即将废弃
@@ -605,7 +605,7 @@ export default {
605
605
  return null
606
606
  },
607
607
  _isActiveByRow (row: any) {
608
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
608
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
609
609
  warnLog('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow'])
610
610
  }
611
611
  // 即将废弃
@@ -622,6 +622,7 @@ export default {
622
622
  * 处理聚焦
623
623
  */
624
624
  handleFocus (params: any) {
625
+ const { editOpts } = this
625
626
  const { row, column, cell } = params
626
627
  const { editRender } = column
627
628
  if (isEnableConf(editRender)) {
@@ -629,19 +630,22 @@ export default {
629
630
  let autoFocus = editRender.autofocus || editRender.autoFocus
630
631
  let autoSelect = editRender.autoSelect || editRender.autoselect
631
632
  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()
633
+ // 是否启用聚焦
634
+ if (editOpts.autoFocus) {
635
+ if (!autoFocus && compRender) {
636
+ autoFocus = compRender.tableAutoFocus || compRender.tableAutofocus || (compRender as any).autoFocus || compRender.autofocus
637
+ }
638
+ if (!autoSelect && compRender) {
639
+ autoSelect = compRender.tableAutoSelect || (compRender as any).autoSelect || compRender.autoselect
640
+ }
641
+ // 如果指定了聚焦 class
642
+ if (XEUtils.isFunction(autoFocus)) {
643
+ inputElem = autoFocus.call(this, params)
644
+ } else if (autoFocus) {
645
+ inputElem = cell.querySelector(autoFocus)
646
+ if (inputElem) {
647
+ inputElem.focus()
648
+ }
645
649
  }
646
650
  }
647
651
  if (inputElem) {
@@ -656,13 +660,18 @@ export default {
656
660
  }
657
661
  }
658
662
  } else {
659
- // 显示到可视区中
660
- this.scrollToRow(row, column)
663
+ // 是否自动定位
664
+ if (editOpts.autoPos) {
665
+ if (!column.fixed) {
666
+ // 显示到可视区中
667
+ this.scrollToRow(row, column)
668
+ }
669
+ }
661
670
  }
662
671
  }
663
672
  },
664
673
  _setActiveRow (row: any) {
665
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
674
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
666
675
  warnLog('vxe.error.delFunc', ['setActiveRow', 'setEditRow'])
667
676
  }
668
677
  // 即将废弃
@@ -679,7 +688,7 @@ export default {
679
688
  return this.setEditCell(row, column)
680
689
  },
681
690
  _setActiveCell (row: any, fieldOrColumn: any) {
682
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
691
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
683
692
  warnLog('vxe.error.delFunc', ['setActiveCell', 'setEditCell'])
684
693
  }
685
694
  // 即将废弃
@@ -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