vxe-table 4.12.0-beta.0 → 4.12.0-beta.10

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 (170) hide show
  1. package/es/grid/src/grid.js +70 -76
  2. package/es/locale/lang/ar-EG.js +3 -0
  3. package/es/locale/lang/de-DE.js +3 -0
  4. package/es/locale/lang/en-US.js +3 -0
  5. package/es/locale/lang/es-ES.js +3 -0
  6. package/es/locale/lang/fr-FR.js +3 -0
  7. package/es/locale/lang/hu-HU.js +3 -0
  8. package/es/locale/lang/hy-AM.js +3 -0
  9. package/es/locale/lang/id-ID.js +3 -0
  10. package/es/locale/lang/it-IT.js +3 -0
  11. package/es/locale/lang/ja-JP.js +3 -0
  12. package/es/locale/lang/ko-KR.js +3 -0
  13. package/es/locale/lang/nb-NO.js +3 -0
  14. package/es/locale/lang/pt-BR.js +3 -0
  15. package/es/locale/lang/ru-RU.js +3 -0
  16. package/es/locale/lang/th-TH.js +3 -0
  17. package/es/locale/lang/ug-CN.js +3 -0
  18. package/es/locale/lang/uk-UA.js +3 -0
  19. package/es/locale/lang/vi-VN.js +3 -0
  20. package/es/locale/lang/zh-CHT.js +3 -0
  21. package/es/locale/lang/zh-CN.js +3 -0
  22. package/es/style.css +1 -1
  23. package/es/table/module/custom/panel.js +19 -21
  24. package/es/table/module/edit/hook.js +1 -1
  25. package/es/table/module/export/export-panel.js +17 -19
  26. package/es/table/module/export/hook.js +5 -11
  27. package/es/table/module/export/import-panel.js +11 -13
  28. package/es/table/module/keyboard/hook.js +49 -6
  29. package/es/table/module/validator/hook.js +1 -3
  30. package/es/table/render/index.js +90 -61
  31. package/es/table/src/body.js +13 -8
  32. package/es/table/src/columnInfo.js +26 -28
  33. package/es/table/src/footer.js +7 -2
  34. package/es/table/src/props.js +4 -0
  35. package/es/table/src/table.js +374 -191
  36. package/es/table/src/util.js +30 -3
  37. package/es/toolbar/src/toolbar.js +16 -24
  38. package/es/ui/index.js +1 -1
  39. package/es/ui/src/log.js +1 -1
  40. package/lib/grid/src/grid.js +67 -82
  41. package/lib/grid/src/grid.min.js +1 -1
  42. package/lib/index.umd.js +1276 -12214
  43. package/lib/index.umd.min.js +1 -1
  44. package/lib/locale/lang/ar-EG.js +3 -0
  45. package/lib/locale/lang/ar-EG.min.js +1 -1
  46. package/lib/locale/lang/de-DE.js +3 -0
  47. package/lib/locale/lang/de-DE.min.js +1 -1
  48. package/lib/locale/lang/en-US.js +3 -0
  49. package/lib/locale/lang/en-US.min.js +1 -1
  50. package/lib/locale/lang/en-US.umd.js +3 -0
  51. package/lib/locale/lang/es-ES.js +3 -0
  52. package/lib/locale/lang/es-ES.min.js +1 -1
  53. package/lib/locale/lang/es-ES.umd.js +3 -0
  54. package/lib/locale/lang/fr-FR.js +3 -0
  55. package/lib/locale/lang/fr-FR.min.js +1 -1
  56. package/lib/locale/lang/hu-HU.js +3 -0
  57. package/lib/locale/lang/hu-HU.min.js +1 -1
  58. package/lib/locale/lang/hu-HU.umd.js +3 -0
  59. package/lib/locale/lang/hy-AM.js +3 -0
  60. package/lib/locale/lang/hy-AM.min.js +1 -1
  61. package/lib/locale/lang/id-ID.js +3 -0
  62. package/lib/locale/lang/id-ID.min.js +1 -1
  63. package/lib/locale/lang/it-IT.js +3 -0
  64. package/lib/locale/lang/it-IT.min.js +1 -1
  65. package/lib/locale/lang/ja-JP.js +3 -0
  66. package/lib/locale/lang/ja-JP.min.js +1 -1
  67. package/lib/locale/lang/ja-JP.umd.js +3 -0
  68. package/lib/locale/lang/ko-KR.js +3 -0
  69. package/lib/locale/lang/ko-KR.min.js +1 -1
  70. package/lib/locale/lang/ko-KR.umd.js +3 -0
  71. package/lib/locale/lang/nb-NO.js +3 -0
  72. package/lib/locale/lang/nb-NO.min.js +1 -1
  73. package/lib/locale/lang/pt-BR.js +3 -0
  74. package/lib/locale/lang/pt-BR.min.js +1 -1
  75. package/lib/locale/lang/pt-BR.umd.js +3 -0
  76. package/lib/locale/lang/ru-RU.js +3 -0
  77. package/lib/locale/lang/ru-RU.min.js +1 -1
  78. package/lib/locale/lang/ru-RU.umd.js +3 -0
  79. package/lib/locale/lang/th-TH.js +3 -0
  80. package/lib/locale/lang/th-TH.min.js +1 -1
  81. package/lib/locale/lang/ug-CN.js +3 -0
  82. package/lib/locale/lang/ug-CN.min.js +1 -1
  83. package/lib/locale/lang/uk-UA.js +3 -0
  84. package/lib/locale/lang/uk-UA.min.js +1 -1
  85. package/lib/locale/lang/uk-UA.umd.js +3 -0
  86. package/lib/locale/lang/vi-VN.js +3 -0
  87. package/lib/locale/lang/vi-VN.min.js +1 -1
  88. package/lib/locale/lang/zh-CHT.js +3 -0
  89. package/lib/locale/lang/zh-CHT.min.js +1 -1
  90. package/lib/locale/lang/zh-CN.js +3 -0
  91. package/lib/locale/lang/zh-CN.min.js +1 -1
  92. package/lib/locale/lang/zh-CN.umd.js +3 -0
  93. package/lib/style.css +1 -1
  94. package/lib/table/module/custom/panel.js +21 -23
  95. package/lib/table/module/custom/panel.min.js +1 -1
  96. package/lib/table/module/edit/hook.js +1 -1
  97. package/lib/table/module/edit/hook.min.js +1 -1
  98. package/lib/table/module/export/export-panel.js +17 -19
  99. package/lib/table/module/export/export-panel.min.js +1 -1
  100. package/lib/table/module/export/hook.js +5 -11
  101. package/lib/table/module/export/hook.min.js +1 -1
  102. package/lib/table/module/export/import-panel.js +11 -13
  103. package/lib/table/module/export/import-panel.min.js +1 -1
  104. package/lib/table/module/keyboard/hook.js +53 -6
  105. package/lib/table/module/keyboard/hook.min.js +1 -1
  106. package/lib/table/module/validator/hook.js +1 -3
  107. package/lib/table/module/validator/hook.min.js +1 -1
  108. package/lib/table/render/index.js +98 -66
  109. package/lib/table/render/index.min.js +1 -1
  110. package/lib/table/src/body.js +12 -6
  111. package/lib/table/src/body.min.js +1 -1
  112. package/lib/table/src/columnInfo.js +30 -32
  113. package/lib/table/src/columnInfo.min.js +1 -1
  114. package/lib/table/src/footer.js +7 -2
  115. package/lib/table/src/footer.min.js +1 -1
  116. package/lib/table/src/props.js +4 -0
  117. package/lib/table/src/props.min.js +1 -1
  118. package/lib/table/src/table.js +409 -189
  119. package/lib/table/src/table.min.js +1 -1
  120. package/lib/table/src/util.js +35 -6
  121. package/lib/table/src/util.min.js +1 -1
  122. package/lib/toolbar/src/toolbar.js +16 -24
  123. package/lib/toolbar/src/toolbar.min.js +1 -1
  124. package/lib/ui/index.js +1 -1
  125. package/lib/ui/index.min.js +1 -1
  126. package/lib/ui/src/log.js +1 -1
  127. package/lib/ui/src/log.min.js +1 -1
  128. package/package.json +2 -2
  129. package/packages/grid/src/grid.ts +75 -82
  130. package/packages/locale/lang/ar-EG.ts +3 -0
  131. package/packages/locale/lang/de-DE.ts +3 -0
  132. package/packages/locale/lang/en-US.ts +3 -0
  133. package/packages/locale/lang/es-ES.ts +3 -0
  134. package/packages/locale/lang/fr-FR.ts +3 -0
  135. package/packages/locale/lang/hu-HU.ts +3 -0
  136. package/packages/locale/lang/hy-AM.ts +3 -0
  137. package/packages/locale/lang/id-ID.ts +3 -0
  138. package/packages/locale/lang/it-IT.ts +3 -0
  139. package/packages/locale/lang/ja-JP.ts +3 -0
  140. package/packages/locale/lang/ko-KR.ts +3 -0
  141. package/packages/locale/lang/nb-NO.ts +3 -0
  142. package/packages/locale/lang/pt-BR.ts +3 -0
  143. package/packages/locale/lang/ru-RU.ts +3 -0
  144. package/packages/locale/lang/th-TH.ts +3 -0
  145. package/packages/locale/lang/ug-CN.ts +3 -0
  146. package/packages/locale/lang/uk-UA.ts +3 -0
  147. package/packages/locale/lang/vi-VN.ts +3 -0
  148. package/packages/locale/lang/zh-CHT.ts +3 -0
  149. package/packages/locale/lang/zh-CN.ts +3 -0
  150. package/packages/table/module/custom/panel.ts +19 -21
  151. package/packages/table/module/edit/hook.ts +1 -1
  152. package/packages/table/module/export/export-panel.ts +17 -19
  153. package/packages/table/module/export/hook.ts +5 -11
  154. package/packages/table/module/export/import-panel.ts +11 -13
  155. package/packages/table/module/keyboard/hook.ts +49 -8
  156. package/packages/table/module/validator/hook.ts +1 -3
  157. package/packages/table/render/index.ts +89 -59
  158. package/packages/table/src/body.ts +12 -7
  159. package/packages/table/src/columnInfo.ts +26 -28
  160. package/packages/table/src/footer.ts +7 -2
  161. package/packages/table/src/props.ts +4 -0
  162. package/packages/table/src/table.ts +380 -189
  163. package/packages/table/src/util.ts +34 -3
  164. package/packages/toolbar/src/toolbar.ts +16 -24
  165. /package/es/{iconfont.1740732137800.ttf → iconfont.1741664494856.ttf} +0 -0
  166. /package/es/{iconfont.1740732137800.woff → iconfont.1741664494856.woff} +0 -0
  167. /package/es/{iconfont.1740732137800.woff2 → iconfont.1741664494856.woff2} +0 -0
  168. /package/lib/{iconfont.1740732137800.ttf → iconfont.1741664494856.ttf} +0 -0
  169. /package/lib/{iconfont.1740732137800.woff → iconfont.1741664494856.woff} +0 -0
  170. /package/lib/{iconfont.1740732137800.woff2 → iconfont.1741664494856.woff2} +0 -0
