vxe-table 3.14.0-beta.0 → 3.14.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 (181) hide show
  1. package/es/grid/src/grid.js +118 -113
  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 +25 -27
  24. package/es/table/module/edit/mixin.js +1 -1
  25. package/es/table/module/export/export-panel.js +22 -24
  26. package/es/table/module/export/import-panel.js +14 -16
  27. package/es/table/module/export/mixin.js +15 -31
  28. package/es/table/module/keyboard/mixin.js +89 -23
  29. package/es/table/module/validator/mixin.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/column.js +2 -2
  33. package/es/table/src/columnInfo.js +30 -32
  34. package/es/table/src/footer.js +7 -2
  35. package/es/table/src/group.js +2 -2
  36. package/es/table/src/methods.js +431 -224
  37. package/es/table/src/props.js +4 -0
  38. package/es/table/src/table.js +45 -25
  39. package/es/table/src/util.js +40 -12
  40. package/es/toolbar/src/toolbar.js +20 -28
  41. package/es/ui/index.js +1 -1
  42. package/es/ui/src/log.js +1 -1
  43. package/lib/grid/src/grid.js +126 -143
  44. package/lib/grid/src/grid.min.js +1 -1
  45. package/lib/index.umd.js +1046 -678
  46. package/lib/index.umd.min.js +1 -1
  47. package/lib/locale/lang/ar-EG.js +3 -0
  48. package/lib/locale/lang/ar-EG.min.js +1 -1
  49. package/lib/locale/lang/de-DE.js +3 -0
  50. package/lib/locale/lang/de-DE.min.js +1 -1
  51. package/lib/locale/lang/en-US.js +3 -0
  52. package/lib/locale/lang/en-US.min.js +1 -1
  53. package/lib/locale/lang/en-US.umd.js +3 -0
  54. package/lib/locale/lang/es-ES.js +3 -0
  55. package/lib/locale/lang/es-ES.min.js +1 -1
  56. package/lib/locale/lang/es-ES.umd.js +3 -0
  57. package/lib/locale/lang/fr-FR.js +3 -0
  58. package/lib/locale/lang/fr-FR.min.js +1 -1
  59. package/lib/locale/lang/hu-HU.js +3 -0
  60. package/lib/locale/lang/hu-HU.min.js +1 -1
  61. package/lib/locale/lang/hu-HU.umd.js +3 -0
  62. package/lib/locale/lang/hy-AM.js +3 -0
  63. package/lib/locale/lang/hy-AM.min.js +1 -1
  64. package/lib/locale/lang/id-ID.js +3 -0
  65. package/lib/locale/lang/id-ID.min.js +1 -1
  66. package/lib/locale/lang/it-IT.js +3 -0
  67. package/lib/locale/lang/it-IT.min.js +1 -1
  68. package/lib/locale/lang/ja-JP.js +3 -0
  69. package/lib/locale/lang/ja-JP.min.js +1 -1
  70. package/lib/locale/lang/ja-JP.umd.js +3 -0
  71. package/lib/locale/lang/ko-KR.js +3 -0
  72. package/lib/locale/lang/ko-KR.min.js +1 -1
  73. package/lib/locale/lang/ko-KR.umd.js +3 -0
  74. package/lib/locale/lang/nb-NO.js +3 -0
  75. package/lib/locale/lang/nb-NO.min.js +1 -1
  76. package/lib/locale/lang/pt-BR.js +3 -0
  77. package/lib/locale/lang/pt-BR.min.js +1 -1
  78. package/lib/locale/lang/pt-BR.umd.js +3 -0
  79. package/lib/locale/lang/ru-RU.js +3 -0
  80. package/lib/locale/lang/ru-RU.min.js +1 -1
  81. package/lib/locale/lang/ru-RU.umd.js +3 -0
  82. package/lib/locale/lang/th-TH.js +3 -0
  83. package/lib/locale/lang/th-TH.min.js +1 -1
  84. package/lib/locale/lang/ug-CN.js +3 -0
  85. package/lib/locale/lang/ug-CN.min.js +1 -1
  86. package/lib/locale/lang/uk-UA.js +3 -0
  87. package/lib/locale/lang/uk-UA.min.js +1 -1
  88. package/lib/locale/lang/uk-UA.umd.js +3 -0
  89. package/lib/locale/lang/vi-VN.js +3 -0
  90. package/lib/locale/lang/vi-VN.min.js +1 -1
  91. package/lib/locale/lang/zh-CHT.js +3 -0
  92. package/lib/locale/lang/zh-CHT.min.js +1 -1
  93. package/lib/locale/lang/zh-CHT.umd.js +3 -0
  94. package/lib/locale/lang/zh-CN.js +3 -0
  95. package/lib/locale/lang/zh-CN.min.js +1 -1
  96. package/lib/locale/lang/zh-CN.umd.js +3 -0
  97. package/lib/style.css +1 -1
  98. package/lib/table/module/custom/panel.js +31 -33
  99. package/lib/table/module/custom/panel.min.js +1 -1
  100. package/lib/table/module/edit/mixin.js +1 -1
  101. package/lib/table/module/edit/mixin.min.js +1 -1
  102. package/lib/table/module/export/export-panel.js +22 -24
  103. package/lib/table/module/export/export-panel.min.js +1 -1
  104. package/lib/table/module/export/import-panel.js +14 -16
  105. package/lib/table/module/export/import-panel.min.js +1 -1
  106. package/lib/table/module/export/mixin.js +15 -31
  107. package/lib/table/module/export/mixin.min.js +1 -1
  108. package/lib/table/module/keyboard/mixin.js +92 -27
  109. package/lib/table/module/keyboard/mixin.min.js +1 -1
  110. package/lib/table/module/validator/mixin.js +1 -3
  111. package/lib/table/module/validator/mixin.min.js +1 -1
  112. package/lib/table/render/index.js +98 -66
  113. package/lib/table/render/index.min.js +1 -1
  114. package/lib/table/src/body.js +12 -6
  115. package/lib/table/src/body.min.js +1 -1
  116. package/lib/table/src/column.js +3 -2
  117. package/lib/table/src/columnInfo.js +32 -34
  118. package/lib/table/src/columnInfo.min.js +1 -1
  119. package/lib/table/src/footer.js +7 -2
  120. package/lib/table/src/footer.min.js +1 -1
  121. package/lib/table/src/group.js +3 -2
  122. package/lib/table/src/methods.js +472 -230
  123. package/lib/table/src/methods.min.js +1 -1
  124. package/lib/table/src/props.js +4 -0
  125. package/lib/table/src/props.min.js +1 -1
  126. package/lib/table/src/table.js +42 -22
  127. package/lib/table/src/table.min.js +1 -1
  128. package/lib/table/src/util.js +44 -11
  129. package/lib/table/src/util.min.js +1 -1
  130. package/lib/toolbar/src/toolbar.js +21 -28
  131. package/lib/toolbar/src/toolbar.min.js +1 -1
  132. package/lib/ui/index.js +1 -1
  133. package/lib/ui/index.min.js +1 -1
  134. package/lib/ui/src/log.js +1 -1
  135. package/lib/ui/src/log.min.js +1 -1
  136. package/package.json +2 -2
  137. package/packages/grid/src/grid.ts +132 -122
  138. package/packages/locale/lang/ar-EG.ts +3 -0
  139. package/packages/locale/lang/de-DE.ts +3 -0
  140. package/packages/locale/lang/en-US.ts +3 -0
  141. package/packages/locale/lang/es-ES.ts +3 -0
  142. package/packages/locale/lang/fr-FR.ts +3 -0
  143. package/packages/locale/lang/hu-HU.ts +3 -0
  144. package/packages/locale/lang/hy-AM.ts +3 -0
  145. package/packages/locale/lang/id-ID.ts +3 -0
  146. package/packages/locale/lang/it-IT.ts +3 -0
  147. package/packages/locale/lang/ja-JP.ts +3 -0
  148. package/packages/locale/lang/ko-KR.ts +3 -0
  149. package/packages/locale/lang/nb-NO.ts +3 -0
  150. package/packages/locale/lang/pt-BR.ts +3 -0
  151. package/packages/locale/lang/ru-RU.ts +3 -0
  152. package/packages/locale/lang/th-TH.ts +3 -0
  153. package/packages/locale/lang/ug-CN.ts +3 -0
  154. package/packages/locale/lang/uk-UA.ts +3 -0
  155. package/packages/locale/lang/vi-VN.ts +3 -0
  156. package/packages/locale/lang/zh-CHT.ts +3 -0
  157. package/packages/locale/lang/zh-CN.ts +3 -0
  158. package/packages/table/module/custom/panel.ts +25 -27
  159. package/packages/table/module/edit/mixin.ts +1 -1
  160. package/packages/table/module/export/export-panel.ts +22 -24
  161. package/packages/table/module/export/import-panel.ts +14 -16
  162. package/packages/table/module/export/mixin.ts +15 -31
  163. package/packages/table/module/keyboard/mixin.ts +99 -28
  164. package/packages/table/module/validator/mixin.ts +1 -3
  165. package/packages/table/render/index.ts +89 -59
  166. package/packages/table/src/body.ts +12 -7
  167. package/packages/table/src/column.ts +2 -2
  168. package/packages/table/src/columnInfo.ts +30 -32
  169. package/packages/table/src/footer.ts +7 -2
  170. package/packages/table/src/group.ts +2 -2
  171. package/packages/table/src/methods.ts +474 -240
  172. package/packages/table/src/props.ts +16 -12
  173. package/packages/table/src/table.ts +50 -22
  174. package/packages/table/src/util.ts +43 -11
  175. package/packages/toolbar/src/toolbar.ts +20 -28
  176. /package/es/{iconfont.1740732119954.ttf → iconfont.1741664483219.ttf} +0 -0
  177. /package/es/{iconfont.1740732119954.woff → iconfont.1741664483219.woff} +0 -0
  178. /package/es/{iconfont.1740732119954.woff2 → iconfont.1741664483219.woff2} +0 -0
  179. /package/lib/{iconfont.1740732119954.ttf → iconfont.1741664483219.ttf} +0 -0
  180. /package/lib/{iconfont.1740732119954.woff → iconfont.1741664483219.woff} +0 -0
  181. /package/lib/{iconfont.1740732119954.woff2 → iconfont.1741664483219.woff2} +0 -0
