vxe-table 3.15.28 → 3.15.30

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 (63) hide show
  1. package/es/grid/src/grid.js +39 -42
  2. package/es/index.css +1 -1
  3. package/es/index.min.css +1 -1
  4. package/es/style.css +1 -1
  5. package/es/style.min.css +1 -1
  6. package/es/table/module/edit/mixin.js +11 -27
  7. package/es/table/module/export/mixin.js +65 -139
  8. package/es/table/module/filter/mixin.js +1 -0
  9. package/es/table/module/menu/mixin.js +2 -6
  10. package/es/table/module/validator/mixin.js +99 -41
  11. package/es/table/src/methods.js +110 -89
  12. package/es/table/src/table.js +6 -8
  13. package/es/table/style.css +6 -0
  14. package/es/table/style.min.css +1 -1
  15. package/es/ui/index.js +1 -1
  16. package/es/ui/src/log.js +1 -1
  17. package/es/vxe-table/style.css +6 -0
  18. package/es/vxe-table/style.min.css +1 -1
  19. package/lib/grid/src/grid.js +24 -26
  20. package/lib/grid/src/grid.min.js +1 -1
  21. package/lib/index.css +1 -1
  22. package/lib/index.min.css +1 -1
  23. package/lib/index.umd.js +358 -615
  24. package/lib/index.umd.min.js +1 -1
  25. package/lib/style.css +1 -1
  26. package/lib/style.min.css +1 -1
  27. package/lib/table/module/edit/mixin.js +11 -27
  28. package/lib/table/module/edit/mixin.min.js +1 -1
  29. package/lib/table/module/export/mixin.js +78 -168
  30. package/lib/table/module/export/mixin.min.js +1 -1
  31. package/lib/table/module/filter/mixin.js +1 -0
  32. package/lib/table/module/menu/mixin.js +2 -6
  33. package/lib/table/module/menu/mixin.min.js +1 -1
  34. package/lib/table/module/validator/mixin.js +97 -40
  35. package/lib/table/module/validator/mixin.min.js +1 -1
  36. package/lib/table/src/methods.js +121 -95
  37. package/lib/table/src/methods.min.js +1 -1
  38. package/lib/table/src/table.js +8 -10
  39. package/lib/table/src/table.min.js +1 -1
  40. package/lib/table/style/style.css +6 -0
  41. package/lib/table/style/style.min.css +1 -1
  42. package/lib/ui/index.js +1 -1
  43. package/lib/ui/index.min.js +1 -1
  44. package/lib/ui/src/log.js +1 -1
  45. package/lib/ui/src/log.min.js +1 -1
  46. package/lib/vxe-table/style/style.css +6 -0
  47. package/lib/vxe-table/style/style.min.css +1 -1
  48. package/package.json +1 -1
  49. package/packages/grid/src/grid.ts +39 -41
  50. package/packages/table/module/edit/mixin.ts +11 -27
  51. package/packages/table/module/export/mixin.ts +96 -158
  52. package/packages/table/module/filter/mixin.ts +1 -0
  53. package/packages/table/module/menu/mixin.ts +2 -6
  54. package/packages/table/module/validator/mixin.ts +101 -40
  55. package/packages/table/src/methods.ts +115 -90
  56. package/packages/table/src/table.ts +6 -8
  57. package/styles/components/table.scss +14 -0
  58. /package/es/{iconfont.1747176212818.ttf → iconfont.1747357311626.ttf} +0 -0
  59. /package/es/{iconfont.1747176212818.woff → iconfont.1747357311626.woff} +0 -0
  60. /package/es/{iconfont.1747176212818.woff2 → iconfont.1747357311626.woff2} +0 -0
  61. /package/lib/{iconfont.1747176212818.ttf → iconfont.1747357311626.ttf} +0 -0
  62. /package/lib/{iconfont.1747176212818.woff → iconfont.1747357311626.woff} +0 -0
  63. /package/lib/{iconfont.1747176212818.woff2 → iconfont.1747357311626.woff2} +0 -0