@@ -1,4 +1,4 @@
1
- import { defineComponent, h, PropType, ref, Ref, computed, provide, reactive, onUnmounted, watch, nextTick, VNode, ComponentPublicInstance, onMounted, createCommentVNode } from 'vue'
1
+ import { defineComponent, h, PropType, ref, Ref, computed, provide, reactive, onUnmounted, watch, nextTick, VNode, ComponentPublicInstance, onMounted } from 'vue'
2
2
  import XEUtils from 'xe-utils'
3
3
  import { getLastZIndex, nextZIndex, isEnableConf } from '../../ui/src/utils'
4
4
  import { getOffsetHeight, getPaddingTopBottomSize, getDomNode, toCssUnit } from '../../ui/src/dom'
@@ -17,7 +17,7 @@ const { getConfig, getI18n, commands, hooks, useFns, createEvent, globalEvents,
17
17
 
18
18
  const tableComponentPropKeys = Object.keys(tableComponentProps as any)
19
19
 
20
- const tableComponentMethodKeys: (keyof VxeTableMethods)[] = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'setRow', 'createData', 'createRow', 'revertData', 'clearData', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getFullColumns', 'getData', 'getCheckboxRecords', 'getParentRow', 'getTreeParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'getFullData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'setRowHeightConf', 'getRowHeightConf', 'setRowHeight', 'getRowHeight', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'setCheckboxRowKey', 'isCheckedByCheckboxRow', 'isCheckedByCheckboxRowKey', 'isIndeterminateByCheckboxRow', 'isIndeterminateByCheckboxRowKey', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'isCheckedByRadioRowKey', 'setRadioRow', 'setRadioRowKey', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'getPendingRecords', 'clearPendingRow', 'sort', 'setSort', 'clearSort', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'scrollTo', 'scrollToRow', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'getCustomStoreData', 'openTooltip', 'getCellLabel', 'getCellElement', 'focus', 'blur', 'connect']
20
+ const tableComponentMethodKeys: (keyof VxeTableMethods)[] = ['clearAll', 'syncData', 'updateData', 'loadData', 'reloadData', 'reloadRow', 'loadColumn', 'reloadColumn', 'getRowNode', 'getColumnNode', 'getRowIndex', 'getVTRowIndex', 'getVMRowIndex', 'getColumnIndex', 'getVTColumnIndex', 'getVMColumnIndex', 'setRow', 'createData', 'createRow', 'revertData', 'clearData', 'isRemoveByRow', 'isInsertByRow', 'isUpdateByRow', 'getColumns', 'getColumnById', 'getColumnByField', 'getTableColumn', 'getFullColumns', 'getData', 'getCheckboxRecords', 'getParentRow', 'getTreeParentRow', 'getRowSeq', 'getRowById', 'getRowid', 'getTableData', 'getFullData', 'setColumnFixed', 'clearColumnFixed', 'setColumnWidth', 'getColumnWidth', 'setRowHeightConf', 'getRowHeightConf', 'setRowHeight', 'getRowHeight', 'hideColumn', 'showColumn', 'resetColumn', 'refreshColumn', 'refreshScroll', 'recalculate', 'closeTooltip', 'isAllCheckboxChecked', 'isAllCheckboxIndeterminate', 'getCheckboxIndeterminateRecords', 'setCheckboxRow', 'setCheckboxRowKey', 'isCheckedByCheckboxRow', 'isCheckedByCheckboxRowKey', 'isIndeterminateByCheckboxRow', 'isIndeterminateByCheckboxRowKey', 'toggleCheckboxRow', 'setAllCheckboxRow', 'getRadioReserveRecord', 'clearRadioReserve', 'getCheckboxReserveRecords', 'clearCheckboxReserve', 'toggleAllCheckboxRow', 'clearCheckboxRow', 'setCurrentRow', 'isCheckedByRadioRow', 'isCheckedByRadioRowKey', 'setRadioRow', 'setRadioRowKey', 'clearCurrentRow', 'clearRadioRow', 'getCurrentRecord', 'getRadioRecord', 'getCurrentColumn', 'setCurrentColumn', 'clearCurrentColumn', 'setPendingRow', 'togglePendingRow', 'getPendingRecords', 'clearPendingRow', 'sort', 'setSort', 'clearSort', 'isSort', 'getSortColumns', 'closeFilter', 'isFilter', 'isActiveFilterByColumn', 'isRowExpandLoaded', 'clearRowExpandLoaded', 'reloadRowExpand', 'reloadRowExpand', 'toggleRowExpand', 'setAllRowExpand', 'setRowExpand', 'isExpandByRow', 'isRowExpandByRow', 'clearRowExpand', 'clearRowExpandReserve', 'getRowExpandRecords', 'getTreeExpandRecords', 'isTreeExpandLoaded', 'clearTreeExpandLoaded', 'reloadTreeExpand', 'reloadTreeChilds', 'toggleTreeExpand', 'setAllTreeExpand', 'setTreeExpand', 'isTreeExpandByRow', 'clearTreeExpand', 'clearTreeExpandReserve', 'getScroll', 'scrollTo', 'scrollToRow', 'scrollToColumn', 'clearScroll', 'updateFooter', 'updateStatus', 'setMergeCells', 'removeInsertRow', 'removeMergeCells', 'getMergeCells', 'clearMergeCells', 'setMergeFooterItems', 'removeMergeFooterItems', 'getMergeFooterItems', 'clearMergeFooterItems', 'getCustomStoreData', 'openTooltip', 'moveColumnTo', 'moveRowTo', 'getCellLabel', 'getCellElement', 'focus', 'blur', 'connect']
21
21
 
22
22
  const gridComponentEmits: VxeGridEmits = [
23
23
  ...tableComponentEmits,
@@ -351,10 +351,10 @@ export default defineComponent({
351
351
  const proxyOpts = computeProxyOpts.value
352
352
  tablePage.currentPage = currentPage
353
353
  tablePage.pageSize = pageSize
354
- gridMethods.dispatchEvent('page-change', params, $event)
354
+ $xeGrid.dispatchEvent('page-change', params, $event)
355
355
  if (proxyConfig && isEnableConf(proxyOpts)) {
356
- gridMethods.commitProxy('query').then((rest) => {
357
- gridMethods.dispatchEvent('proxy-query', rest, $event)
356
+ $xeGrid.commitProxy('query').then((rest) => {
357
+ $xeGrid.dispatchEvent('proxy-query', rest, $event)
358
358
  })
359
359
  }
360
360
  }
@@ -456,9 +456,7 @@ export default defineComponent({
456
456
  if (slots[funcSlot]) {
457
457
  return slots[funcSlot]
458
458
  } else {
459
- if (process.env.VUE_APP_VXE_ENV === 'development') {
460
- errLog('vxe.error.notSlot', [funcSlot])
461
- }
459
+ errLog('vxe.error.notSlot', [funcSlot])
462
460
  }
463
461
  } else {
464
462
  return funcSlot
@@ -467,6 +465,24 @@ export default defineComponent({
467
465
  return null
468
466
  }
469
467
 
468
+ const getConfigSlot = (slotConfigs?: Record<string, any>) => {
469
+ const slotConf: Record<string, any> = {}
470
+ XEUtils.objectMap(slotConfigs, (slotFunc, slotKey) => {
471
+ if (slotFunc) {
472
+ if (XEUtils.isString(slotFunc)) {
473
+ if (slots[slotFunc]) {
474
+ slotConf[slotKey] = slots[slotFunc]
475
+ } else {
476
+ errLog('vxe.error.notSlot', [slotFunc])
477
+ }
478
+ } else {
479
+ slotConf[slotKey] = slotFunc
480
+ }
481
+ }
482
+ })
483
+ return slotConf
484
+ }
485
+
470
486
  /**
471
487
  * 渲染表单
472
488
  */
@@ -523,7 +539,7 @@ export default defineComponent({
523
539
  class: 'vxe-grid--form-wrapper'
524
540
  }, slotVNs)
525
541
  }
526
- return createCommentVNode()
542
+ return renderEmptyElement($xeGrid)
527
543
  }
528
544
 
529
545
  /**
@@ -564,7 +580,7 @@ export default defineComponent({
564
580
  class: 'vxe-grid--toolbar-wrapper'
565
581
  }, slotVNs)
566
582
  }
567
- return createCommentVNode()
583
+ return renderEmptyElement($xeGrid)
568
584
  }
569
585
 
570
586
  /**
@@ -578,7 +594,7 @@ export default defineComponent({
578
594
  class: 'vxe-grid--top-wrapper'
579
595
  }, slots.top({ $grid: $xeGrid }))
580
596
  }
581
- return createCommentVNode()
597
+ return renderEmptyElement($xeGrid)
582
598
  }
583
599
 
584
600
  const renderTableLeft = () => {
@@ -588,7 +604,7 @@ export default defineComponent({
588
604
  class: 'vxe-grid--left-wrapper'
589
605
  }, leftSlot({ $grid: $xeGrid }))
590
606
  }
591
- return createCommentVNode()
607
+ return renderEmptyElement($xeGrid)
592
608
  }
593
609
 
594
610
  const renderTableRight = () => {
@@ -598,7 +614,7 @@ export default defineComponent({
598
614
  class: 'vxe-grid--right-wrapper'
599
615
  }, rightSlot({ $grid: $xeGrid }))
600
616
  }
601
- return createCommentVNode()
617
+ return renderEmptyElement($xeGrid)
602
618
  }
603
619
 
604
620
  /**
@@ -661,7 +677,7 @@ export default defineComponent({
661
677
  class: 'vxe-grid--bottom-wrapper'
662
678
  }, slots.bottom({ $grid: $xeGrid }))
663
679
  }
664
- return createCommentVNode()
680
+ return renderEmptyElement($xeGrid)
665
681
  }
666
682
 
667
683
  /**
@@ -671,43 +687,26 @@ export default defineComponent({
671
687
  const { proxyConfig, pagerConfig } = props
672
688
  const proxyOpts = computeProxyOpts.value
673
689
  const pagerOpts = computePagerOpts.value
690
+ const pagerSlot = slots.pager
674
691
  if ((pagerConfig && isEnableConf(pagerOpts)) || slots.pager) {
675
- let slotVNs: VNode[] = []
676
- if (slots.pager) {
677
- slotVNs = slots.pager({ $grid: $xeGrid })
678
- } else {
679
- const pagerOptSlots = pagerOpts.slots
680
- const pagerSlots: { [key: string]: () => VNode[] } = {}
681
- let leftSlot: any
682
- let rightSlot: any
683
- if (pagerOptSlots) {
684
- leftSlot = getFuncSlot(pagerOptSlots, 'left')
685
- rightSlot = getFuncSlot(pagerOptSlots, 'right')
686
- if (leftSlot) {
687
- pagerSlots.left = leftSlot
688
- }
689
- if (rightSlot) {
690
- pagerSlots.right = rightSlot
691
- }
692
- }
693
- if (VxeUIPagerComponent) {
694
- slotVNs.push(
695
- h(VxeUIPagerComponent, {
696
- ref: refPager,
697
- ...pagerOpts,
698
- ...(proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {}),
699
- onPageChange: pageChangeEvent
700
- }, pagerSlots)
701
- )
702
- }
703
- }
704
692
  return h('div', {
705
693
  ref: refPagerWrapper,
706
694
  key: 'pager',
707
695
  class: 'vxe-grid--pager-wrapper'
708
- }, slotVNs)
696
+ }, pagerSlot
697
+ ? pagerSlot({ $grid: $xeGrid })
698
+ : [
699
+ VxeUIPagerComponent
700
+ ? h(VxeUIPagerComponent, {
701
+ ref: refPager,
702
+ ...pagerOpts,
703
+ ...(proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {}),
704
+ onPageChange: pageChangeEvent
705
+ }, getConfigSlot(pagerOpts.slots))
706
+ : renderEmptyElement($xeGrid)
707
+ ])
709
708
  }
710
- return createCommentVNode()
709
+ return renderEmptyElement($xeGrid)
711
710
  }
712
711
 
713
712
  const renderChildLayout = (layoutKeys: VxeGridPropTypes.LayoutKey[]) => {
@@ -837,6 +836,9 @@ export default defineComponent({
837
836
 
838
837
  const gridMethods: GridMethods = {
839
838
  dispatchEvent,
839
+ getEl () {
840
+ return refElem.value
841
+ },
840
842
  /**
841
843
  * 提交指令,支持 code 或 button
842
844
  * @param {String/Object} code 字符串或对象
@@ -1009,9 +1011,7 @@ export default defineComponent({
1009
1011
  return { status: false }
1010
1012
  })
1011
1013
  } else {
1012
- if (process.env.VUE_APP_VXE_ENV === 'development') {
1013
- errLog('vxe.error.notFunc', ['proxy-config.ajax.query'])
1014
- }
1014
+ errLog('vxe.error.notFunc', ['proxy-config.ajax.query'])
1015
1015
  }
1016
1016
  break
1017
1017
  }
@@ -1070,9 +1070,7 @@ export default defineComponent({
1070
1070
  }
1071
1071
  }
1072
1072
  } else {
1073
- if (process.env.VUE_APP_VXE_ENV === 'development') {
1074
- errLog('vxe.error.notFunc', ['proxy-config.ajax.delete'])
1075
- }
1073
+ errLog('vxe.error.notFunc', ['proxy-config.ajax.delete'])
1076
1074
  }
1077
1075
  break
1078
1076
  }
@@ -1144,9 +1142,7 @@ export default defineComponent({
1144
1142
  }
1145
1143
  })
1146
1144
  } else {
1147
- if (process.env.VUE_APP_VXE_ENV === 'development') {
1148
- errLog('vxe.error.notFunc', ['proxy-config.ajax.save'])
1149
- }
1145
+ errLog('vxe.error.notFunc', ['proxy-config.ajax.save'])
1150
1146
  }
1151
1147
  break
1152
1148
  }
@@ -1157,9 +1153,7 @@ export default defineComponent({
1157
1153
  if (tCommandMethod) {
1158
1154
  tCommandMethod({ code, button, $grid: $xeGrid, $table: $xeTable }, ...args)
1159
1155
  } else {
1160
- if (process.env.VUE_APP_VXE_ENV === 'development') {
1161
- errLog('vxe.error.notCommands', [code])
1162
- }
1156
+ errLog('vxe.error.notCommands', [code])
1163
1157
  }
1164
1158
  }
1165
1159
  }
@@ -1271,21 +1265,25 @@ export default defineComponent({
1271
1265
  * 获取需要排除的高度
1272
1266
  */
1273
1267
  getExcludeHeight () {
1274
- const { height } = props
1275
1268
  const { isZMax } = reactData
1276
1269
  const el = refElem.value
1277
- const formWrapper = refFormWrapper.value
1278
- const toolbarWrapper = refToolbarWrapper.value
1279
- const topWrapper = refTopWrapper.value
1280
- const bottomWrapper = refBottomWrapper.value
1281
- const pagerWrapper = refPagerWrapper.value
1282
- const parentPaddingSize = isZMax || !(height === 'auto' || height === '100%') ? 0 : getPaddingTopBottomSize(el.parentNode as HTMLElement)
1283
- return parentPaddingSize + getPaddingTopBottomSize(el) + getOffsetHeight(formWrapper) + getOffsetHeight(toolbarWrapper) + getOffsetHeight(topWrapper) + getOffsetHeight(bottomWrapper) + getOffsetHeight(pagerWrapper)
1270
+ if (el) {
1271
+ const formWrapper = refFormWrapper.value
1272
+ const toolbarWrapper = refToolbarWrapper.value
1273
+ const topWrapper = refTopWrapper.value
1274
+ const bottomWrapper = refBottomWrapper.value
1275
+ const pagerWrapper = refPagerWrapper.value
1276
+ const parentEl = el.parentElement as HTMLElement
1277
+ const parentPaddingSize = isZMax ? 0 : (parentEl ? getPaddingTopBottomSize(parentEl) : 0)
1278
+ return parentPaddingSize + getPaddingTopBottomSize(el) + getOffsetHeight(formWrapper) + getOffsetHeight(toolbarWrapper) + getOffsetHeight(topWrapper) + getOffsetHeight(bottomWrapper) + getOffsetHeight(pagerWrapper)
1279
+ }
1280
+ return 0
1284
1281
  },
1285
1282
  getParentHeight () {
1286
1283
  const el = refElem.value
1287
1284
  if (el) {
1288
- return (reactData.isZMax ? getDomNode().visibleHeight : XEUtils.toNumber(getComputedStyle(el.parentNode as HTMLElement).height)) - gridPrivateMethods.getExcludeHeight()
1285
+ const parentEl = el.parentElement as HTMLElement
1286
+ return (reactData.isZMax ? getDomNode().visibleHeight : (parentEl ? XEUtils.toNumber(getComputedStyle(parentEl).height) : 0)) - gridPrivateMethods.getExcludeHeight()
1289
1287
  }
1290
1288
  return 0
1291
1289
  },
@@ -1349,23 +1347,20 @@ export default defineComponent({
1349
1347
  initPages()
1350
1348
 
1351
1349
  onMounted(() => {
1352
- if (process.env.VUE_APP_VXE_ENV === 'development') {
1353
- nextTick(() => {
1354
- if (props.formConfig) {
1355
- if (!VxeUIFormComponent) {
1356
- errLog('vxe.error.reqComp', ['vxe-form'])
1357
- }
1350
+ nextTick(() => {
1351
+ const { columns } = props
1352
+
1353
+ if (props.formConfig) {
1354
+ if (!VxeUIFormComponent) {
1355
+ errLog('vxe.error.reqComp', ['vxe-form'])
1358
1356
  }
1359
- if (props.pagerConfig) {
1360
- if (!VxeUIPagerComponent) {
1361
- errLog('vxe.error.reqComp', ['vxe-pager'])
1362
- }
1357
+ }
1358
+ if (props.pagerConfig) {
1359
+ if (!VxeUIPagerComponent) {
1360
+ errLog('vxe.error.reqComp', ['vxe-pager'])
1363
1361
  }
1364
- })
1365
- }
1362
+ }
1366
1363
 
1367
- nextTick(() => {
1368
- const { columns } = props
1369
1364
  // const { data, columns, proxyConfig } = props
1370
1365
  // const proxyOpts = computeProxyOpts.value
1371
1366
  // const formOpts = computeFormOpts.value
@@ -1373,11 +1368,9 @@ export default defineComponent({
1373
1368
  // errLog('vxe.error.errConflicts', ['grid.data', 'grid.proxy-config'])
1374
1369
  // }
1375
1370
 
1376
- // if (process.env.VUE_APP_VXE_ENV === 'development') {
1377
1371
  // if (proxyOpts.props) {
1378
1372
  // warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
1379
1373
  // }
1380
- // }
1381
1374
 
1382
1375
  if (columns && columns.length) {
1383
1376
  $xeGrid.loadColumn(columns)
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: '冻结在右侧',
238
238
  cancelFixed: '取消冻结列'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} 年'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: '01 月',
@@ -238,6 +238,9 @@ export default
238
238
  fixedRight: 'rechts eingefroren',
239
239
  cancelFixed: 'Spalte freigeben'
240
240
  },
241
+ datePicker: {
242
+ yearTitle: '{0} Jahre'
243
+ },
241
244
  input: {
242
245
  date: {
243
246
  m1: 'Januar',
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: 'frozen on right',
238
238
  cancelFixed: 'Unfreeze column'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} years'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: 'January',
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: 'Freeze on the right',
238
238
  cancelFixed: 'Unfreeze column'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0}'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: 'Enero',
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: '冻结在右侧',
238
238
  cancelFixed: '取消冻结列'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} 年'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: '01 月',
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: 'lefagyott a jobb oldalon',
238
238
  cancelFixed: 'Oldja fel az oszlopot'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} év'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: 'január',
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: '冻结在右侧',
238
238
  cancelFixed: '取消冻结列'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} 年'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: '01 月',
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: '冻结在右侧',
238
238
  cancelFixed: '取消冻结列'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} 年'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: '01 月',
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: 'congelato a destra',
238
238
  cancelFixed: 'Sblocca colonna'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} anni'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: 'Gennaio',
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: '右側に固定',
238
238
  cancelFixed: '列固定を取消'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} 年'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: '1月',
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: '오른쪽에 고정',
238
238
  cancelFixed: '고정 해제'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} 년'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: '01 월',
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: '冻结在右侧',
238
238
  cancelFixed: '取消冻结列'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} 年'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: '01 月',
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: 'Freeze on the right',
238
238
  cancelFixed: 'Unfreeze column'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} лет'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: 'Janeiro',
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: 'замер справа',
238
238
  cancelFixed: 'Разморозить столбец'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} лет'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: 'январь',
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: 'แช่แข็งทางด้านขวา',
238
238
  cancelFixed: 'เลิกตรึงคอลัมน์'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} ปี'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: 'มกราคม',
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: 'ئوڭ ياندا توڭلىتىش',
238
238
  cancelFixed: 'قۇر توڭلىتىشنى ئەمەلدىن قالدۇرۇش'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} يىل'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: '01 ئاي',
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: 'Зафіксувати праворуч',
238
238
  cancelFixed: 'Скасувати фіксацію стовпця'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} 年'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: '01 місяць',
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: '冻结在右侧',
238
238
  cancelFixed: '取消冻结列'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} 年'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: '01 月',
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: '凍結在右側',
238
238
  cancelFixed: '取消凍結列'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} 年'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: '01 月',
@@ -237,6 +237,9 @@ export default {
237
237
  fixedRight: '冻结在右侧',
238
238
  cancelFixed: '取消冻结列'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} 年'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  m1: '01 月',
@@ -1151,27 +1151,25 @@ export default defineComponent({
1151
1151
  return renderSimplePanel()
1152
1152
  }
1153
1153
 
1154
- if (process.env.VUE_APP_VXE_ENV === 'development') {
1155
- nextTick(() => {
1156
- const customOpts = computeCustomOpts.value
1157
- const { mode } = customOpts
1158
- if (!VxeUIModalComponent) {
1159
- errLog('vxe.error.reqComp', ['vxe-modal'])
1160
- }
1161
- if (!VxeUIDrawerComponent && (mode === 'drawer')) {
1162
- errLog('vxe.error.reqComp', ['vxe-drawer'])
1163
- }
1164
- if (!VxeUIButtonComponent) {
1165
- errLog('vxe.error.reqComp', ['vxe-button'])
1166
- }
1167
- if (!VxeUINumberInputComponent) {
1168
- errLog('vxe.error.reqComp', ['vxe-number-input'])
1169
- }
1170
- if (!VxeUIRadioGroupComponent) {
1171
- errLog('vxe.error.reqComp', ['vxe-radio-group'])
1172
- }
1173
- })
1174
- }
1154
+ nextTick(() => {
1155
+ const customOpts = computeCustomOpts.value
1156
+ const { mode } = customOpts
1157
+ if (!VxeUIModalComponent) {
1158
+ errLog('vxe.error.reqComp', ['vxe-modal'])
1159
+ }
1160
+ if (!VxeUIDrawerComponent && (mode === 'drawer')) {
1161
+ errLog('vxe.error.reqComp', ['vxe-drawer'])
1162
+ }
1163
+ if (!VxeUIButtonComponent) {
1164
+ errLog('vxe.error.reqComp', ['vxe-button'])
1165
+ }
1166
+ if (!VxeUINumberInputComponent) {
1167
+ errLog('vxe.error.reqComp', ['vxe-number-input'])
1168
+ }
1169
+ if (!VxeUIRadioGroupComponent) {
1170
+ errLog('vxe.error.reqComp', ['vxe-radio-group'])
1171
+ }
1172
+ })
1175
1173
 
1176
1174
  return renderVN
1177
1175
  }
@@ -283,7 +283,7 @@ hooks.add('tableEditModule', {
283
283
  }
284
284
  return handleInsertRowAt(records.map((item: any) => Object.assign({}, item, { [parentField]: parentRow[rowField] })), targetRow, isInsertNextRow)
285
285
  } else {
286
- errLog('vxe.error.errProp', ['tree-config.treeConfig=false', 'tree-config.treeConfig=true'])
286
+ errLog('vxe.error.errProp', ['tree-config.transform=false', 'tree-config.transform=true'])
287
287
  }
288
288
  return Promise.resolve({ row: null, rows: [] })
289
289
  }
@@ -521,25 +521,23 @@ export default defineComponent({
521
521
  : createCommentVNode()
522
522
  }
523
523
 
524
- if (process.env.VUE_APP_VXE_ENV === 'development') {
525
- nextTick(() => {
526
- if (!VxeUIModalComponent) {
527
- errLog('vxe.error.reqComp', ['vxe-modal'])
528
- }
529
- if (!VxeUIButtonComponent) {
530
- errLog('vxe.error.reqComp', ['vxe-button'])
531
- }
532
- if (!VxeUISelectComponent) {
533
- errLog('vxe.error.reqComp', ['vxe-select'])
534
- }
535
- if (!VxeUIInputComponent) {
536
- errLog('vxe.error.reqComp', ['vxe-input'])
537
- }
538
- if (!VxeUICheckboxComponent) {
539
- errLog('vxe.error.reqComp', ['vxe-checkbox'])
540
- }
541
- })
542
- }
524
+ nextTick(() => {
525
+ if (!VxeUIModalComponent) {
526
+ errLog('vxe.error.reqComp', ['vxe-modal'])
527
+ }
528
+ if (!VxeUIButtonComponent) {
529
+ errLog('vxe.error.reqComp', ['vxe-button'])
530
+ }
531
+ if (!VxeUISelectComponent) {
532
+ errLog('vxe.error.reqComp', ['vxe-select'])
533
+ }
534
+ if (!VxeUIInputComponent) {
535
+ errLog('vxe.error.reqComp', ['vxe-input'])
536
+ }
537
+ if (!VxeUICheckboxComponent) {
538
+ errLog('vxe.error.reqComp', ['vxe-checkbox'])
539
+ }
540
+ })
543
541
 
544
542
  return renderVN
545
543
  }