@@ -66,9 +66,7 @@ function getFuncSlot($xeGrid, optSlots, slotKey) {
66
66
  return slots[funcSlot];
67
67
  }
68
68
  else {
69
- if (process.env.NODE_ENV === 'development') {
70
- errLog('vxe.error.notSlot', [funcSlot]);
71
- }
69
+ errLog('vxe.error.notSlot', [funcSlot]);
72
70
  }
73
71
  }
74
72
  else {
@@ -77,6 +75,26 @@ function getFuncSlot($xeGrid, optSlots, slotKey) {
77
75
  }
78
76
  return null;
79
77
  }
78
+ const getConfigSlot = ($xeGrid, slotConfigs) => {
79
+ const slots = $xeGrid.$scopedSlots;
80
+ const slotConf = {};
81
+ XEUtils.objectMap(slotConfigs, (slotFunc, slotKey) => {
82
+ if (slotFunc) {
83
+ if (XEUtils.isString(slotFunc)) {
84
+ if (slots[slotFunc]) {
85
+ slotConf[slotKey] = slots[slotFunc];
86
+ }
87
+ else {
88
+ errLog('vxe.error.notSlot', [slotFunc]);
89
+ }
90
+ }
91
+ else {
92
+ slotConf[slotKey] = slotFunc;
93
+ }
94
+ }
95
+ });
96
+ return slotConf;
97
+ };
80
98
  function getToolbarSlots(_vm) {
81
99
  const { $scopedSlots, toolbarOpts } = _vm;
82
100
  const toolbarOptSlots = toolbarOpts.slots;
@@ -103,24 +121,6 @@ function getToolbarSlots(_vm) {
103
121
  }
104
122
  return slots;
105
123
  }
