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
@@ -9,13 +9,20 @@ import tableComponentProps from '../../table/src/props'
9
9
  import { getSlotVNs } from '../../ui/src/vn'
10
10
  import { warnLog, errLog } from '../../ui/src/log'
11
11
 
12
- const { getConfig, getI18n, commands, globalEvents, globalMixins } = VxeUI
12
+ import type { VxeFormComponent, VxePagerComponent } from 'vxe-pc-ui'
13
+
14
+ const { getConfig, getI18n, commands, globalEvents, globalMixins, renderEmptyElement } = VxeUI
13
15
 
14
16
  const methods: any = {}
15
17
  const propKeys = Object.keys(tableComponentProps)
16
18
 
17
- function renderDefaultForm (h: CreateElement, _vm: any) {
18
- const { $scopedSlots, proxyConfig, proxyOpts, formData, formConfig, formOpts } = _vm
19
+ function renderDefaultForm (h: CreateElement, $xeGrid: any) {
20
+ const VxeUIFormComponent = VxeUI.getComponent<VxeFormComponent>('VxeForm')
21
+ const props = $xeGrid
22
+ const slots = $xeGrid.$scopedSlots
23
+
24
+ const { proxyConfig, formConfig } = props
25
+ const { proxyOpts, formData, formOpts } = $xeGrid
19
26
  if (isEnableConf(formConfig) && formOpts.items && formOpts.items.length) {
20
27
  const formSlots: any = {}
21
28
  if (!formOpts.inited) {
@@ -23,7 +30,7 @@ function renderDefaultForm (h: CreateElement, _vm: any) {
23
30
  const beforeItem = proxyOpts.beforeItem
24
31
  if (proxyOpts && beforeItem) {
25
32
  formOpts.items.forEach((item: any) => {
26
- beforeItem.call(_vm, { $grid: _vm, item })
33
+ beforeItem.call($xeGrid, { $grid: $xeGrid, item })
27
34
  })
28
35
  }
29
36
  }
@@ -31,39 +38,42 @@ function renderDefaultForm (h: CreateElement, _vm: any) {
31
38
  formOpts.items.forEach((item: any) => {
32
39
  XEUtils.each(item.slots, (func) => {
33
40
  if (!XEUtils.isFunction(func)) {
34
- if ($scopedSlots[func]) {
35
- formSlots[func] = $scopedSlots[func]
41
+ if (slots[func]) {
42
+ formSlots[func] = slots[func]
36
43
  }
37
44
  }
38
45
  })
39
46
  })
40
47
  return [
41
- h('vxe-form', {
42
- props: Object.assign({}, formOpts, {
43
- data: proxyConfig && proxyOpts.form ? formData : formOpts.data
44
- }),
45
- on: {
46
- submit: _vm.submitEvent,
47
- reset: _vm.resetEvent,
48
- collapse: _vm.collapseEvent,
49
- 'submit-invalid': _vm.submitInvalidEvent
50
- },
51
- scopedSlots: formSlots
52
- })
48
+ VxeUIFormComponent
49
+ ? h(VxeUIFormComponent, {
50
+ props: Object.assign({}, formOpts, {
51
+ data: proxyConfig && proxyOpts.form ? formData : formOpts.data
52
+ }),
53
+ on: {
54
+ submit: $xeGrid.submitEvent,
55
+ reset: $xeGrid.resetEvent,
56
+ collapse: $xeGrid.collapseEvent,
57
+ 'submit-invalid': $xeGrid.submitInvalidEvent
58
+ },
59
+ scopedSlots: formSlots
60
+ })
61
+ : renderEmptyElement($xeGrid)
53
62
  ]
54
63
  }
55
64
  return []
56
65
  }
57
66
 
58
- function getFuncSlot (_vm: any, optSlots: any, slotKey: any) {
59
- const { $scopedSlots } = _vm
67
+ function getFuncSlot ($xeGrid: any, optSlots: any, slotKey: any) {
68
+ const slots = $xeGrid.$scopedSlots
69
+
60
70
  const funcSlot = optSlots[slotKey]
61
71
  if (funcSlot) {
62
72
  if (XEUtils.isString(funcSlot)) {
63
- if ($scopedSlots[funcSlot]) {
64
- return $scopedSlots[funcSlot]
73
+ if (slots[funcSlot]) {
74
+ return slots[funcSlot]
65
75
  } else {
66
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
76
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
67
77
  errLog('vxe.error.notSlot', [funcSlot])
68
78
  }
69
79
  }
@@ -80,7 +90,7 @@ function getToolbarSlots (_vm: any) {
80
90
  let buttonsSlot
81
91
  let toolsSlot
82
92
  const slots: any = {}
83
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
93
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
84
94
  if ($scopedSlots.buttons && (!toolbarOptSlots || toolbarOptSlots.buttons !== 'buttons')) {
85
95
  warnLog('vxe.error.reqProp', ['toolbar-config.slots.buttons'])
86
96
  }
@@ -260,8 +270,12 @@ function renderBottom (h: CreateElement, _vm: any) {
260
270
  /**
261
271
  * 渲染分页
262
272
  */
263
- function renderPager (h: CreateElement, _vm: any) {
264
- const { _e, $scopedSlots, pagerConfig, proxyConfig, tablePage } = _vm
273
+ function renderPager (h: CreateElement, $xeGrid: any) {
274
+ const VxeUIPagerComponent = VxeUI.getComponent<VxePagerComponent>('VxePager')
275
+ const props = $xeGrid
276
+
277
+ const { pagerConfig, proxyConfig } = props
278
+ const { $scopedSlots, tablePage } = $xeGrid
265
279
  const pagerSlot = $scopedSlots.pager
266
280
  const hasPager = !!(pagerSlot || isEnableConf(pagerConfig))
267
281
 
@@ -271,19 +285,21 @@ function renderPager (h: CreateElement, _vm: any) {
271
285
  ref: 'pagerWrapper',
272
286
  class: 'vxe-grid--pager-wrapper'
273
287
  }, pagerSlot
274
- ? pagerSlot.call(_vm, { $grid: _vm }, h)
288
+ ? pagerSlot.call($xeGrid, { $grid: $xeGrid }, h)
275
289
  : [
276
- h('vxe-pager', {
277
- props: { ..._vm.pagerOpts, ...(proxyConfig ? tablePage : {}) },
278
- on: {
279
- 'page-change': _vm.pageChangeEvent
280
- },
281
- scopedSlots: getPagerSlots(_vm)
282
- })
290
+ VxeUIPagerComponent
291
+ ? h(VxeUIPagerComponent, {
292
+ props: { ...$xeGrid.pagerOpts, ...(proxyConfig ? tablePage : {}) },
293
+ on: {
294
+ 'page-change': $xeGrid.pageChangeEvent
295
+ },
296
+ scopedSlots: getPagerSlots($xeGrid)
297
+ })
298
+ : renderEmptyElement($xeGrid)
283
299
  ]
284
300
  )
285
301
  }
286
- return _e()
302
+ return renderEmptyElement($xeGrid)
287
303
  }
288
304
 
289
305
  const defaultLayouts = ['Form', 'Toolbar', 'Top', 'Table', 'Bottom', 'Pager']
@@ -322,7 +338,7 @@ function renderLayout (h: CreateElement, _vm: any) {
322
338
  vns.push(renderPager(h, _vm))
323
339
  break
324
340
  default:
325
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
341
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
326
342
  errLog('vxe.error.notProp', [`layouts -> ${name}`])
327
343
  }
328
344
  break
@@ -371,7 +387,7 @@ export default {
371
387
  tZindex: 0,
372
388
  tablePage: {
373
389
  total: 0,
374
- pageSize: getConfig().pager.pageSize || 10,
390
+ pageSize: getConfig().pager?.pageSize || 10,
375
391
  currentPage: 1
376
392
  }
377
393
  }
@@ -385,18 +401,33 @@ export default {
385
401
  return this.proxyOpts.showActiveMsg
386
402
  },
387
403
  proxyOpts () {
388
- return XEUtils.merge({}, getConfig().grid.proxyConfig, this.proxyConfig)
404
+ return this.computeProxyOpts
405
+ },
406
+ computeProxyOpts () {
407
+ return XEUtils.merge({}, XEUtils.clone(getConfig().grid.proxyConfig, true), this.proxyConfig)
389
408
  },
390
409
  pagerOpts () {
410
+ return this.computePagerOpts
411
+ },
412
+ computePagerOpts () {
391
413
  return Object.assign({}, getConfig().grid.pagerConfig, this.pagerConfig)
392
414
  },
393
415
  formOpts () {
416
+ return this.computeFormOpts
417
+ },
418
+ computeFormOpts () {
394
419
  return Object.assign({}, getConfig().grid.formConfig, this.formConfig)
395
420
  },
396
421
  toolbarOpts () {
422
+ return this.computeToolbarOpts
423
+ },
424
+ computeToolbarOpts () {
397
425
  return Object.assign({}, getConfig().grid.toolbarConfig, this.toolbarConfig || this.toolbar)
398
426
  },
399
427
  zoomOpts () {
428
+ return this.computeZoomOpts
429
+ },
430
+ computeZoomOpts () {
400
431
  return Object.assign({}, getConfig().grid.zoomConfig, this.zoomConfig)
401
432
  },
402
433
  renderStyle () {
@@ -454,12 +485,15 @@ export default {
454
485
  }
455
486
  } as any,
456
487
  created (this: any) {
488
+ const $xeGrid = this
489
+ const props = $xeGrid
490
+
457
491
  // const { data, formOpts, proxyOpts, proxyConfig } = this
458
492
  // if (proxyConfig && (data || (proxyOpts.form && formOpts.data))) {
459
493
  // errLog('vxe.error.errConflicts', ['grid.data', 'grid.proxy-config'])
460
494
  // }
461
495
 
462
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
496
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
463
497
  if (this.toolbar) {
464
498
  warnLog('vxe.error.delProp', ['grid.toolbar', 'grid.toolbar-config'])
465
499
  }
@@ -470,6 +504,26 @@ export default {
470
504
  // warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
471
505
  // }
472
506
  }
507
+
508
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
509
+ // 使用已安装的组件,如果未安装则不渲染
510
+ const VxeUIFormComponent = VxeUI.getComponent<VxeFormComponent>('VxeForm')
511
+ const VxeUIPagerComponent = VxeUI.getComponent<VxePagerComponent>('VxePager')
512
+
513
+ $xeGrid.$nextTick(() => {
514
+ if (props.formConfig) {
515
+ if (!VxeUIFormComponent) {
516
+ errLog('vxe.error.reqComp', ['vxe-form'])
517
+ }
518
+ }
519
+ if (props.pagerConfig) {
520
+ if (!VxeUIPagerComponent) {
521
+ errLog('vxe.error.reqComp', ['vxe-pager'])
522
+ }
523
+ }
524
+ })
525
+ }
526
+
473
527
  this.initPages()
474
528
  globalEvents.on(this, 'keydown', this.handleGlobalKeydownEvent)
475
529
  },
@@ -484,7 +538,8 @@ export default {
484
538
  globalEvents.off(this, 'keydown')
485
539
  },
486
540
  render (this: any, h: CreateElement) {
487
- const { vSize, isZMax } = this
541
+ const { computeSize, isZMax } = this
542
+ const vSize = computeSize
488
543
  return h('div', {
489
544
  class: ['vxe-grid', {
490
545
  [`size--${vSize}`]: vSize,
@@ -652,8 +707,11 @@ export default {
652
707
  }
653
708
  }
654
709
  if (isInited) {
655
- const { sortOpts } = $xetable
656
- let defaultSort = sortOpts.defaultSort
710
+ let defaultSort = null
711
+ if ($xetable) {
712
+ const { sortOpts } = $xetable
713
+ defaultSort = sortOpts.defaultSort
714
+ }
657
715
  // 如果使用默认排序
658
716
  if (defaultSort) {
659
717
  if (!XEUtils.isArray(defaultSort)) {
@@ -667,14 +725,18 @@ export default {
667
725
  }
668
726
  })
669
727
  }
670
- filterList = $xetable.getCheckedFilters()
671
- } else {
672
- if (isReload) {
673
- $xetable.clearAll()
674
- } else {
675
- sortList = $xetable.getSortColumns()
728
+ if ($xetable) {
676
729
  filterList = $xetable.getCheckedFilters()
677
730
  }
731
+ } else {
732
+ if ($xetable) {
733
+ if (isReload) {
734
+ $xetable.clearAll()
735
+ } else {
736
+ sortList = $xetable.getSortColumns()
737
+ filterList = $xetable.getCheckedFilters()
738
+ }
739
+ }
678
740
  }
679
741
  const commitParams = {
680
742
  code,
@@ -730,7 +792,7 @@ export default {
730
792
  return { status: false }
731
793
  })
732
794
  } else {
733
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
795
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
734
796
  errLog('vxe.error.notFunc', ['proxy-config.ajax.query'])
735
797
  }
736
798
  }
@@ -758,7 +820,7 @@ export default {
758
820
  $xetable.setPendingRow(removeRecords, false)
759
821
  if (isRespMsg) {
760
822
  // 检测弹窗模块
761
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
823
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
762
824
  if (!VxeUI.modal) {
763
825
  errLog('vxe.error.reqModule', ['Modal'])
764
826
  }
@@ -779,7 +841,7 @@ export default {
779
841
  this.tableLoading = false
780
842
  if (isRespMsg) {
781
843
  // 检测弹窗模块
782
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
844
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
783
845
  if (!VxeUI.modal) {
784
846
  errLog('vxe.error.reqModule', ['Modal'])
785
847
  }
@@ -795,7 +857,7 @@ export default {
795
857
  } else {
796
858
  if (isActiveMsg) {
797
859
  // 检测弹窗模块
798
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
860
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
799
861
  if (!VxeUI.modal) {
800
862
  errLog('vxe.error.reqModule', ['Modal'])
801
863
  }
@@ -804,7 +866,7 @@ export default {
804
866
  }
805
867
  }
806
868
  } else {
807
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
869
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
808
870
  errLog('vxe.error.notFunc', ['proxy-config.ajax.delete'])
809
871
  }
810
872
  }
@@ -845,7 +907,7 @@ export default {
845
907
  $xetable.clearPendingRow()
846
908
  if (isRespMsg) {
847
909
  // 检测弹窗模块
848
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
910
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
849
911
  if (!VxeUI.modal) {
850
912
  errLog('vxe.error.reqModule', ['Modal'])
851
913
  }
@@ -866,7 +928,7 @@ export default {
866
928
  this.tableLoading = false
867
929
  if (isRespMsg) {
868
930
  // 检测弹窗模块
869
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
931
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
870
932
  if (!VxeUI.modal) {
871
933
  errLog('vxe.error.reqModule', ['Modal'])
872
934
  }
@@ -881,7 +943,7 @@ export default {
881
943
  } else {
882
944
  if (isActiveMsg) {
883
945
  // 检测弹窗模块
884
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
946
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
885
947
  if (!VxeUI.modal) {
886
948
  errLog('vxe.error.reqModule', ['Modal'])
887
949
  }
@@ -891,7 +953,7 @@ export default {
891
953
  }
892
954
  })
893
955
  } else {
894
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
956
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
895
957
  errLog('vxe.error.notFunc', ['proxy-config.ajax.save'])
896
958
  }
897
959
  }
@@ -903,7 +965,7 @@ export default {
903
965
  if (gCommandOpts.commandMethod) {
904
966
  gCommandOpts.commandMethod({ code, button, $grid: this, $table: $xetable }, ...args)
905
967
  } else {
906
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
968
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
907
969
  errLog('vxe.error.notCommands', [code])
908
970
  }
909
971
  }
@@ -932,7 +994,7 @@ export default {
932
994
  })
933
995
  } else {
934
996
  // 检测弹窗模块
935
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
997
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
936
998
  if (!VxeUI.modal) {
937
999
  errLog('vxe.error.reqModule', ['Modal'])
938
1000
  }
@@ -983,7 +1045,7 @@ export default {
983
1045
  } else {
984
1046
  if (isActiveMsg) {
985
1047
  // 检测弹窗模块
986
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
1048
+ if (process.env.VUE_APP_VXE_ENV === 'development') {
987
1049
  if (!VxeUI.modal) {
988
1050
  errLog('vxe.error.reqModule', ['Modal'])
989
1051
  }
@@ -1102,7 +1164,7 @@ export default {
1102
1164
  return null
1103
1165
  },
1104
1166
  // 检查插槽
1105
- ...(process.env.VUE_APP_VXE_TABLE_ENV === 'development'
1167
+ ...(process.env.VUE_APP_VXE_ENV === 'development'
1106
1168
  ? {
1107
1169
  loadColumn (columns: any[]) {
1108
1170
  const { $scopedSlots } = this
@@ -89,7 +89,7 @@ export default {
89
89
  goto: 'Go to',
90
90
  gotoTitle: 'Number',
91
91
  pagesize: '{0}/page',
92
- total: 'Total {0} record',
92
+ total: 'Total {0} records',
93
93
  pageClassifier: '',
94
94
  homePage: 'Home',
95
95
  homePageTitle: 'Home page',
@@ -200,7 +200,8 @@ export default {
200
200
  zoomIn: 'Maximize',
201
201
  zoomOut: 'Reduction',
202
202
  close: 'Close',
203
- miniMaxSize: 'The number of minimized Windows cannot exceed {0}.'
203
+ miniMaxSize: 'The number of minimized Windows cannot exceed {0}.',
204
+ footPropErr: '"show-footer" is only used to enable table tails and needs to be used in conjunction with "show-confirm-button" | "show-cancel-button" | slots'
204
205
  },
205
206
  drawer: {
206
207
  close: 'Close'
@@ -319,6 +320,9 @@ export default {
319
320
  fileTitle: 'Upload file'
320
321
  }
321
322
  },
323
+ empty: {
324
+ defText: 'No Data'
325
+ },
322
326
  formDesign: {
323
327
  formName: 'Form name',
324
328
  defFormTitle: 'Unnamed form',
@@ -200,7 +200,8 @@ export default {
200
200
  zoomIn: 'Maximize',
201
201
  zoomOut: 'Reducir',
202
202
  close: 'Cerrar',
203
- miniMaxSize: 'The number of minimized Windows cannot exceed {0}.'
203
+ miniMaxSize: 'The number of minimized Windows cannot exceed {0}.',
204
+ footPropErr: '"show-footer" is only used to enable table tails and needs to be used in conjunction with "show-confirm-button" | "show-cancel-button" | slots'
204
205
  },
205
206
  drawer: {
206
207
  close: 'Cerrar'
@@ -319,6 +320,9 @@ export default {
319
320
  fileTitle: 'Upload file'
320
321
  }
321
322
  },
323
+ empty: {
324
+ defText: 'No Data'
325
+ },
322
326
  formDesign: {
323
327
  formName: 'Form name',
324
328
  defFormTitle: 'Unnamed form',
@@ -200,7 +200,8 @@ export default {
200
200
  zoomIn: 'maximalizálni',
201
201
  zoomOut: 'csökkentés',
202
202
  close: 'bezárás',
203
- miniMaxSize: 'A minimalizált ablakok száma nem haladhatja meg a következőt: {0}'
203
+ miniMaxSize: 'A minimalizált ablakok száma nem haladhatja meg a következőt: {0}',
204
+ footPropErr: 'show-footer 仅用于启用表尾,需配合 show-confirm-button | show-cancel-button | 插槽使用'
204
205
  },
205
206
  drawer: {
206
207
  close: 'bezárás'
@@ -319,6 +320,9 @@ export default {
319
320
  fileTitle: 'Fájlok feltöltése'
320
321
  }
321
322
  },
323
+ empty: {
324
+ defText: '暂无数据'
325
+ },
322
326
  formDesign: {
323
327
  formName: 'forma neve',
324
328
  defFormTitle: 'névtelen forma',
@@ -200,7 +200,8 @@ export default {
200
200
  zoomIn: '最大化',
201
201
  zoomOut: '縮小',
202
202
  close: '閉じる',
203
- miniMaxSize: 'The number of minimized Windows cannot exceed {0}.'
203
+ miniMaxSize: 'The number of minimized Windows cannot exceed {0}.',
204
+ footPropErr: 'show-footer 仅用于启用表尾,需配合 show-confirm-button | show-cancel-button | 插槽使用'
204
205
  },
205
206
  drawer: {
206
207
  close: '閉じる'
@@ -319,6 +320,9 @@ export default {
319
320
  fileTitle: '上传文件'
320
321
  }
321
322
  },
323
+ empty: {
324
+ defText: '暂无数据'
325
+ },
322
326
  formDesign: {
323
327
  formName: 'Form name',
324
328
  defFormTitle: 'Unnamed form',
@@ -200,7 +200,8 @@ export default {
200
200
  zoomIn: '最大化',
201
201
  zoomOut: '还原',
202
202
  close: '关闭',
203
- miniMaxSize: '最小化窗口的数量不能超过 {0} 个'
203
+ miniMaxSize: '最小化窗口的数量不能超过 {0} 个',
204
+ footPropErr: 'show-footer 仅用于启用表尾,需配合 show-confirm-button | show-cancel-button | 插槽使用'
204
205
  },
205
206
  drawer: {
206
207
  close: '关闭'
@@ -319,6 +320,9 @@ export default {
319
320
  fileTitle: '上传文件'
320
321
  }
321
322
  },
323
+ empty: {
324
+ defText: '暂无数据'
325
+ },
322
326
  formDesign: {
323
327
  formName: '表单名称',
324
328
  defFormTitle: '未命名的表单',
@@ -200,7 +200,8 @@ export default {
200
200
  zoomIn: 'Maximize',
201
201
  zoomOut: 'Restaurar',
202
202
  close: 'Fechar',
203
- miniMaxSize: 'The number of minimized Windows cannot exceed {0}.'
203
+ miniMaxSize: 'The number of minimized Windows cannot exceed {0}.',
204
+ footPropErr: 'show-footer 仅用于启用表尾,需配合 show-confirm-button | show-cancel-button | 插槽使用'
204
205
  },
205
206
  drawer: {
206
207
  close: 'Fechar'
@@ -319,6 +320,9 @@ export default {
319
320
  fileTitle: '上传文件'
320
321
  }
321
322
  },
323
+ empty: {
324
+ defText: '暂无数据'
325
+ },
322
326
  formDesign: {
323
327
  formName: 'Form name',
324
328
  defFormTitle: 'Unnamed form',
@@ -200,7 +200,8 @@ export default {
200
200
  zoomIn: 'максимизировать',
201
201
  zoomOut: 'снижение',
202
202
  close: 'закрытие',
203
- miniMaxSize: 'Количество свернутых окон не может превышать {0}.'
203
+ miniMaxSize: 'Количество свернутых окон не может превышать {0}.',
204
+ footPropErr: 'show-footer 仅用于启用表尾,需配合 show-confirm-button | show-cancel-button | 插槽使用'
204
205
  },
205
206
  drawer: {
206
207
  close: 'закрытие'
@@ -319,6 +320,9 @@ export default {
319
320
  fileTitle: 'Загрузить файлы'
320
321
  }
321
322
  },
323
+ empty: {
324
+ defText: '暂无数据'
325
+ },
322
326
  formDesign: {
323
327
  formName: 'имя формы',
324
328
  defFormTitle: 'безымянная форма',
@@ -200,7 +200,8 @@ export default {
200
200
  zoomIn: '最大化',
201
201
  zoomOut: '还原',
202
202
  close: '关闭',
203
- miniMaxSize: '最小化窗口的数量不能超过 {0} 个'
203
+ miniMaxSize: '最小化窗口的数量不能超过 {0} 个',
204
+ footPropErr: 'show-footer 仅用于启用表尾,需配合 show-confirm-button | show-cancel-button | 插槽使用'
204
205
  },
205
206
  drawer: {
206
207
  close: '关闭'
@@ -319,6 +320,9 @@ export default {
319
320
  fileTitle: '上传文件'
320
321
  }
321
322
  },
323
+ empty: {
324
+ defText: '暂无数据'
325
+ },
322
326
  formDesign: {
323
327
  formName: '表单名称',
324
328
  defFormTitle: '未命名的表单',
@@ -200,7 +200,8 @@ export default {
200
200
  zoomIn: '最大化',
201
201
  zoomOut: '还原',
202
202
  close: '关闭',
203
- miniMaxSize: '最小化窗口的数量不能超过 {0} 个'
203
+ miniMaxSize: '最小化窗口的数量不能超过 {0} 个',
204
+ footPropErr: 'show-footer 仅用于启用表尾,需配合 show-confirm-button | show-cancel-button | 插槽使用'
204
205
  },
205
206
  drawer: {
206
207
  close: '关闭'
@@ -319,6 +320,9 @@ export default {
319
320
  fileTitle: '上传文件'
320
321
  }
321
322
  },
323
+ empty: {
324
+ defText: '暂无数据'
325
+ },
322
326
  formDesign: {
323
327
  formName: '表单名称',
324
328
  defFormTitle: '未命名的表单',
@@ -200,7 +200,8 @@ export default {
200
200
  zoomIn: '最大化',
201
201
  zoomOut: '還原',
202
202
  close: '關閉',
203
- miniMaxSize: '最小化視窗的數量不能超過 {0} 個'
203
+ miniMaxSize: '最小化視窗的數量不能超過 {0} 個',
204
+ footPropErr: 'show-footer 仅用于启用表尾,需配合 show-confirm-button | show-cancel-button | 插槽使用'
204
205
  },
205
206
  drawer: {
206
207
  close: '關閉'
@@ -319,6 +320,9 @@ export default {
319
320
  fileTitle: '上傳文件'
320
321
  }
321
322
  },
323
+ empty: {
324
+ defText: '暂无数据'
325
+ },
322
326
  formDesign: {
323
327
  formName: '表單名稱',
324
328
  defFormTitle: '未命名的表單',
@@ -200,7 +200,8 @@ export default {
200
200
  zoomIn: '最大化',
201
201
  zoomOut: '还原',
202
202
  close: '关闭',
203
- miniMaxSize: '最小化窗口的数量不能超过 {0} 个'
203
+ miniMaxSize: '最小化窗口的数量不能超过 {0} 个',
204
+ footPropErr: 'show-footer 仅用于启用表尾,需配合 show-confirm-button | show-cancel-button | 插槽使用'
204
205
  },
205
206
  drawer: {
206
207
  close: '关闭'
@@ -319,6 +320,9 @@ export default {
319
320
  fileTitle: '上传文件'
320
321
  }
321
322
  },
323
+ empty: {
324
+ defText: '暂无数据'
325
+ },
322
326
  formDesign: {
323
327
  formName: '表单名称',
324
328
  defFormTitle: '未命名的表单',