vxe-table 3.7.0-beta.6 → 3.7.0-beta.7

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 (114) hide show
  1. package/README.md +4 -8
  2. package/lib/filter/src/mixin.js +13 -7
  3. package/lib/filter/src/mixin.min.js +1 -1
  4. package/lib/form/src/form.js +24 -4
  5. package/lib/form/src/form.min.js +1 -1
  6. package/lib/grid/src/grid.js +7 -3
  7. package/lib/grid/src/grid.min.js +1 -1
  8. package/lib/icon/style/style.css +1 -1
  9. package/lib/icon/style/style.min.css +1 -1
  10. package/lib/index.css +1 -1
  11. package/lib/index.umd.js +349 -89
  12. package/lib/index.umd.min.js +1 -1
  13. package/lib/input/src/input.js +6 -1
  14. package/lib/input/src/input.min.js +1 -1
  15. package/lib/locale/lang/en-US.js +7 -0
  16. package/lib/locale/lang/en-US.min.js +1 -1
  17. package/lib/locale/lang/en-US.umd.js +7 -0
  18. package/lib/locale/lang/es-ES.js +7 -0
  19. package/lib/locale/lang/es-ES.min.js +1 -1
  20. package/lib/locale/lang/es-ES.umd.js +7 -0
  21. package/lib/locale/lang/ja-JP.js +7 -0
  22. package/lib/locale/lang/ja-JP.min.js +1 -1
  23. package/lib/locale/lang/ja-JP.umd.js +7 -0
  24. package/lib/locale/lang/zh-CN.js +7 -0
  25. package/lib/locale/lang/zh-CN.min.js +1 -1
  26. package/lib/locale/lang/zh-CN.umd.js +7 -0
  27. package/lib/locale/lang/zh-HK.min.js +1 -1
  28. package/lib/locale/lang/zh-HK.umd.js +7 -0
  29. package/lib/locale/lang/zh-MO.min.js +1 -1
  30. package/lib/locale/lang/zh-MO.umd.js +7 -0
  31. package/lib/locale/lang/zh-TC.js +7 -0
  32. package/lib/locale/lang/zh-TC.min.js +1 -1
  33. package/lib/locale/lang/zh-TC.umd.js +7 -0
  34. package/lib/locale/lang/zh-TW.min.js +1 -1
  35. package/lib/locale/lang/zh-TW.umd.js +7 -0
  36. package/lib/menu/src/mixin.js +3 -3
  37. package/lib/menu/src/mixin.min.js +1 -1
  38. package/lib/select/src/select.js +6 -1
  39. package/lib/select/src/select.min.js +1 -1
  40. package/lib/style.css +1 -1
  41. package/lib/style.min.css +1 -1
  42. package/lib/table/src/cell.js +2 -0
  43. package/lib/table/src/cell.min.js +1 -1
  44. package/lib/table/src/columnInfo.js +6 -6
  45. package/lib/table/src/columnInfo.min.js +1 -1
  46. package/lib/table/src/methods.js +43 -16
  47. package/lib/table/src/methods.min.js +1 -1
  48. package/lib/table/src/table.js +11 -24
  49. package/lib/table/src/table.min.js +1 -1
  50. package/lib/table/style/style.css +2 -2
  51. package/lib/table/style/style.min.css +1 -1
  52. package/lib/textarea/src/textarea.js +6 -1
  53. package/lib/textarea/src/textarea.min.js +1 -1
  54. package/lib/toolbar/src/toolbar.js +18 -6
  55. package/lib/toolbar/src/toolbar.min.js +1 -1
  56. package/lib/tools/log.js +1 -1
  57. package/lib/tools/log.min.js +1 -1
  58. package/lib/v-x-e-table/index.js +3 -1
  59. package/lib/v-x-e-table/index.min.js +1 -1
  60. package/lib/v-x-e-table/src/commands.js +58 -2
  61. package/lib/v-x-e-table/src/commands.min.js +1 -1
  62. package/lib/v-x-e-table/src/conf.js +4 -1
  63. package/lib/v-x-e-table/src/conf.min.js +1 -1
  64. package/lib/v-x-e-table/src/formats.js +58 -2
  65. package/lib/v-x-e-table/src/formats.min.js +1 -1
  66. package/lib/v-x-e-table/src/menus.js +58 -2
  67. package/lib/v-x-e-table/src/menus.min.js +1 -1
  68. package/lib/v-x-e-table/src/store.js +5 -2
  69. package/lib/v-x-e-table/src/store.min.js +1 -1
  70. package/lib/v-x-e-table/src/validators.js +15 -0
  71. package/lib/v-x-e-table/src/validators.min.js +1 -0
  72. package/lib/validator/src/mixin.js +26 -4
  73. package/lib/validator/src/mixin.min.js +1 -1
  74. package/package.json +2 -2
  75. package/packages/filter/src/mixin.js +5 -1
  76. package/packages/form/src/form.js +24 -5
  77. package/packages/grid/src/grid.js +7 -3
  78. package/packages/input/src/input.js +4 -1
  79. package/packages/locale/lang/en-US.js +7 -0
  80. package/packages/locale/lang/es-ES.js +7 -0
  81. package/packages/locale/lang/ja-JP.js +7 -0
  82. package/packages/locale/lang/zh-CN.js +7 -0
  83. package/packages/locale/lang/zh-TC.js +7 -0
  84. package/packages/menu/src/mixin.js +3 -3
  85. package/packages/select/src/select.js +4 -1
  86. package/packages/table/src/cell.js +2 -0
  87. package/packages/table/src/columnInfo.js +6 -6
  88. package/packages/table/src/methods.js +36 -15
  89. package/packages/table/src/table.js +5 -1
  90. package/packages/textarea/src/textarea.js +4 -1
  91. package/packages/toolbar/src/toolbar.js +18 -6
  92. package/packages/v-x-e-table/index.js +2 -0
  93. package/packages/v-x-e-table/src/commands.js +48 -2
  94. package/packages/v-x-e-table/src/conf.js +4 -1
  95. package/packages/v-x-e-table/src/formats.js +48 -2
  96. package/packages/v-x-e-table/src/menus.js +48 -2
  97. package/packages/v-x-e-table/src/store.js +4 -2
  98. package/packages/v-x-e-table/src/validators.js +7 -0
  99. package/packages/validator/src/mixin.js +25 -4
  100. package/styles/table.scss +2 -2
  101. package/types/form.d.ts +14 -12
  102. package/types/table.d.ts +4 -0
  103. package/types/v-x-e-table/commands.d.ts +21 -13
  104. package/types/v-x-e-table/formats.d.ts +19 -12
  105. package/types/v-x-e-table/index.d.ts +7 -1
  106. package/types/v-x-e-table/menus.d.ts +17 -6
  107. package/types/v-x-e-table/validators.d.ts +30 -0
  108. package/types/validator.d.ts +15 -4
  109. /package/lib/icon/style/{iconfont.1689639571797.ttf → iconfont.1690156580206.ttf} +0 -0
  110. /package/lib/icon/style/{iconfont.1689639571797.woff → iconfont.1690156580206.woff} +0 -0
  111. /package/lib/icon/style/{iconfont.1689639571797.woff2 → iconfont.1690156580206.woff2} +0 -0
  112. /package/lib/{iconfont.1689639571797.ttf → iconfont.1690156580206.ttf} +0 -0
  113. /package/lib/{iconfont.1689639571797.woff → iconfont.1690156580206.woff} +0 -0
  114. /package/lib/{iconfont.1689639571797.woff2 → iconfont.1690156580206.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -10677,6 +10677,7 @@ var iconPrefix = 'vxe-icon-';
10677
10677
  animat: true,
10678
10678
  delayHover: 250,
10679
10679
  autoResize: true,
10680
+ minHeight: 144,
10680
10681
  // keepSource: false,
10681
10682
  // showOverflow: null,
10682
10683
  // showHeaderOverflow: null,
@@ -10710,7 +10711,9 @@ var iconPrefix = 'vxe-icon-';
10710
10711
  },