106
- function getPagerSlots(_vm) {
107
- const { pagerOpts } = _vm;
108
- const pagerOptSlots = pagerOpts.slots;
109
- const slots = {};
110
- let leftSlot;
111
- let rightSlot;
112
- if (pagerOptSlots) {
113
- leftSlot = getFuncSlot(_vm, pagerOptSlots, 'left');
114
- rightSlot = getFuncSlot(_vm, pagerOptSlots, 'right');
115
- if (leftSlot) {
116
- slots.left = leftSlot;
117
- }
118
- if (rightSlot) {
119
- slots.right = rightSlot;
120
- }
121
- }
122
- return slots;
123
- }
124
124
  function getTableOns(_vm) {
125
125
  const { $listeners, proxyConfig, proxyOpts } = _vm;
126
126
  const ons = {};
@@ -139,6 +139,22 @@ function getTableOns(_vm) {
139
139
  }
140
140
  return ons;
141
141
  }
142
+ function pageChangeEvent($xeGrid, params) {
143
+ const props = $xeGrid;
144
+ const reactData = $xeGrid;
145
+ const { proxyConfig } = props;
146
+ const { tablePage } = reactData;
147
+ const { $event, currentPage, pageSize } = params;
148
+ const proxyOpts = $xeGrid.computeProxyOpts;
149
+ tablePage.currentPage = currentPage;
150
+ tablePage.pageSize = pageSize;
151
+ $xeGrid.dispatchEvent('page-change', params, $event);
152
+ if (proxyConfig && isEnableConf(proxyOpts)) {
153
+ $xeGrid.commitProxy('query').then((rest) => {
154
+ $xeGrid.dispatchEvent('proxy-query', rest, $event);
155
+ });
156
+ }
157
+ }
142
158
  /**
143
159
  * 渲染表单
144
160
  */