@@ -101,13 +101,11 @@ function getToolbarSlots(_vm) {
101
101
  let buttonsSlot;
102
102
  let toolsSlot;
103
103
  const slots = {};
104
- if (process.env.NODE_ENV === 'development') {
105
- if ($scopedSlots.buttons && (!toolbarOptSlots || toolbarOptSlots.buttons !== 'buttons')) {
106
- warnLog('vxe.error.reqProp', ['toolbar-config.slots.buttons']);
107
- }
108
- if ($scopedSlots.tools && (!toolbarOptSlots || toolbarOptSlots.tools !== 'tools')) {
109
- warnLog('vxe.error.reqProp', ['toolbar-config.slots.tools']);
110
- }
104
+ if ($scopedSlots.buttons && (!toolbarOptSlots || toolbarOptSlots.buttons !== 'buttons')) {
105
+ warnLog('vxe.error.reqProp', ['toolbar-config.slots.buttons']);
106
+ }
107
+ if ($scopedSlots.tools && (!toolbarOptSlots || toolbarOptSlots.tools !== 'tools')) {
108
+ warnLog('vxe.error.reqProp', ['toolbar-config.slots.tools']);
111
109
  }
112
110
  if (toolbarOptSlots) {
113
111
  buttonsSlot = getFuncSlot(_vm, toolbarOptSlots, 'buttons');
@@ -551,17 +549,15 @@ export default {
551
549
  // if (proxyConfig && (data || (proxyOpts.form && formOpts.data))) {
552
550
  // errLog('vxe.error.errConflicts', ['grid.data', 'grid.proxy-config'])
553
551
  // }
554
- if (process.env.NODE_ENV === 'development') {
555
- if (this.toolbar) {
556
- warnLog('vxe.error.delProp', ['grid.toolbar', 'grid.toolbar-config']);
557
- }
558
- if (this.toolbarConfig && !XEUtils.isObject(this.toolbarConfig)) {
559
- warnLog('vxe.error.errProp', [`grid.toolbar-config=${this.toolbarConfig}`, 'grid.toolbar-config={}']);
560
- }
561
- // if (proxyOpts.props) {
562
- // warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
563
- // }
552
+ if (this.toolbar) {
553
+ warnLog('vxe.error.delProp', ['grid.toolbar', 'grid.toolbar-config']);
554
+ }
555
+ if (this.toolbarConfig && !XEUtils.isObject(this.toolbarConfig)) {
556
+ warnLog('vxe.error.errProp', [`grid.toolbar-config=${this.toolbarConfig}`, 'grid.toolbar-config={}']);
564
557
  }
558
+ // if (proxyOpts.props) {
559
+ // warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
560
+ // }
565
561
  // 使用已安装的组件,如果未安装则不渲染
566
562
  const VxeUIFormComponent = VxeUI.getComponent('VxeForm');
567
563
  const VxeUIPagerComponent = VxeUI.getComponent('VxePager');
@@ -608,7 +604,7 @@ export default {
608
604
  style: styles
609
605
  }, renderLayout(h, $xeGrid));
610
606
  },
611
- methods: Object.assign(Object.assign(Object.assign({}, methods), { callSlot(slotFunc, params, h, vNodes) {
607
+ methods: Object.assign(Object.assign({}, methods), { callSlot(slotFunc, params, h, vNodes) {
612
608
  const $xeGrid = this;
613
609
  const slots = $xeGrid.$scopedSlots;
614
610
  if (slotFunc) {
@@ -1229,8 +1225,9 @@ export default {
1229
1225
  });
1230
1226
  },
1231
1227
  getProxyInfo() {
1232
- const { $refs, sortData, proxyConfig } = this;
1233
- const $xeTable = $refs.xTable;
1228
+ const $xeGrid = this;
1229
+ const $xeTable = $xeGrid.$refs.xTable;
1230
+ const { sortData, proxyConfig } = this;
1234
1231
  if (proxyConfig) {
1235
1232
  return {
1236
1233
  data: $xeTable ? $xeTable.getFullData() : [],
@@ -1243,27 +1240,27 @@ export default {
1243
1240
  };
1244
1241
  }
1245
1242
  return null;
1246
- } }), (process.env.NODE_ENV === 'development'
1247
- ? {
1248
- loadColumn(columns) {
1249
- const { $scopedSlots } = this;
1250
- XEUtils.eachTree(columns, column => {
1251
- if (column.slots) {
1252
- XEUtils.each(column.slots, (func) => {
1253
- if (!XEUtils.isFunction(func)) {
1254
- if (!$scopedSlots[func]) {
1255
- errLog('vxe.error.notSlot', [func]);
1256
- }
1243
+ },
1244
+ loadColumn(columns) {
1245
+ const $xeGrid = this;
1246
+ const $xeTable = $xeGrid.$refs.xTable;
1247
+ const { $scopedSlots } = this;
1248
+ XEUtils.eachTree(columns, column => {
1249
+ if (column.slots) {
1250
+ XEUtils.each(column.slots, (func) => {
1251
+ if (!XEUtils.isFunction(func)) {
1252
+ if (!$scopedSlots[func]) {
1253
+ errLog('vxe.error.notSlot', [func]);
1257
1254
  }
1258
- });
1259
- }
1260
- });
1261
- return this.$refs.xTable.loadColumn(columns);
1262
- },
1263
- reloadColumn(columns) {
1264
- this.clearAll();
1265
- return this.loadColumn(columns);
1266
- }
1267
- }
1268
- : null))
1255
+ }
1256
+ });
1257
+ }
1258
+ });
1259
+ return $xeTable.loadColumn(columns);
1260
+ },
1261
+ reloadColumn(columns) {
1262
+ const $xeGrid = this;
1263
+ $xeGrid.clearAll();
1264
+ return $xeGrid.loadColumn(columns);
1265
+ } })
1269
1266
  };