10711
10712
  validConfig: {
10712
10713
  showMessage: true,
10713
- message: 'default'
10714
+ autoClear: true,
10715
+ message: 'inline',
10716
+ msgMode: 'single'
10714
10717
  },
10715
10718
  columnConfig: {
10716
10719
  maxFixedSize: 4
@@ -11042,7 +11045,7 @@ var es_array_concat = __webpack_require__(2222);
11042
11045
 
11043
11046
 
11044
11047
  function getLog(message, params) {
11045
- return "[vxe-table v".concat("3.7.0-beta.5", "] ").concat(conf.i18n(message, params));
11048
+ return "[vxe-table v".concat("3.7.0-beta.6", "] ").concat(conf.i18n(message, params));
11046
11049
  }
11047
11050
  function outLog(type) {
11048
11051
  return function (message, params) {
@@ -12056,8 +12059,181 @@ var renderer = {
12056
12059
  var es_array_includes = __webpack_require__(6699);
12057
12060
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js
12058
12061
  var es_string_includes = __webpack_require__(2023);
12059
- ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/store.js
12062
+ ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/commands.js
12063
+
12064
+
12065
+
12066
+
12067
+
12068
+
12069
+
12070
+
12071
+
12072
+
12073
+ var VXECommandsStore = /*#__PURE__*/function () {
12074
+ function VXECommandsStore() {
12075
+ _classCallCheck(this, VXECommandsStore);
12076
+ this.store = {};
12077
+ }
12078
+ _createClass(VXECommandsStore, [{
12079
+ key: "mixin",
12080
+ value: function mixin(options) {
12081
+ var _this = this;
12082
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(options, function (item, key) {
12083
+ _this.add(key, item);
12084
+ });
12085
+ return VXECommandsStore;
12086
+ }
12087
+ }, {
12088
+ key: "get",
12089
+ value: function get(name) {
12090
+ return this.store[name];
12091
+ }
12092
+ }, {
12093
+ key: "add",
12094
+ value: function add(name, render) {
12095
+ var conf = this.store[name];
12096
+ // 兼容
12097
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(render)) {
12098
+ // warnLog('vxe.error.delProp', ['callback', 'commandMethod'])
12099
+ render = {
12100
+ commandMethod: render
12101
+ };
12102
+ }
12103
+
12104
+ // 检测是否覆盖
12105
+ if (false) { var confKeys; }
12106
+ this.store[name] = conf ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().merge(conf, render) : render;
12107
+ return VXECommandsStore;
12108
+ }
12109
+ }, {
12110
+ key: "delete",
12111
+ value: function _delete(name) {
12112
+ delete this.store[name];
12113
+ return VXECommandsStore;
12114
+ }
12115
+ }]);
12116
+ return VXECommandsStore;
12117
+ }();
12118
+ var commands = new VXECommandsStore();
12119
+ if (false) {}
12120
+ ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/menus.js
12121
+
12122
+
12123
+
12124
+
12125
+
12126
+
12127
+
12128
+
12129
+
12130
+
12131
+ var VXEMenusStore = /*#__PURE__*/function () {
12132
+ function VXEMenusStore() {
12133
+ _classCallCheck(this, VXEMenusStore);
12134
+ this.store = {};
12135
+ }
12136
+ _createClass(VXEMenusStore, [{
12137
+ key: "mixin",
12138
+ value: function mixin(options) {
12139
+ var _this = this;
12140
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(options, function (item, key) {
12141
+ _this.add(key, item);
12142
+ });
12143
+ return VXEMenusStore;
12144
+ }
12145
+ }, {
12146
+ key: "get",
12147
+ value: function get(name) {
12148
+ return this.store[name];
12149
+ }
12150
+ }, {
12151
+ key: "add",
12152
+ value: function add(name, render) {
12153
+ var conf = this.store[name];
12154
+ // 兼容
12155
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(render)) {
12156
+ // warnLog('vxe.error.delProp', ['callback', 'menuMethod'])
12157
+ render = {
12158
+ menuMethod: render
12159
+ };
12160
+ }
12161
+
12162
+ // 检测是否覆盖
12163
+ if (false) { var confKeys; }
12164
+ this.store[name] = conf ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().merge(conf, render) : render;
12165
+ return VXEMenusStore;
12166
+ }
12167
+ }, {
12168
+ key: "delete",
12169
+ value: function _delete(name) {
12170
+ delete this.store[name];
12171
+ return VXEMenusStore;
12172
+ }
12173
+ }]);
12174
+ return VXEMenusStore;
12175
+ }();
12176
+ var menus = new VXEMenusStore();
12177
+ if (false) {}
12178
+ ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/formats.js
12179
+
12180
+
12181
+
12182
+
12183
+
12184
+
12185
+
12186
+
12187
+
12188
+
12189
+ var VXEFormatsStore = /*#__PURE__*/function () {
12190
+ function VXEFormatsStore() {
12191
+ _classCallCheck(this, VXEFormatsStore);
12192
+ this.store = {};
12193
+ }
12194
+ _createClass(VXEFormatsStore, [{
12195
+ key: "mixin",
12196
+ value: function mixin(options) {
12197
+ var _this = this;
12198
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(options, function (item, key) {
12199
+ _this.add(key, item);
12200
+ });
12201
+ return VXEFormatsStore;
12202
+ }
12203
+ }, {
12204
+ key: "get",
12205
+ value: function get(name) {
12206
+ return this.store[name];
12207
+ }
12208
+ }, {
12209
+ key: "add",
12210
+ value: function add(name, render) {
12211
+ var conf = this.store[name];
12212
+ // 兼容
12213
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(render)) {
12214
+ // warnLog('vxe.error.delProp', ['callback', 'formatMethod'])
12215
+ render = {
12216
+ formatMethod: render
12217
+ };
12218
+ }
12060
12219
 
12220
+ // 检测是否覆盖
12221
+ if (false) { var confKeys; }
12222
+ this.store[name] = conf ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().merge(conf, render) : render;
12223
+ return VXEFormatsStore;
12224
+ }
12225
+ }, {
12226
+ key: "delete",
12227
+ value: function _delete(name) {
12228
+ delete this.store[name];
12229
+ return VXEFormatsStore;
12230
+ }
12231
+ }]);
12232
+ return VXEFormatsStore;
12233
+ }();
12234
+ var formats = new VXEFormatsStore();
12235
+ if (false) {}
12236
+ ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/store.js
12061
12237
 
12062
12238
 
12063
12239
 
@@ -12078,8 +12254,11 @@ var Store = /*#__PURE__*/function () {
12078
12254
  }
12079
12255
  _createClass(Store, [{
12080
12256
  key: "mixin",
12081
- value: function mixin(map) {
12082
- Object.assign(this.store, map);
12257
+ value: function mixin(options) {
12258
+ var _this = this;
12259
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(options, function (item, key) {
12260
+ _this.add(key, item);
12261
+ });
12083
12262
  return Store;
12084
12263
  }
12085
12264
  }, {
@@ -12106,20 +12285,10 @@ var Store = /*#__PURE__*/function () {
12106
12285
  return Store;
12107
12286
  }();
12108
12287
  /* harmony default export */ const store = (Store);
12109
- ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/commands.js
12110
-
12111
-
12112
- var commands = new store();
12113
- if (false) {}
12114
- ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/menus.js
12115
-
12116
-
12117
- var menus = new store();
12118
- if (false) {}
12119
- ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/formats.js
12288
+ ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/validators.js
12120
12289
 
12121
12290
 
12122
- var formats = new store();
12291
+ var validators = new store();
12123
12292
  if (false) {}
12124
12293
  ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/setup.js
12125
12294
 
@@ -12146,6 +12315,7 @@ function setup(options) {
12146
12315
 
12147
12316
 
12148
12317
 
12318
+
12149
12319
  var installedPlugins = [];
12150
12320
  function use(Plugin, options) {
12151
12321
  /* eslint-disable @typescript-eslint/no-use-before-define */
@@ -12229,7 +12399,7 @@ function _t(key, args) {
12229
12399
  var v = 'v3';
12230
12400
  var VXETable = {
12231
12401
  v: v,
12232
- version: "3.7.0-beta.5",
12402
+ version: "3.7.0-beta.6",
12233
12403
  reg: reg,
12234
12404
  use: use,
12235
12405
  setup: setup,
@@ -12238,6 +12408,7 @@ var VXETable = {
12238
12408
  commands: commands,
12239
12409
  formats: formats,
12240
12410
  menus: menus,
12411
+ validators: validators,
12241
12412
  config: config,
12242
12413
  t: t,
12243
12414
  _t: _t
@@ -12367,7 +12538,7 @@ var ColumnInfo = /*#__PURE__*/function () {
12367
12538
  var proxyOpts = $xegrid ? $xegrid.proxyOpts : null;
12368
12539
  var formatter = _vm.formatter;
12369
12540
  var visible = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(_vm.visible) ? _vm.visible : true;
12370
- if (false) { var _globalFunc, globalFunc, types; }
12541
+ if (false) { var _gFormatOpts, gFormatOpts, types; }
12371
12542
  Object.assign(this, {
12372
12543
  // 基本属性
12373
12544
  type: _vm.type,
@@ -15276,6 +15447,7 @@ var Cell = {
15276
15447
  },
15277
15448
  on: {
15278
15449
  click: function click(evnt) {
15450
+ evnt.stopPropagation();
15279
15451
  $table.triggerSortEvent(evnt, column, 'asc');
15280
15452
  }
15281
15453
  }
@@ -15288,6 +15460,7 @@ var Cell = {
15288
15460
  },
15289
15461
  on: {
15290
15462
  click: function click(evnt) {
15463
+ evnt.stopPropagation();
15291
15464
  $table.triggerSortEvent(evnt, column, 'desc');
15292
15465
  }
15293
15466
  }
@@ -17764,6 +17937,7 @@ var Methods = {
17764
17937
  },
17765
17938
  updateHeight: function updateHeight() {
17766
17939
  this.customHeight = calcHeight(this, 'height');
17940
+ this.customMinHeight = calcHeight(this, 'minHeight');
17767
17941
  this.customMaxHeight = calcHeight(this, 'maxHeight');
17768
17942
  },
17769
17943
  updateStyle: function updateStyle() {
@@ -17773,6 +17947,7 @@ var Methods = {
17773
17947
  fullColumnIdData = this.fullColumnIdData,
17774
17948
  tableColumn = this.tableColumn,
17775
17949
  customHeight = this.customHeight,
17950
+ customMinHeight = this.customMinHeight,
17776
17951
  customMaxHeight = this.customMaxHeight,
17777
17952
  border = this.border,
17778
17953
  headerHeight = this.headerHeight,
@@ -17881,15 +18056,22 @@ var Methods = {
17881
18056
  } else if (layout === 'body') {
17882
18057
  var emptyBlockElem = elemStore["".concat(name, "-").concat(layout, "-emptyBlock")];
17883
18058
  if (methods_isNodeElement(wrapperElem)) {
18059
+ var bodyMinHeight = fixedType ? customMinHeight - headerHeight - footerHeight - (showFooter ? 0 : scrollbarHeight) : customMinHeight - headerHeight - footerHeight;
18060
+ var bodyMaxHeight = 0;
17884
18061
  if (customMaxHeight) {
17885
- wrapperElem.style.maxHeight = "".concat(fixedType ? customMaxHeight - headerHeight - (showFooter ? 0 : scrollbarHeight) : customMaxHeight - headerHeight - footerHeight, "px");
17886
- } else {
17887
- if (customHeight > 0) {
17888
- wrapperElem.style.height = "".concat(fixedType ? (customHeight > 0 ? customHeight - headerHeight - footerHeight : tableHeight) - (showFooter ? 0 : scrollbarHeight) : customHeight - headerHeight - footerHeight, "px");
17889
- } else {
17890
- wrapperElem.style.height = '';
18062
+ bodyMaxHeight = Math.max(bodyMinHeight, fixedType ? customMaxHeight - headerHeight - (showFooter ? 0 : scrollbarHeight) : customMaxHeight - headerHeight - footerHeight);
18063
+ wrapperElem.style.maxHeight = "".concat(bodyMaxHeight, "px");
18064
+ }
18065
+ if (customHeight > 0) {
18066
+ var bodyHeight = fixedType ? (customHeight > 0 ? customHeight - headerHeight - footerHeight : tableHeight) - (showFooter ? 0 : scrollbarHeight) : customHeight - headerHeight - footerHeight;
18067
+ if (bodyMaxHeight) {
18068
+ bodyHeight = Math.min(bodyMaxHeight, bodyHeight);
17891
18069
  }
18070
+ wrapperElem.style.height = "".concat(Math.max(bodyMinHeight, bodyHeight), "px");
18071
+ } else {
18072
+ wrapperElem.style.height = '';
17892
18073
  }
18074
+ wrapperElem.style.minHeight = "".concat(bodyMinHeight, "px");
17893
18075
  }
17894
18076
 
17895
18077
  // 如果是固定列
@@ -19805,12 +19987,18 @@ var Methods = {
19805
19987
  });
19806
19988
  }
19807
19989
  var params = {
19990
+ $table: this,
19991
+ $event: evnt,
19808
19992
  column: column,
19809
19993
  field: field,
19810
19994
  property: field,
19811
19995
  order: column.order,
19812
- sortList: this.getSortColumns()
19996
+ sortList: this.getSortColumns(),
19997
+ sortTime: column.sortTime
19813
19998
  };
19999
+ if (this.mouseConfig && this.mouseOpts.area && this.handleSortEvent) {
20000
+ return this.handleSortEvent(evnt, params);
20001
+ }
19814
20002
  this.emitEvent('sort-change', params, evnt);
19815
20003
  }
19816
20004
  },
@@ -20066,7 +20254,19 @@ var Methods = {
20066
20254
  * @param {Boolean} expanded 是否展开
20067
20255
  */
20068
20256
  setAllRowExpand: function setAllRowExpand(expanded) {
20069
- return this.setRowExpand(this.expandOpts.lazy ? this.tableData : this.tableFullData, expanded);
20257
+ var treeConfig = this.treeConfig,
20258
+ treeOpts = this.treeOpts,
20259
+ tableFullData = this.tableFullData,
20260
+ tableFullTreeData = this.tableFullTreeData;
20261
+ var expandedRows = [];
20262
+ if (treeConfig) {
20263
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData, function (row) {
20264
+ expandedRows.push(row);
20265
+ }, treeOpts);
20266
+ } else {
20267
+ expandedRows = tableFullData;
20268
+ }
20269
+ return this.setRowExpand(expandedRows, expanded);
20070
20270
  },
20071
20271
  handleAsyncRowExpand: function handleAsyncRowExpand(row) {
20072
20272
  var _this44 = this;
@@ -20947,16 +21147,16 @@ var Methods = {
20947
21147
  * 如果组件值 v-model 发生 change 时,调用改函数用于更新某一列编辑状态
20948
21148
  * 如果单元格配置了校验规则,则会进行校验
20949
21149
  */
20950
- updateStatus: function updateStatus(scope, cellValue) {
21150
+ updateStatus: function updateStatus(slotParams, cellValue) {
20951
21151
  var _this57 = this;
20952
21152
  var customVal = !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(cellValue);
20953
21153
  return this.$nextTick().then(function () {
20954
21154
  var $refs = _this57.$refs,
20955
21155
  editRules = _this57.editRules,
20956
21156
  validStore = _this57.validStore;
20957
- if (scope && $refs.tableBody && editRules) {
20958
- var row = scope.row,
20959
- column = scope.column;
21157
+ if (slotParams && $refs.tableBody && editRules) {
21158
+ var row = slotParams.row,
21159
+ column = slotParams.column;
20960
21160
  var type = 'change';
20961
21161
  if (_this57.hasCellRules(type, row, column)) {
20962
21162
  var cell = _this57.getCell(row, column);
@@ -21147,11 +21347,11 @@ var Methods = {
21147
21347
  columnIndex: this.getColumnIndex(column)
21148
21348
  };
21149
21349
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(formatter)) {
21150
- var globalFunc = formats.get(formatter);
21151
- cellLabel = globalFunc ? globalFunc(formatParams) : '';
21350
+ var gFormatOpts = formats.get(formatter);
21351
+ cellLabel = gFormatOpts && gFormatOpts.formatMethod ? gFormatOpts.formatMethod(formatParams) : '';
21152
21352
  } else if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(formatter)) {
21153
- var _globalFunc = formats.get(formatter[0]);
21154
- cellLabel = _globalFunc ? _globalFunc.apply(void 0, [formatParams].concat(_toConsumableArray(formatter.slice(1)))) : '';
21353
+ var _gFormatOpts = formats.get(formatter[0]);
21354
+ cellLabel = _gFormatOpts && _gFormatOpts.formatMethod ? _gFormatOpts.formatMethod.apply(_gFormatOpts, [formatParams].concat(_toConsumableArray(formatter.slice(1)))) : '';
21155
21355
  } else {
21156
21356
  cellLabel = formatter(formatParams);
21157
21357
  }
@@ -21279,6 +21479,7 @@ var Loading = Object.assign(loading, {
21279
21479
 
21280
21480
 
21281
21481
 
21482
+
21282
21483
 
21283
21484
 
21284
21485
  /**
@@ -21369,6 +21570,13 @@ function handleUupdateResize(_vm) {
21369
21570
  data: Array,
21370
21571
  // 表格的高度
21371
21572
  height: [Number, String],
21573
+ // 表格的最小高度
21574
+ minHeight: {
21575
+ type: [Number, String],
21576
+ "default": function _default() {
21577
+ return conf.table.minHeight;
21578
+ }
21579
+ },
21372
21580
  // 表格的最大高度
21373
21581
  maxHeight: [Number, String],
21374
21582
  // 已废弃,被 column-config.resizable 替换
@@ -22288,6 +22496,7 @@ function handleUupdateResize(_vm) {
22288
22496
  this.preventEvent(null, 'destroyed');
22289
22497
  },
22290
22498
  render: function render(h) {
22499
+ var _ref;
22291
22500
  var _e = this._e,
22292
22501
  $scopedSlots = this.$scopedSlots,
22293
22502
  tId = this.tId,
@@ -22326,33 +22535,12 @@ function handleUupdateResize(_vm) {
22326
22535
  hasTip = this.hasTip,
22327
22536
  columnOpts = this.columnOpts,
22328
22537
  rowOpts = this.rowOpts,
22329
- loadingOpts = this.loadingOpts;
22538
+ loadingOpts = this.loadingOpts,
22539
+ editRules = this.editRules;
22330
22540
  var leftList = columnStore.leftList,
22331
22541
  rightList = columnStore.rightList;
22332
22542
  return h('div', {
22333
- "class": ['vxe-table', 'vxe-table--render-default', "tid_".concat(tId), vSize ? "size--".concat(vSize) : '', "border--".concat(tableBorder), {
22334
- 'vxe-editable': !!editConfig,
22335
- 'cell--highlight': highlightCell,
22336
- 'cell--selected': mouseConfig && mouseOpts.selected,
22337
- 'cell--area': mouseConfig && mouseOpts.area,
22338
- 'row--highlight': rowOpts.isHover || highlightHoverRow,
22339
- 'column--highlight': columnOpts.isHover || highlightHoverColumn,
22340
- 'is--header': showHeader,
22341
- 'is--footer': showFooter,
22342
- 'is--group': isGroup,
22343
- 'is--tree-line': treeConfig && treeOpts.line,
22344
- 'is--fixed-left': leftList.length,
22345
- 'is--fixed-right': rightList.length,
22346
- 'is--animat': !!this.animat,
22347
- 'is--round': this.round,
22348
- 'is--stripe': !treeConfig && stripe,
22349
- 'is--loading': loading,
22350
- 'is--empty': !loading && !tableData.length,
22351
- 'is--scroll-y': overflowY,
22352
- 'is--scroll-x': overflowX,
22353
- 'is--virtual-x': scrollXLoad,
22354
- 'is--virtual-y': scrollYLoad
22355
- }],
22543
+ "class": ['vxe-table', 'vxe-table--render-default', "tid_".concat(tId), vSize ? "size--".concat(vSize) : '', "border--".concat(tableBorder), (_ref = {}, _defineProperty(_ref, "vaild-msg--".concat(validOpts.msgMode), !!editRules), _defineProperty(_ref, 'vxe-editable', !!editConfig), _defineProperty(_ref, 'cell--highlight', highlightCell), _defineProperty(_ref, 'cell--selected', mouseConfig && mouseOpts.selected), _defineProperty(_ref, 'cell--area', mouseConfig && mouseOpts.area), _defineProperty(_ref, 'row--highlight', rowOpts.isHover || highlightHoverRow), _defineProperty(_ref, 'column--highlight', columnOpts.isHover || highlightHoverColumn), _defineProperty(_ref, 'is--header', showHeader), _defineProperty(_ref, 'is--footer', showFooter), _defineProperty(_ref, 'is--group', isGroup), _defineProperty(_ref, 'is--tree-line', treeConfig && treeOpts.line), _defineProperty(_ref, 'is--fixed-left', leftList.length), _defineProperty(_ref, 'is--fixed-right', rightList.length), _defineProperty(_ref, 'is--animat', !!this.animat), _defineProperty(_ref, 'is--round', this.round), _defineProperty(_ref, 'is--stripe', !treeConfig && stripe), _defineProperty(_ref, 'is--loading', loading), _defineProperty(_ref, 'is--empty', !loading && !tableData.length), _defineProperty(_ref, 'is--scroll-y', overflowY), _defineProperty(_ref, 'is--scroll-x', overflowX), _defineProperty(_ref, 'is--virtual-x', scrollXLoad), _defineProperty(_ref, 'is--virtual-y', scrollYLoad), _ref)],
22356
22544
  on: {
22357
22545
  keydown: this.keydownEvent
22358
22546
  }
@@ -22971,12 +23159,9 @@ var Table = Object.assign(table, {
22971
23159
  }
22972
23160
  });
22973
23161
  var filterList = this.getCheckedFilters();
22974
- // 如果是服务端筛选,则跳过本地筛选处理
22975
- if (!filterOpts.remote) {
22976
- this.handleTableData(true);
22977
- this.checkSelectionStatus();
22978
- }
22979
- this.emitEvent('filter-change', {
23162
+ var params = {
23163
+ $table: this,
23164
+ $event: evnt,
22980
23165
  column: column,
22981
23166
  field: field,
22982
23167
  property: field,
@@ -22984,7 +23169,16 @@ var Table = Object.assign(table, {
22984
23169
  datas: datas,
22985
23170
  filters: filterList,
22986
23171
  filterList: filterList
22987
- }, evnt);
23172
+ };
23173
+ // 如果是服务端筛选,则跳过本地筛选处理
23174
+ if (!filterOpts.remote) {
23175
+ this.handleTableData(true);
23176
+ this.checkSelectionStatus();
23177
+ }
23178
+ if (this.mouseConfig && this.mouseOpts.area && this.handleFilterEvent) {
23179
+ this.handleFilterEvent(evnt, params);
23180
+ }
23181
+ this.emitEvent('filter-change', params, evnt);
22988
23182
  this.closeFilter();
22989
23183
  this.updateFooter().then(function () {
22990
23184
  var scrollXLoad = _this2.scrollXLoad,
@@ -23488,15 +23682,15 @@ var Filter = {
23488
23682
  ctxMenuLinkEvent: function ctxMenuLinkEvent(evnt, menu) {
23489
23683
  // 如果一级菜单有配置 code 则允许点击,否则不能点击
23490
23684
  if (!menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
23491
- var ctxMenuMethod = v_x_e_table.menus.get(menu.code);
23685
+ var gMenuOpts = v_x_e_table.menus.get(menu.code);
23492
23686
  var params = Object.assign({
23493
23687
  menu: menu,
23494
23688
  $grid: this.$xegrid,
23495
23689
  $table: this,
23496
23690
  $event: evnt
23497
23691
  }, this.ctxMenuStore.args);
23498
- if (ctxMenuMethod) {
23499
- ctxMenuMethod.call(this, params, evnt);
23692
+ if (gMenuOpts && gMenuOpts.menuMethod) {
23693
+ gMenuOpts.menuMethod(params, evnt);
23500
23694
  }
23501
23695
  // 在 v4 中废弃事件 context-menu-click
23502
23696
  if (this.$listeners['context-menu-click']) {
@@ -26211,7 +26405,12 @@ function renderExtraSuffixIcon(h, _vm) {
26211
26405
  },
26212
26406
  readonly: Boolean,
26213
26407
  disabled: Boolean,
26214
- placeholder: String,
26408
+ placeholder: {
26409
+ type: String,
26410
+ "default": function _default() {
26411
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(conf.input.placeholder) ? conf.i18n('vxe.base.pleaseInput') : conf.input.placeholder;
26412
+ }
26413
+ },
26215
26414
  maxlength: [String, Number],
26216
26415
  autocomplete: {
26217
26416
  type: String,
@@ -28416,7 +28615,12 @@ function renderOpts(h, _vm) {
28416
28615
  props: {
28417
28616
  value: null,
28418
28617
  clearable: Boolean,
28419
- placeholder: String,
28618
+ placeholder: {
28619
+ type: String,
28620
+ "default": function _default() {
28621
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(conf.select.placeholder) ? conf.i18n('vxe.base.pleaseSelect') : conf.select.placeholder;
28622
+ }
28623
+ },
28420
28624
  loading: Boolean,
28421
28625
  disabled: Boolean,
28422
28626
  multiple: Boolean,
@@ -32177,6 +32381,8 @@ var Keyboard = {
32177
32381
 
32178
32382
 
32179
32383
 
32384
+
32385
+
32180
32386
 
32181
32387
 
32182
32388
 
@@ -32444,10 +32650,11 @@ function validErrorRuleValue(rule, val) {
32444
32650
  rules.forEach(function (rule) {
32445
32651
  var type = rule.type,
32446
32652
  trigger = rule.trigger,
32447
- required = rule.required;
32653
+ required = rule.required,
32654
+ validator = rule.validator;
32448
32655
  if (validType === 'all' || !trigger || validType === trigger) {
32449
- if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rule.validator)) {
32450
- var customValid = rule.validator({
32656
+ if (validator) {
32657
+ var validParams = {
32451
32658
  cellValue: cellValue,
32452
32659
  rule: rule,
32453
32660
  rules: rules,
@@ -32457,7 +32664,22 @@ function validErrorRuleValue(rule, val) {
32457
32664
  columnIndex: _this3.getColumnIndex(column),
32458
32665
  field: column.property,
32459
32666
  $table: _this3
32460
- });
32667
+ };
32668
+ var customValid;
32669
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(validator)) {
32670
+ var gvItem = v_x_e_table.validators.get(validator);
32671
+ if (gvItem) {
32672
+ if (gvItem.cellValidatorMethod) {
32673
+ customValid = gvItem.cellValidatorMethod(validParams);
32674
+ } else {
32675
+ if (false) {}
32676
+ }
32677
+ } else {
32678
+ if (false) {}
32679
+ }
32680
+ } else {
32681
+ customValid = validator(validParams);
32682
+ }
32461
32683
  if (customValid) {
32462
32684
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isError(customValid)) {
32463
32685
  _this3.validRuleErr = true;
@@ -34024,14 +34246,16 @@ Object.keys(packages_table.methods).forEach(function (name) {
34024
34246
  }
34025
34247
  default:
34026
34248
  {
34027
- var btnMethod = v_x_e_table.commands.get(code);
34028
- if (btnMethod) {
34029
- btnMethod.apply(void 0, [{
34249
+ var gCommandOpts = v_x_e_table.commands.get(code);
34250
+ if (gCommandOpts.commandMethod) {
34251
+ gCommandOpts.commandMethod.apply(gCommandOpts, [{
34030
34252
  code: code,
34031
34253
  button: button,
34032
34254
  $grid: this,
34033
34255
  $table: $xetable
34034
34256
  }].concat(args));
34257
+ } else {
34258
+ if (false) {}
34035
34259
  }
34036
34260
  }
34037
34261
  }
@@ -35065,7 +35289,7 @@ function renderCustoms(h, _vm) {
35065
35289
  if ($xegrid) {
35066
35290
  $xegrid.triggerToolbarBtnEvent(item, evnt);
35067
35291
  } else {
35068
- var commandMethod = v_x_e_table.commands.get(code);
35292
+ var gCommandOpts = v_x_e_table.commands.get(code);
35069
35293
  var params = {
35070
35294
  code: code,
35071
35295
  button: item,
@@ -35073,8 +35297,12 @@ function renderCustoms(h, _vm) {
35073
35297
  $grid: $xegrid,
35074
35298
  $event: evnt
35075
35299
  };
35076
- if (commandMethod) {
35077
- commandMethod.call(this, params, evnt);
35300
+ if (gCommandOpts) {
35301
+ if (gCommandOpts.commandMethod) {
35302
+ gCommandOpts.commandMethod(params);
35303
+ } else {
35304
+ if (false) {}
35305
+ }
35078
35306
  }
35079
35307
  this.$emit('button-click', params);
35080
35308
  }
@@ -35088,7 +35316,7 @@ function renderCustoms(h, _vm) {
35088
35316
  if ($xegrid) {
35089
35317
  $xegrid.triggerToolbarTolEvent(item, evnt);
35090
35318
  } else {
35091
- var commandMethod = v_x_e_table.commands.get(code);
35319
+ var gCommandOpts = v_x_e_table.commands.get(code);
35092
35320
  var params = {
35093
35321
  code: code,
35094
35322
  tool: item,
@@ -35096,8 +35324,12 @@ function renderCustoms(h, _vm) {
35096
35324
  $table: $xetable,
35097
35325
  $event: evnt
35098
35326
  };
35099
- if (commandMethod) {
35100
- commandMethod.call(this, params, evnt);
35327
+ if (gCommandOpts) {
35328
+ if (gCommandOpts.commandMethod) {
35329
+ gCommandOpts.commandMethod(params);
35330
+ } else {
35331
+ if (false) {}
35332
+ }
35101
35333
  }
35102
35334
  this.$emit('tool-click', params);
35103
35335
  }
@@ -35975,7 +36207,12 @@ var autoTxtElem;
35975
36207
  name: String,
35976
36208
  readonly: Boolean,
35977
36209
  disabled: Boolean,
35978
- placeholder: String,
36210
+ placeholder: {
36211
+ type: String,
36212
+ "default": function _default() {
36213
+ return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(conf.textarea.placeholder) ? conf.i18n('vxe.base.pleaseInput') : conf.textarea.placeholder;
36214
+ }
36215
+ },
35979
36216
  maxlength: [String, Number],
35980
36217
  rows: {
35981
36218
  type: [String, Number],
@@ -38067,10 +38304,11 @@ function getResetValue(value, resetValue) {
38067
38304
  rules.forEach(function (rule) {
38068
38305
  var type = rule.type,
38069
38306
  trigger = rule.trigger,
38070
- required = rule.required;
38307
+ required = rule.required,
38308
+ validator = rule.validator;
38071
38309
  if (validType === 'all' || !trigger || validType === rule.trigger) {
38072
- if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rule.validator)) {
38073
- var customValid = rule.validator({
38310
+ if (validator) {
38311
+ var validParams = {
38074
38312
  itemValue: itemValue,
38075
38313
  rule: rule,
38076
38314
  rules: rules,
@@ -38078,7 +38316,22 @@ function getResetValue(value, resetValue) {
38078
38316
  field: property,
38079
38317
  property: property,
38080
38318
  $form: _this9
38081
- });
38319
+ };
38320
+ var customValid;
38321
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(validator)) {
38322
+ var gvItem = v_x_e_table.validators.get(validator);
38323
+ if (gvItem) {
38324
+ if (gvItem.itemValidatorMethod) {
38325
+ customValid = gvItem.itemValidatorMethod(validParams);
38326
+ } else {
38327
+ if (false) {}
38328
+ }
38329
+ } else {
38330
+ if (false) {}
38331
+ }
38332
+ } else {
38333
+ customValid = validator(validParams);
38334
+ }
38082
38335
  if (customValid) {
38083
38336
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isError(customValid)) {
38084
38337
  errorRules.push(new form_Rule({
@@ -39413,6 +39666,10 @@ var Pulldown = Object.assign(pulldown, {
39413
39666
  ;// CONCATENATED MODULE: ./packages/locale/lang/zh-CN.js
39414
39667
  /* harmony default export */ const zh_CN = ({
39415
39668
  vxe: {
39669
+ base: {
39670
+ pleaseInput: '请输入',
39671
+ pleaseSelect: '请选择'
39672
+ },
39416
39673
  loading: {
39417
39674
  text: '加载中...'
39418
39675
  },
@@ -39432,6 +39689,9 @@ var Pulldown = Object.assign(pulldown, {
39432
39689
  errProp: '不支持的参数 "{0}",可能为 "{1}"',
39433
39690
  colRepet: 'column.{0}="{1}" 重复了,这可能会导致某些功能无法使用',
39434
39691
  notFunc: '方法 "{0}" 不存在',
39692
+ notValidators: '全局校验 "{0}" 不存在',
39693
+ notFormats: '全局格式化 "{0}" 不存在',
39694
+ notCommands: '全局指令 "{0}" 不存在',
39435
39695
  notSlot: '插槽 "{0}" 不存在',
39436
39696
  noTree: '树结构不支持 "{0}"',
39437
39697
  notProp: '不支持的参数 "{0}"',