@@ -149,7 +165,7 @@ function renderForm(h, _vm) {
149
165
  if (hasForm) {
150
166
  return h('div', {
151
167
  key: 'form',
152
- ref: 'formWrapper',
168
+ ref: 'refFormWrapper',
153
169
  class: 'vxe-grid--form-wrapper'
154
170
  }, formSlot ? formSlot.call(_vm, { $grid: _vm }, h) : renderDefaultForm(h, _vm));
155
171
  }
@@ -165,7 +181,7 @@ function renderToolbar(h, _vm) {
165
181
  if (hasToolbar) {
166
182
  return h('div', {
167
183
  key: 'toolbar',
168
- ref: 'toolbarWrapper',
184
+ ref: 'refToolbarWrapper',
169
185
  class: 'vxe-grid--toolbar-wrapper'
170
186
  }, toolbarSlot
171
187
  ? toolbarSlot.call(_vm, { $grid: _vm }, h)
@@ -188,7 +204,7 @@ function renderTop(h, _vm) {
188
204
  return topSlot
189
205
  ? h('div', {
190
206
  key: 'top',
191
- ref: 'topWrapper',
207
+ ref: 'refTopWrapper',
192
208
  class: 'vxe-grid--top-wrapper'
193
209
  }, topSlot.call(_vm, { $grid: _vm }, h))
194
210
  : _e();
@@ -239,7 +255,7 @@ function renderBottom(h, _vm) {
239
255
  return bottomSlot
240
256
  ? h('div', {
241
257
  key: 'bottom',
242
- ref: 'bottomWrapper',
258
+ ref: 'refBottomWrapper',
243
259
  class: 'vxe-grid--bottom-wrapper'
244
260
  }, bottomSlot.call(_vm, { $grid: _vm }, h))
245
261
  : _e();
@@ -250,25 +266,30 @@ function renderBottom(h, _vm) {
250
266
  function renderPager(h, $xeGrid) {
251
267
  const VxeUIPagerComponent = VxeUI.getComponent('VxePager');
252
268
  const props = $xeGrid;
253
- const { pagerConfig, proxyConfig } = props;
254
- const { $scopedSlots, tablePage } = $xeGrid;
255
- const pagerSlot = $scopedSlots.pager;
256
- const hasPager = !!(pagerSlot || isEnableConf(pagerConfig));
257
- if (hasPager) {
269
+ const slots = $xeGrid.$scopedSlots;
270
+ const reactData = $xeGrid;
271
+ const { proxyConfig, pagerConfig } = props;
272
+ const proxyOpts = $xeGrid.computeProxyOpts;
273
+ const pagerOpts = $xeGrid.computePagerOpts;
274
+ const pagerSlot = slots.pager;
275
+ if ((pagerConfig && isEnableConf(pagerOpts)) || slots.pager) {
258
276
  return h('div', {
277
+ ref: 'refPagerWrapper',
259
278
  key: 'pager',
260
- ref: 'pagerWrapper',
261
279
  class: 'vxe-grid--pager-wrapper'
262
280
  }, pagerSlot
263
- ? pagerSlot.call($xeGrid, { $grid: $xeGrid }, h)
281
+ ? pagerSlot.call($xeGrid, { $grid: $xeGrid })
264
282
  : [
265
283
  VxeUIPagerComponent
266
284
  ? h(VxeUIPagerComponent, {
267
- props: Object.assign(Object.assign({}, $xeGrid.pagerOpts), (proxyConfig ? tablePage : {})),
285
+ ref: 'refPager',
286
+ props: Object.assign(Object.assign({}, pagerOpts), (proxyConfig && isEnableConf(proxyOpts) ? reactData.tablePage : {})),
268
287
  on: {
269
- 'page-change': $xeGrid.pageChangeEvent
288
+ 'page-change'(params) {
289
+ pageChangeEvent($xeGrid, params);
290
+ }
270
291
  },
271
- scopedSlots: getPagerSlots($xeGrid)
292
+ scopedSlots: getConfigSlot($xeGrid, pagerOpts.slots)
272
293
  })
273
294
  : renderEmptyElement($xeGrid)
274
295
  ]);
@@ -542,23 +563,21 @@ export default {
542
563
  // warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
543
564
  // }
544
565
  }
545
- if (process.env.NODE_ENV === 'development') {
546
- // 使用已安装的组件,如果未安装则不渲染
547
- const VxeUIFormComponent = VxeUI.getComponent('VxeForm');
548
- const VxeUIPagerComponent = VxeUI.getComponent('VxePager');
549
- $xeGrid.$nextTick(() => {
550
- if (props.formConfig) {
551
- if (!VxeUIFormComponent) {
552
- errLog('vxe.error.reqComp', ['vxe-form']);
553
- }
566
+ // 使用已安装的组件,如果未安装则不渲染
567
+ const VxeUIFormComponent = VxeUI.getComponent('VxeForm');
568
+ const VxeUIPagerComponent = VxeUI.getComponent('VxePager');
569
+ $xeGrid.$nextTick(() => {
570
+ if (props.formConfig) {
571
+ if (!VxeUIFormComponent) {
572
+ errLog('vxe.error.reqComp', ['vxe-form']);
554
573
  }
555
- if (props.pagerConfig) {
556
- if (!VxeUIPagerComponent) {
557
- errLog('vxe.error.reqComp', ['vxe-pager']);
558
- }
574
+ }
575
+ if (props.pagerConfig) {
576
+ if (!VxeUIPagerComponent) {
577
+ errLog('vxe.error.reqComp', ['vxe-pager']);
559
578
  }
560
- });
561
- }
579
+ }
580
+ });
562
581
  this.initPages();
563
582
  globalEvents.on(this, 'keydown', this.handleGlobalKeydownEvent);
564
583
  },
@@ -579,6 +598,7 @@ export default {
579
598
  const vSize = $xeGrid.computeSize;
580
599
  const styles = $xeGrid.computeStyles;
581
600
  return h('div', {
601
+ ref: 'refElem',
582
602
  class: ['vxe-grid', {
583
603
  [`size--${vSize}`]: vSize,
584
604
  'is--animat': !!this.animat,
@@ -601,18 +621,39 @@ export default {
601
621
  }
602
622
  return [];
603
623
  },
604
- getParentHeight() {
605
- const { $el, isZMax } = this;
606
- return (isZMax ? getDomNode().visibleHeight : XEUtils.toNumber(getComputedStyle($el.parentNode).height)) - this.getExcludeHeight();
624
+ getEl() {
625
+ const $xeGrid = this;
626
+ return $xeGrid.$refs.refElem;
607
627
  },
608
628
  /**
609
629
  * 获取需要排除的高度
610
630
  */
611
631
  getExcludeHeight() {
612
- const { $refs, $el, isZMax, height } = this;
613
- const { formWrapper, toolbarWrapper, topWrapper, bottomWrapper, pagerWrapper } = $refs;
614
- const parentPaddingSize = isZMax || !(height === 'auto' || height === '100%') ? 0 : getPaddingTopBottomSize($el.parentNode);
615
- return parentPaddingSize + getPaddingTopBottomSize($el) + getOffsetHeight(formWrapper) + getOffsetHeight(toolbarWrapper) + getOffsetHeight(topWrapper) + getOffsetHeight(bottomWrapper) + getOffsetHeight(pagerWrapper);
632
+ const $xeGrid = this;
633
+ const reactData = $xeGrid;
634
+ const { isZMax } = reactData;
635
+ const el = $xeGrid.$refs.refElem;
636
+ if (el) {
637
+ const formWrapper = $xeGrid.$refs.refFormWrapper;
638
+ const toolbarWrapper = $xeGrid.$refs.refToolbarWrapper;
639
+ const topWrapper = $xeGrid.$refs.refTopWrapper;
640
+ const bottomWrapper = $xeGrid.$refs.refBottomWrapper;
641
+ const pagerWrapper = $xeGrid.$refs.refPagerWrapper;
642
+ const parentEl = el.parentElement;
643
+ const parentPaddingSize = isZMax ? 0 : (parentEl ? getPaddingTopBottomSize(parentEl) : 0);
644
+ return parentPaddingSize + getPaddingTopBottomSize(el) + getOffsetHeight(formWrapper) + getOffsetHeight(toolbarWrapper) + getOffsetHeight(topWrapper) + getOffsetHeight(bottomWrapper) + getOffsetHeight(pagerWrapper);
645
+ }
646
+ return 0;
647
+ },
648
+ getParentHeight() {
649
+ const $xeGrid = this;
650
+ const reactData = $xeGrid;
651
+ const el = $xeGrid.$refs.refElem;
652
+ if (el) {
653
+ const parentEl = el.parentElement;
654
+ return (reactData.isZMax ? getDomNode().visibleHeight : (parentEl ? XEUtils.toNumber(getComputedStyle(parentEl).height) : 0)) - $xeGrid.getExcludeHeight();
655
+ }
656
+ return 0;
616
657
  },
617
658
  initToolbar() {
618
659
  this.$nextTick(() => {
@@ -841,9 +882,7 @@ export default {
841
882
  });
842
883
  }
843
884
  else {
844
- if (process.env.NODE_ENV === 'development') {
845
- errLog('vxe.error.notFunc', ['proxy-config.ajax.query']);
846
- }
885
+ errLog('vxe.error.notFunc', ['proxy-config.ajax.query']);
847
886
  }
848
887
  break;
849
888
  }
@@ -869,10 +908,8 @@ export default {
869
908
  $xeTable.setPendingRow(removeRecords, false);
870
909
  if (isRespMsg) {
871
910
  // 检测弹窗模块
872
- if (process.env.NODE_ENV === 'development') {
873
- if (!VxeUI.modal) {
874
- errLog('vxe.error.reqModule', ['Modal']);
875
- }
911
+ if (!VxeUI.modal) {
912
+ errLog('vxe.error.reqModule', ['Modal']);
876
913
  }
877
914
  VxeUI.modal.message({ content: this.getRespMsg(rest, 'vxe.grid.delSuccess'), status: 'success' });
878
915
  }
@@ -891,10 +928,8 @@ export default {
891
928
  this.tableLoading = false;
892
929
  if (isRespMsg) {
893
930
  // 检测弹窗模块
894
- if (process.env.NODE_ENV === 'development') {
895
- if (!VxeUI.modal) {
896
- errLog('vxe.error.reqModule', ['Modal']);
897
- }
931
+ if (!VxeUI.modal) {
932
+ errLog('vxe.error.reqModule', ['Modal']);
898
933
  }
899
934
  VxeUI.modal.message({ id: code, content: this.getRespMsg(rest, 'vxe.grid.operError'), status: 'error' });
900
935
  }
@@ -908,19 +943,15 @@ export default {
908
943
  else {
909
944
  if (isActiveMsg) {
910
945
  // 检测弹窗模块
911
- if (process.env.NODE_ENV === 'development') {
912
- if (!VxeUI.modal) {
913
- errLog('vxe.error.reqModule', ['Modal']);
914
- }
946
+ if (!VxeUI.modal) {
947
+ errLog('vxe.error.reqModule', ['Modal']);
915
948
  }
916
949
  VxeUI.modal.message({ id: code, content: getI18n('vxe.grid.selectOneRecord'), status: 'warning' });
917
950
  }
918
951
  }
919
952
  }
920
953
  else {
921
- if (process.env.NODE_ENV === 'development') {
922
- errLog('vxe.error.notFunc', ['proxy-config.ajax.delete']);
923
- }
954
+ errLog('vxe.error.notFunc', ['proxy-config.ajax.delete']);
924
955
  }
925
956
  break;
926
957
  }
@@ -959,10 +990,8 @@ export default {
959
990
  $xeTable.clearPendingRow();
960
991
  if (isRespMsg) {
961
992
  // 检测弹窗模块
962
- if (process.env.NODE_ENV === 'development') {
963
- if (!VxeUI.modal) {
964
- errLog('vxe.error.reqModule', ['Modal']);
965
- }
993
+ if (!VxeUI.modal) {
994
+ errLog('vxe.error.reqModule', ['Modal']);
966
995
  }
967
996
  VxeUI.modal.message({ content: this.getRespMsg(rest, 'vxe.grid.saveSuccess'), status: 'success' });
968
997
  }
@@ -981,10 +1010,8 @@ export default {
981
1010
  this.tableLoading = false;
982
1011
  if (isRespMsg) {
983
1012
  // 检测弹窗模块
984
- if (process.env.NODE_ENV === 'development') {
985
- if (!VxeUI.modal) {
986
- errLog('vxe.error.reqModule', ['Modal']);
987
- }
1013
+ if (!VxeUI.modal) {
1014
+ errLog('vxe.error.reqModule', ['Modal']);
988
1015
  }
989
1016
  VxeUI.modal.message({ id: code, content: this.getRespMsg(rest, 'vxe.grid.operError'), status: 'error' });
990
1017
  }
@@ -997,10 +1024,8 @@ export default {
997
1024
  else {
998
1025
  if (isActiveMsg) {
999
1026
  // 检测弹窗模块
1000
- if (process.env.NODE_ENV === 'development') {
1001
- if (!VxeUI.modal) {
1002
- errLog('vxe.error.reqModule', ['Modal']);
1003
- }
1027
+ if (!VxeUI.modal) {
1028
+ errLog('vxe.error.reqModule', ['Modal']);
1004
1029
  }
1005
1030
  VxeUI.modal.message({ id: code, content: getI18n('vxe.grid.dataUnchanged'), status: 'info' });
1006
1031
  }
@@ -1008,9 +1033,7 @@ export default {
1008
1033
  });
1009
1034
  }
1010
1035
  else {
1011
- if (process.env.NODE_ENV === 'development') {
1012
- errLog('vxe.error.notFunc', ['proxy-config.ajax.save']);
1013
- }
1036
+ errLog('vxe.error.notFunc', ['proxy-config.ajax.save']);
1014
1037
  }
1015
1038
  break;
1016
1039
  }
@@ -1021,9 +1044,7 @@ export default {
1021
1044
  gCommandOpts.commandMethod({ code, button, $grid: this, $table: $xeTable }, ...args);
1022
1045
  }
1023
1046
  else {
1024
- if (process.env.NODE_ENV === 'development') {
1025
- errLog('vxe.error.notCommands', [code]);
1026
- }
1047
+ errLog('vxe.error.notCommands', [code]);
1027
1048
  }
1028
1049
  }
1029
1050
  }
@@ -1051,10 +1072,8 @@ export default {
1051
1072
  }
1052
1073
  else {
1053
1074
  // 检测弹窗模块
1054
- if (process.env.NODE_ENV === 'development') {
1055
- if (!VxeUI.modal) {
1056
- errLog('vxe.error.reqModule', ['Modal']);
1057
- }
1075
+ if (!VxeUI.modal) {
1076
+ errLog('vxe.error.reqModule', ['Modal']);
1058
1077
  }
1059
1078
  VxeUI.modal.message({ id: `msg_${code}`, content: getI18n('vxe.grid.selectOneRecord'), status: 'warning' });
1060
1079
  }
@@ -1104,27 +1123,13 @@ export default {
1104
1123
  else {
1105
1124
  if (isActiveMsg) {
1106
1125
  // 检测弹窗模块
1107
- if (process.env.NODE_ENV === 'development') {
1108
- if (!VxeUI.modal) {
1109
- errLog('vxe.error.reqModule', ['Modal']);
1110
- }
1126
+ if (!VxeUI.modal) {
1127
+ errLog('vxe.error.reqModule', ['Modal']);
1111
1128
  }
1112
1129
  VxeUI.modal.message({ id: code, content: getI18n('vxe.grid.selectOneRecord'), status: 'warning' });
1113
1130
  }
1114
1131
  }
1115
1132
  },
1116
- pageChangeEvent(params) {
1117
- const { proxyConfig, tablePage } = this;
1118
- const { currentPage, pageSize } = params;
1119
- tablePage.currentPage = currentPage;
1120
- tablePage.pageSize = pageSize;
1121
- this.$emit('page-change', Object.assign({ $grid: this }, params));
1122
- if (proxyConfig) {
1123
- this.commitProxy('query').then((rest) => {
1124
- this.$emit('proxy-query', Object.assign(Object.assign({}, rest), { $grid: this, $event: params.$event }));
1125
- });
1126
- }
1127
- },
1128
1133
  sortChangeEvent(params) {
1129
1134
  const { $table, column, sortList } = params;
1130
1135
  const isRemote = XEUtils.isBoolean(column.remoteSort) ? column.remoteSort : $table.sortOpts.remote;
@@ -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: 'rechts eingefroren',
238
238
  cancelFixed: 'Spalte freigeben'
239
239
  },
240
+ datePicker: {
241
+ yearTitle: '{0} Jahre'
242
+ },
240
243
  input: {
241
244
  date: {
242
245
  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 月',