vxe-table 3.7.0-beta.1 → 3.7.0-beta.11

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 (189) hide show
  1. package/README.md +6 -9
  2. package/helper/vetur/attributes.json +86 -22
  3. package/helper/vetur/tags.json +17 -1
  4. package/lib/button/src/button.js +9 -3
  5. package/lib/button/src/button.min.js +1 -1
  6. package/lib/edit/src/mixin.js +10 -10
  7. package/lib/edit/src/mixin.min.js +1 -1
  8. package/lib/export/src/mixin.js +24 -13
  9. package/lib/export/src/mixin.min.js +1 -1
  10. package/lib/filter/src/mixin.js +13 -7
  11. package/lib/filter/src/mixin.min.js +1 -1
  12. package/lib/form/src/form.js +27 -5
  13. package/lib/form/src/form.min.js +1 -1
  14. package/lib/grid/src/grid.js +7 -3
  15. package/lib/grid/src/grid.min.js +1 -1
  16. package/lib/icon/style/style.css +1 -1
  17. package/lib/icon/style/style.min.css +1 -1
  18. package/lib/index.css +1 -1
  19. package/lib/index.umd.js +559 -229
  20. package/lib/index.umd.min.js +1 -1
  21. package/lib/input/src/input.js +11 -1
  22. package/lib/input/src/input.min.js +1 -1
  23. package/lib/locale/lang/en-US.js +8 -0
  24. package/lib/locale/lang/en-US.min.js +1 -1
  25. package/lib/locale/lang/en-US.umd.js +8 -0
  26. package/lib/locale/lang/es-ES.js +8 -0
  27. package/lib/locale/lang/es-ES.min.js +1 -1
  28. package/lib/locale/lang/es-ES.umd.js +8 -0
  29. package/lib/locale/lang/ja-JP.d.ts +1 -1
  30. package/lib/locale/lang/ja-JP.js +8 -0
  31. package/lib/locale/lang/ja-JP.min.js +1 -1
  32. package/lib/locale/lang/ja-JP.umd.js +8 -0
  33. package/lib/locale/lang/pt-BR.d.ts +8 -0
  34. package/lib/locale/lang/pt-BR.js +330 -0
  35. package/lib/locale/lang/pt-BR.min.js +1 -0
  36. package/lib/locale/lang/pt-BR.umd.js +344 -0
  37. package/lib/locale/lang/zh-CN.d.ts +1 -1
  38. package/lib/locale/lang/zh-CN.js +8 -0
  39. package/lib/locale/lang/zh-CN.min.js +1 -1
  40. package/lib/locale/lang/zh-CN.umd.js +8 -0
  41. package/lib/locale/lang/zh-HK.d.ts +1 -1
  42. package/lib/locale/lang/zh-HK.min.js +1 -1
  43. package/lib/locale/lang/zh-HK.umd.js +8 -0
  44. package/lib/locale/lang/zh-MO.d.ts +1 -1
  45. package/lib/locale/lang/zh-MO.min.js +1 -1
  46. package/lib/locale/lang/zh-MO.umd.js +8 -0
  47. package/lib/locale/lang/zh-TC.d.ts +1 -1
  48. package/lib/locale/lang/zh-TC.js +8 -0
  49. package/lib/locale/lang/zh-TC.min.js +1 -1
  50. package/lib/locale/lang/zh-TC.umd.js +8 -0
  51. package/lib/locale/lang/zh-TW.d.ts +1 -1
  52. package/lib/locale/lang/zh-TW.min.js +1 -1
  53. package/lib/locale/lang/zh-TW.umd.js +8 -0
  54. package/lib/menu/src/mixin.js +3 -3
  55. package/lib/menu/src/mixin.min.js +1 -1
  56. package/lib/pulldown/src/pulldown.js +11 -2
  57. package/lib/pulldown/src/pulldown.min.js +1 -1
  58. package/lib/select/src/select.js +11 -2
  59. package/lib/select/src/select.min.js +1 -1
  60. package/lib/style.css +1 -1
  61. package/lib/style.min.css +1 -1
  62. package/lib/table/src/body.js +3 -2
  63. package/lib/table/src/body.min.js +1 -1
  64. package/lib/table/src/cell.js +9 -7
  65. package/lib/table/src/cell.min.js +1 -1
  66. package/lib/table/src/columnInfo.js +7 -7
  67. package/lib/table/src/columnInfo.min.js +1 -1
  68. package/lib/table/src/methods.js +171 -124
  69. package/lib/table/src/methods.min.js +1 -1
  70. package/lib/table/src/table.js +22 -29
  71. package/lib/table/src/table.min.js +1 -1
  72. package/lib/table/src/util.js +3 -1
  73. package/lib/table/src/util.min.js +1 -1
  74. package/lib/table/style/style.css +7 -2
  75. package/lib/table/style/style.min.css +1 -1
  76. package/lib/textarea/src/textarea.js +6 -1
  77. package/lib/textarea/src/textarea.min.js +1 -1
  78. package/lib/toolbar/src/toolbar.js +23 -7
  79. package/lib/toolbar/src/toolbar.min.js +1 -1
  80. package/lib/tools/log.js +1 -1
  81. package/lib/tools/log.min.js +1 -1
  82. package/lib/tooltip/src/tooltip.js +5 -1
  83. package/lib/tooltip/src/tooltip.min.js +1 -1
  84. package/lib/tooltip/style/style.css +0 -6
  85. package/lib/tooltip/style/style.min.css +1 -1
  86. package/lib/v-x-e-table/index.js +3 -1
  87. package/lib/v-x-e-table/index.min.js +1 -1
  88. package/lib/v-x-e-table/src/commands.js +60 -2
  89. package/lib/v-x-e-table/src/commands.min.js +1 -1
  90. package/lib/v-x-e-table/src/conf.js +7 -4
  91. package/lib/v-x-e-table/src/conf.min.js +1 -1
  92. package/lib/v-x-e-table/src/formats.js +60 -2
  93. package/lib/v-x-e-table/src/formats.min.js +1 -1
  94. package/lib/v-x-e-table/src/menus.js +60 -2
  95. package/lib/v-x-e-table/src/menus.min.js +1 -1
  96. package/lib/v-x-e-table/src/renderer.js +10 -0
  97. package/lib/v-x-e-table/src/renderer.min.js +1 -1
  98. package/lib/v-x-e-table/src/store.js +5 -2
  99. package/lib/v-x-e-table/src/store.min.js +1 -1
  100. package/lib/v-x-e-table/src/validators.js +15 -0
  101. package/lib/v-x-e-table/src/validators.min.js +1 -0
  102. package/lib/validator/src/mixin.js +36 -4
  103. package/lib/validator/src/mixin.min.js +1 -1
  104. package/package.json +2 -2
  105. package/packages/button/src/button.js +5 -4
  106. package/packages/edit/src/mixin.js +10 -9
  107. package/packages/export/src/mixin.js +22 -13
  108. package/packages/filter/src/mixin.js +5 -1
  109. package/packages/form/src/form.js +27 -6
  110. package/packages/grid/src/grid.js +7 -3
  111. package/packages/input/src/input.js +9 -1
  112. package/packages/locale/lang/en-US.js +8 -0
  113. package/packages/locale/lang/es-ES.js +8 -0
  114. package/packages/locale/lang/ja-JP.d.ts +1 -1
  115. package/packages/locale/lang/ja-JP.js +8 -0
  116. package/packages/locale/lang/pt-BR.d.ts +8 -0
  117. package/packages/locale/lang/pt-BR.js +323 -0
  118. package/packages/locale/lang/zh-CN.d.ts +1 -1
  119. package/packages/locale/lang/zh-CN.js +8 -0
  120. package/packages/locale/lang/zh-HK.d.ts +1 -1
  121. package/packages/locale/lang/zh-MO.d.ts +1 -1
  122. package/packages/locale/lang/zh-TC.d.ts +1 -1
  123. package/packages/locale/lang/zh-TC.js +8 -0
  124. package/packages/locale/lang/zh-TW.d.ts +1 -1
  125. package/packages/menu/src/mixin.js +3 -3
  126. package/packages/pulldown/src/pulldown.js +6 -3
  127. package/packages/select/src/select.js +7 -3
  128. package/packages/table/src/body.js +3 -2
  129. package/packages/table/src/cell.js +9 -5
  130. package/packages/table/src/columnInfo.js +7 -7
  131. package/packages/table/src/methods.js +142 -93
  132. package/packages/table/src/table.js +17 -7
  133. package/packages/table/src/util.js +3 -1
  134. package/packages/textarea/src/textarea.js +4 -1
  135. package/packages/toolbar/src/toolbar.js +22 -7
  136. package/packages/tooltip/src/tooltip.js +3 -2
  137. package/packages/v-x-e-table/index.js +2 -0
  138. package/packages/v-x-e-table/src/commands.js +50 -2
  139. package/packages/v-x-e-table/src/conf.js +7 -4
  140. package/packages/v-x-e-table/src/formats.js +50 -2
  141. package/packages/v-x-e-table/src/menus.js +50 -2
  142. package/packages/v-x-e-table/src/renderer.js +11 -1
  143. package/packages/v-x-e-table/src/store.js +4 -2
  144. package/packages/v-x-e-table/src/validators.js +7 -0
  145. package/packages/validator/src/mixin.js +35 -4
  146. package/styles/all.scss +30 -0
  147. package/styles/css-variable.scss +272 -0
  148. package/styles/cssvar.scss +2 -275
  149. package/styles/index.scss +2 -0
  150. package/styles/modules.scss +4 -1
  151. package/styles/table.scss +11 -4
  152. package/styles/tooltip.scss +0 -8
  153. package/styles/variable.scss +1 -4
  154. package/types/all.d.ts +2 -2
  155. package/types/colgroup.d.ts +3 -1
  156. package/types/column.d.ts +3 -0
  157. package/types/edit.d.ts +4 -2
  158. package/types/export.d.ts +3 -0
  159. package/types/filter.d.ts +3 -1
  160. package/types/footer.d.ts +3 -1
  161. package/types/form-item.d.ts +2 -0
  162. package/types/form.d.ts +16 -12
  163. package/types/grid.d.ts +3 -0
  164. package/types/header.d.ts +3 -1
  165. package/types/index.d.ts +1 -1
  166. package/types/input.d.ts +2 -0
  167. package/types/list.d.ts +1 -1
  168. package/types/menu.d.ts +2 -0
  169. package/types/modal.d.ts +7 -3
  170. package/types/pulldown.d.ts +2 -3
  171. package/types/table.d.ts +54 -30
  172. package/types/textarea.d.ts +1 -0
  173. package/types/toolbar.d.ts +2 -0
  174. package/types/tooltip.d.ts +1 -1
  175. package/types/v-x-e-table/commands.d.ts +23 -13
  176. package/types/v-x-e-table/formats.d.ts +21 -12
  177. package/types/v-x-e-table/index.d.ts +33 -26
  178. package/types/v-x-e-table/interceptor.d.ts +1 -1
  179. package/types/v-x-e-table/menus.d.ts +17 -6
  180. package/types/v-x-e-table/renderer.d.ts +5 -3
  181. package/types/v-x-e-table/setup.d.ts +10 -33
  182. package/types/v-x-e-table/validators.d.ts +30 -0
  183. package/types/validator.d.ts +15 -4
  184. /package/lib/icon/style/{iconfont.1688948811910.ttf → iconfont.1691021948915.ttf} +0 -0
  185. /package/lib/icon/style/{iconfont.1688948811910.woff → iconfont.1691021948915.woff} +0 -0
  186. /package/lib/icon/style/{iconfont.1688948811910.woff2 → iconfont.1691021948915.woff2} +0 -0
  187. /package/lib/{iconfont.1688948811910.ttf → iconfont.1691021948915.ttf} +0 -0
  188. /package/lib/{iconfont.1688948811910.woff → iconfont.1691021948915.woff} +0 -0
  189. /package/lib/{iconfont.1688948811910.woff2 → iconfont.1691021948915.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
@@ -10737,9 +10740,9 @@ var iconPrefix = 'vxe-icon-';
10737
10740
  treeConfig: {
10738
10741
  rowField: 'id',
10739
10742
  parentField: 'parentId',
10740
- children: 'children',
10741
- hasChild: 'hasChild',
10742
- mapChildren: '_X_ROW_CHILD',
10743
+ childrenField: 'children',
10744
+ hasChildField: 'hasChild',
10745
+ mapChildrenField: '_X_ROW_CHILD',
10743
10746
  indent: 20,
10744
10747
  showIcon: true
10745
10748
  },
@@ -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.0", "] ").concat(conf.i18n(message, params));
11048
+ return "[vxe-table v".concat("3.7.0-beta.10", "] ").concat(conf.i18n(message, params));
11046
11049
  }
11047
11050
  function outLog(type) {
11048
11051
  return function (message, params) {
@@ -11437,6 +11440,7 @@ function getNativeOns(renderOpts, params) {
11437
11440
  var nativeOns = {};
11438
11441
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().objectEach(nativeEvents, function (func, key) {
11439
11442
  nativeOns[key] = function () {
11443
+ if (false) {}
11440
11444
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
11441
11445
  args[_key] = arguments[_key];
11442
11446
  }
@@ -11454,6 +11458,7 @@ function getOns(renderOpts, params, inputFunc, changeFunc) {
11454
11458
  var ons = {};
11455
11459
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().objectEach(events, function (func, key) {
11456
11460
  ons[key] = function () {
11461
+ if (false) {}
11457
11462
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
11458
11463
  args[_key2] = arguments[_key2];
11459
11464
  }
@@ -12056,7 +12061,8 @@ var renderer = {
12056
12061
  var es_array_includes = __webpack_require__(6699);
12057
12062
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js
12058
12063
  var es_string_includes = __webpack_require__(2023);
12059
- ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/store.js
12064
+ ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/commands.js
12065
+
12060
12066
 
12061
12067
 
12062
12068
 
@@ -12066,6 +12072,178 @@ var es_string_includes = __webpack_require__(2023);
12066
12072
 
12067
12073
 
12068
12074
 
12075
+ var VXECommandsStore = /*#__PURE__*/function () {
12076
+ function VXECommandsStore() {
12077
+ _classCallCheck(this, VXECommandsStore);
12078
+ this.store = {};
12079
+ }
12080
+ _createClass(VXECommandsStore, [{
12081
+ key: "mixin",
12082
+ value: function mixin(options) {
12083
+ var _this = this;
12084
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(options, function (item, key) {
12085
+ _this.add(key, item);
12086
+ });
12087
+ return VXECommandsStore;
12088
+ }
12089
+ }, {
12090
+ key: "get",
12091
+ value: function get(name) {
12092
+ return this.store[name];
12093
+ }
12094
+ }, {
12095
+ key: "add",
12096
+ value: function add(name, render) {
12097
+ var conf = this.store[name];
12098
+ // 兼容
12099
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(render)) {
12100
+ if (false) {}
12101
+ render = {
12102
+ commandMethod: render
12103
+ };
12104
+ }
12105
+
12106
+ // 检测是否覆盖
12107
+ if (false) { var confKeys; }
12108
+ this.store[name] = conf ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().merge(conf, render) : render;
12109
+ return VXECommandsStore;
12110
+ }
12111
+ }, {
12112
+ key: "delete",
12113
+ value: function _delete(name) {
12114
+ delete this.store[name];
12115
+ return VXECommandsStore;
12116
+ }
12117
+ }]);
12118
+ return VXECommandsStore;
12119
+ }();
12120
+ var commands = new VXECommandsStore();
12121
+ if (false) {}
12122
+ ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/menus.js
12123
+
12124
+
12125
+
12126
+
12127
+
12128
+
12129
+
12130
+
12131
+
12132
+
12133
+ var VXEMenusStore = /*#__PURE__*/function () {
12134
+ function VXEMenusStore() {
12135
+ _classCallCheck(this, VXEMenusStore);
12136
+ this.store = {};
12137
+ }
12138
+ _createClass(VXEMenusStore, [{
12139
+ key: "mixin",
12140
+ value: function mixin(options) {
12141
+ var _this = this;
12142
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(options, function (item, key) {
12143
+ _this.add(key, item);
12144
+ });
12145
+ return VXEMenusStore;
12146
+ }
12147
+ }, {
12148
+ key: "get",
12149
+ value: function get(name) {
12150
+ return this.store[name];
12151
+ }
12152
+ }, {
12153
+ key: "add",
12154
+ value: function add(name, render) {
12155
+ var conf = this.store[name];
12156
+ // 兼容
12157
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(render)) {
12158
+ if (false) {}
12159
+ render = {
12160
+ menuMethod: render
12161
+ };
12162
+ }
12163
+
12164
+ // 检测是否覆盖
12165
+ if (false) { var confKeys; }
12166
+ this.store[name] = conf ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().merge(conf, render) : render;
12167
+ return VXEMenusStore;
12168
+ }
12169
+ }, {
12170
+ key: "delete",
12171
+ value: function _delete(name) {
12172
+ delete this.store[name];
12173
+ return VXEMenusStore;
12174
+ }
12175
+ }]);
12176
+ return VXEMenusStore;
12177
+ }();
12178
+ var menus = new VXEMenusStore();
12179
+ if (false) {}
12180
+ ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/formats.js
12181
+
12182
+
12183
+
12184
+
12185
+
12186
+
12187
+
12188
+
12189
+
12190
+
12191
+ var VXEFormatsStore = /*#__PURE__*/function () {
12192
+ function VXEFormatsStore() {
12193
+ _classCallCheck(this, VXEFormatsStore);
12194
+ this.store = {};
12195
+ }
12196
+ _createClass(VXEFormatsStore, [{
12197
+ key: "mixin",
12198
+ value: function mixin(options) {
12199
+ var _this = this;
12200
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(options, function (item, key) {
12201
+ _this.add(key, item);
12202
+ });
12203
+ return VXEFormatsStore;
12204
+ }
12205
+ }, {
12206
+ key: "get",
12207
+ value: function get(name) {
12208
+ return this.store[name];
12209
+ }
12210
+ }, {
12211
+ key: "add",
12212
+ value: function add(name, render) {
12213
+ var conf = this.store[name];
12214
+ // 兼容
12215
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(render)) {
12216
+ if (false) {}
12217
+ render = {
12218
+ cellFormatMethod: render
12219
+ };
12220
+ }
12221
+
12222
+ // 检测是否覆盖
12223
+ if (false) { var confKeys; }
12224
+ this.store[name] = conf ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().merge(conf, render) : render;
12225
+ return VXEFormatsStore;
12226
+ }
12227
+ }, {
12228
+ key: "delete",
12229
+ value: function _delete(name) {
12230
+ delete this.store[name];
12231
+ return VXEFormatsStore;
12232
+ }
12233
+ }]);
12234
+ return VXEFormatsStore;
12235
+ }();
12236
+ var formats = new VXEFormatsStore();
12237
+ if (false) {}
12238
+ ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/store.js
12239
+
12240
+
12241
+
12242
+
12243
+
12244
+
12245
+
12246
+
12069
12247
 
12070
12248
 
12071
12249
  /**
@@ -12078,8 +12256,11 @@ var Store = /*#__PURE__*/function () {
12078
12256
  }
12079
12257
  _createClass(Store, [{
12080
12258
  key: "mixin",
12081
- value: function mixin(map) {
12082
- Object.assign(this.store, map);
12259
+ value: function mixin(options) {
12260
+ var _this = this;
12261
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(options, function (item, key) {
12262
+ _this.add(key, item);
12263
+ });
12083
12264
  return Store;
12084
12265
  }
12085
12266
  }, {
@@ -12106,20 +12287,10 @@ var Store = /*#__PURE__*/function () {
12106
12287
  return Store;
12107
12288
  }();
12108
12289
  /* harmony default export */ const store = (Store);
12109
- ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/commands.js
12290
+ ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/validators.js
12110
12291
 
12111
12292
 
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
12120
-
12121
-
12122
- var formats = new store();
12293
+ var validators = new store();
12123
12294
  if (false) {}
12124
12295
  ;// CONCATENATED MODULE: ./packages/v-x-e-table/src/setup.js
12125
12296
 
@@ -12146,6 +12317,7 @@ function setup(options) {
12146
12317
 
12147
12318
 
12148
12319
 
12320
+
12149
12321
  var installedPlugins = [];
12150
12322
  function use(Plugin, options) {
12151
12323
  /* eslint-disable @typescript-eslint/no-use-before-define */
@@ -12229,7 +12401,7 @@ function _t(key, args) {
12229
12401
  var v = 'v3';
12230
12402
  var VXETable = {
12231
12403
  v: v,
12232
- version: "3.7.0-beta.0",
12404
+ version: "3.7.0-beta.10",
12233
12405
  reg: reg,
12234
12406
  use: use,
12235
12407
  setup: setup,
@@ -12238,6 +12410,7 @@ var VXETable = {
12238
12410
  commands: commands,
12239
12411
  formats: formats,
12240
12412
  menus: menus,
12413
+ validators: validators,
12241
12414
  config: config,
12242
12415
  t: t,
12243
12416
  _t: _t
@@ -12367,7 +12540,7 @@ var ColumnInfo = /*#__PURE__*/function () {
12367
12540
  var proxyOpts = $xegrid ? $xegrid.proxyOpts : null;
12368
12541
  var formatter = _vm.formatter;
12369
12542
  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; }
12543
+ if (false) { var _gFormatOpts, gFormatOpts, types; }
12371
12544
  Object.assign(this, {
12372
12545
  // 基本属性
12373
12546
  type: _vm.type,
@@ -12851,7 +13024,9 @@ function countTreeExpand(prevRow, params) {
12851
13024
  return count;
12852
13025
  }
12853
13026
  var $table = params.$table;
12854
- var rowChildren = prevRow[$table.treeOpts.children];
13027
+ var treeOpts = $table.treeOpts;
13028
+ var childrenField = treeOpts.children || treeOpts.childrenField;
13029
+ var rowChildren = prevRow[childrenField];
12855
13030
  if ($table.isTreeExpandByRow(prevRow)) {
12856
13031
  for (var index = 0; index < rowChildren.length; index++) {
12857
13032
  count += countTreeExpand(rowChildren[index], params);
@@ -13049,7 +13224,7 @@ function renderLine(h, _vm, $xetable, params) {
13049
13224
  if (slots && slots.line) {
13050
13225
  return $xetable.callSlot(slots.line, params, h);
13051
13226
  }
13052
- if (treeConfig && treeNode && treeOpts.line) {
13227
+ if (treeConfig && treeNode && (treeOpts.showLine || treeOpts.line)) {
13053
13228
  return [h('div', {
13054
13229
  "class": 'vxe-tree--line-wrapper'
13055
13230
  }, [h('div', {
@@ -13326,6 +13501,7 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
13326
13501
  hasFixedColumn = $xetable.hasFixedColumn,
13327
13502
  fullAllDataRowIdData = $xetable.fullAllDataRowIdData,
13328
13503
  rowOpts = $xetable.rowOpts;
13504
+ var childrenField = treeOpts.children || treeOpts.childrenField;
13329
13505
  var rows = [];
13330
13506
  tableData.forEach(function (row, $rowIndex) {
13331
13507
  var trOn = {};
@@ -13377,7 +13553,7 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
13377
13553
  isNewRow = $xetable.isInsertByRow(row);
13378
13554
  }
13379
13555
  if (treeConfig && !scrollYLoad && !treeOpts.transform && treeExpandeds.length) {
13380
- rowChildren = row[treeOpts.children];
13556
+ rowChildren = row[childrenField];
13381
13557
  isExpandTree = rowChildren && rowChildren.length && treeExpandeds.indexOf(row) > -1;
13382
13558
  }
13383
13559
  rows.push(h('tr', {
@@ -14813,16 +14989,16 @@ var Cell = {
14813
14989
  column = params.column,
14814
14990
  level = params.level;
14815
14991
  var slots = column.slots;
14816
- var children = treeOpts.children,
14817
- hasChild = treeOpts.hasChild,
14818
- indent = treeOpts.indent,
14992
+ var indent = treeOpts.indent,
14819
14993
  lazy = treeOpts.lazy,
14820
14994
  trigger = treeOpts.trigger,
14821
14995
  iconLoaded = treeOpts.iconLoaded,
14822
14996
  showIcon = treeOpts.showIcon,
14823
14997
  iconOpen = treeOpts.iconOpen,
14824
14998
  iconClose = treeOpts.iconClose;
14825
- var rowChilds = row[children];
14999
+ var childrenField = treeOpts.children || treeOpts.childrenField;
15000
+ var hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
15001
+ var rowChilds = row[childrenField];
14826
15002
  var hasLazyChilds = false;
14827
15003
  var isAceived = false;
14828
15004
  var isLazyLoaded = false;
@@ -14834,7 +15010,7 @@ var Cell = {
14834
15010
  isAceived = $table.findRowIndexOf(treeExpandeds, row) > -1;
14835
15011
  if (lazy) {
14836
15012
  isLazyLoaded = $table.findRowIndexOf(treeLazyLoadeds, row) > -1;
14837
- hasLazyChilds = row[hasChild];
15013
+ hasLazyChilds = row[hasChildField];
14838
15014
  }
14839
15015
  }
14840
15016
  if (!trigger || trigger === 'default') {
@@ -15023,7 +15199,7 @@ var Cell = {
15023
15199
  isHidden = params.isHidden;
15024
15200
  var treeConfig = $table.treeConfig,
15025
15201
  treeIndeterminates = $table.treeIndeterminates,
15026
- selection = $table.selection;
15202
+ selectCheckboxRows = $table.selectCheckboxRows;
15027
15203
  var _$table$checkboxOpts = $table.checkboxOpts,
15028
15204
  labelField = _$table$checkboxOpts.labelField,
15029
15205
  checkMethod = _$table$checkboxOpts.checkMethod,
@@ -15039,7 +15215,7 @@ var Cell = {
15039
15215
  var isDisabled = !!checkMethod;
15040
15216
  var on;
15041
15217
  if (!isHidden) {
15042
- isChecked = $table.findRowIndexOf(selection, row) > -1;
15218
+ isChecked = $table.findRowIndexOf(selectCheckboxRows, row) > -1;
15043
15219
  on = {
15044
15220
  click: function click(evnt) {
15045
15221
  if (!isDisabled && isVisible) {
@@ -15276,6 +15452,7 @@ var Cell = {
15276
15452
  },
15277
15453
  on: {
15278
15454
  click: function click(evnt) {
15455
+ evnt.stopPropagation();
15279
15456
  $table.triggerSortEvent(evnt, column, 'asc');
15280
15457
  }
15281
15458
  }
@@ -15288,6 +15465,7 @@ var Cell = {
15288
15465
  },
15289
15466
  on: {
15290
15467
  click: function click(evnt) {
15468
+ evnt.stopPropagation();
15291
15469
  $table.triggerSortEvent(evnt, column, 'desc');
15292
15470
  }
15293
15471
  }
@@ -15854,6 +16032,7 @@ var Methods = {
15854
16032
  oldScrollYLoad = this.scrollYLoad,
15855
16033
  sXOpts = this.sXOpts,
15856
16034
  sYOpts = this.sYOpts;
16035
+ var childrenField = treeOpts.children || treeOpts.childrenField;
15857
16036
  var treeData = [];
15858
16037
  var fullData = datas ? datas.slice(0) : [];
15859
16038
  if (treeConfig) {
@@ -15863,8 +16042,8 @@ var Methods = {
15863
16042
  treeData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArrayTree(fullData, {
15864
16043
  key: treeOpts.rowField,
15865
16044
  parentKey: treeOpts.parentField,
15866
- children: treeOpts.children,
15867
- mapChildren: treeOpts.mapChildren
16045
+ children: childrenField,
16046
+ mapChildren: treeOpts.mapChildrenField
15868
16047
  });
15869
16048
  fullData = treeData.slice(0);
15870
16049
  } else {
@@ -15890,7 +16069,7 @@ var Methods = {
15890
16069
  this.tableSynchData = datas;
15891
16070
  // 克隆原数据,用于显示编辑状态,与编辑值做对比
15892
16071
  if (keepSource) {
15893
- this.tableSourceData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(fullData, true);
16072
+ this.cacheSourceMap(fullData);
15894
16073
  }
15895
16074
  if (false) {}
15896
16075
  if (this.clearCellAreas && this.mouseConfig) {
@@ -16072,6 +16251,8 @@ var Methods = {
16072
16251
  tableFullTreeData = this.tableFullTreeData;
16073
16252
  var fullDataRowIdData = this.fullDataRowIdData,
16074
16253
  fullAllDataRowIdData = this.fullAllDataRowIdData;
16254
+ var childrenField = treeOpts.children || treeOpts.childrenField;
16255
+ var hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
16075
16256
  var rowkey = getRowkey(this);
16076
16257
  var isLazy = treeConfig && treeOpts.lazy;
16077
16258
  var handleCache = function handleCache(row, index, items, path, parent, nodes) {
@@ -16082,8 +16263,8 @@ var Methods = {
16082
16263
  rowid = getRowUniqueId();
16083
16264
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, rowkey, rowid);
16084
16265
  }
16085
- if (isLazy && row[treeOpts.hasChild] && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(row[treeOpts.children])) {
16086
- row[treeOpts.children] = null;
16266
+ if (isLazy && row[hasChildField] && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(row[childrenField])) {
16267
+ row[childrenField] = null;
16087
16268
  }
16088
16269
  var rest = {
16089
16270
  row: row,
@@ -16115,8 +16296,35 @@ var Methods = {
16115
16296
  tableFullData.forEach(handleCache);
16116
16297
  }
16117
16298
  },
16118
- loadTreeChildren: function loadTreeChildren(row, childRecords) {
16299
+ cacheSourceMap: function cacheSourceMap(fullData) {
16119
16300
  var _this11 = this;
16301
+ var treeConfig = this.treeConfig,
16302
+ treeOpts = this.treeOpts,
16303
+ sourceDataRowIdData = this.sourceDataRowIdData;
16304
+ var sourceData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(fullData, true);
16305
+ var rowkey = getRowkey(this);
16306
+ sourceDataRowIdData = this.sourceDataRowIdData = {};
16307
+ var handleSourceRow = function handleSourceRow(row) {
16308
+ var rowid = getRowid(_this11, row);
16309
+ if (eqEmptyValue(rowid)) {
16310
+ rowid = getRowUniqueId();
16311
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, rowkey, rowid);
16312
+ }
16313
+ sourceDataRowIdData[rowid] = {
16314
+ row: row,
16315
+ rowid: rowid
16316
+ };
16317
+ };
16318
+ // 源数据缓存
16319
+ if (treeConfig && !treeOpts.transform) {
16320
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(sourceData, handleSourceRow, treeOpts);
16321
+ } else {
16322
+ sourceData.forEach(handleSourceRow);
16323
+ }
16324
+ this.tableSourceData = sourceData;
16325
+ },
16326
+ loadTreeChildren: function loadTreeChildren(row, childRecords) {
16327
+ var _this12 = this;
16120
16328
  var keepSource = this.keepSource,
16121
16329
  tableSourceData = this.tableSourceData,
16122
16330
  treeOpts = this.treeOpts,
@@ -16125,22 +16333,22 @@ var Methods = {
16125
16333
  fullAllDataRowMap = this.fullAllDataRowMap,
16126
16334
  fullAllDataRowIdData = this.fullAllDataRowIdData;
16127
16335
  var transform = treeOpts.transform,
16128
- children = treeOpts.children,
16129
- mapChildren = treeOpts.mapChildren;
16336
+ mapChildrenField = treeOpts.mapChildrenField;
16337
+ var childrenField = treeOpts.children || treeOpts.childrenField;
16130
16338
  var rest = fullAllDataRowIdData[getRowid(this, row)];
16131
16339
  var parentLevel = rest ? rest.level : 0;
16132
16340
  return this.createData(childRecords).then(function (rows) {
16133
16341
  if (keepSource) {
16134
- var rowid = getRowid(_this11, row);
16342
+ var rowid = getRowid(_this12, row);
16135
16343
  var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(tableSourceData, function (item) {
16136
- return rowid === getRowid(_this11, item);
16344
+ return rowid === getRowid(_this12, item);
16137
16345
  }, treeOpts);
16138
16346
  if (matchObj) {
16139
- matchObj.item[children] = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(rows, true);
16347
+ matchObj.item[childrenField] = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(rows, true);
16140
16348
  }
16141
16349
  }
16142
16350
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(rows, function (childRow, index, items, path, parent, nodes) {
16143
- var rowid = getRowid(_this11, childRow);
16351
+ var rowid = getRowid(_this12, childRow);
16144
16352
  var rest = {
16145
16353
  row: childRow,
16146
16354
  rowid: rowid,
@@ -16157,11 +16365,11 @@ var Methods = {
16157
16365
  fullAllDataRowIdData[rowid] = rest;
16158
16366
  fullAllDataRowMap.set(childRow, rest);
16159
16367
  }, treeOpts);
16160
- row[children] = rows;
16368
+ row[childrenField] = rows;
16161
16369
  if (transform) {
16162
- row[mapChildren] = rows;
16370
+ row[mapChildrenField] = rows;
16163
16371
  }
16164
- _this11.updateAfterDataIndex();
16372
+ _this12.updateAfterDataIndex();
16165
16373
  return rows;
16166
16374
  });
16167
16375
  },
@@ -16170,7 +16378,7 @@ var Methods = {
16170
16378
  * 牺牲数据组装的耗时,用来换取使用过程中的流畅
16171
16379
  */
16172
16380
  cacheColumnMap: function cacheColumnMap() {
16173
- var _this12 = this;
16381
+ var _this13 = this;
16174
16382
  var tableFullColumn = this.tableFullColumn,
16175
16383
  collectColumn = this.collectColumn,
16176
16384
  fullColumnMap = this.fullColumnMap,
@@ -16379,18 +16587,19 @@ var Methods = {
16379
16587
  * @param {Row} records 行数据
16380
16588
  */
16381
16589
  defineField: function defineField(records) {
16382
- var _this13 = this;
16590
+ var _this14 = this;
16383
16591
  var radioOpts = this.radioOpts,
16384
16592
  checkboxOpts = this.checkboxOpts,
16385
16593
  treeConfig = this.treeConfig,
16386
16594
  treeOpts = this.treeOpts,
16387
16595
  expandOpts = this.expandOpts;
16596
+ var childrenField = treeOpts.children || treeOpts.childrenField;
16388
16597
  var rowkey = getRowkey(this);
16389
16598
  if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(records)) {
16390
16599
  records = [records || {}];
16391
16600
  }
16392
16601
  return records.map(function (record) {
16393
- _this13.tableFullColumn.forEach(function (column) {
16602
+ _this14.tableFullColumn.forEach(function (column) {
16394
16603
  var field = column.field,
16395
16604
  editRender = column.editRender;
16396
16605
  if (field && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().has(record, field)) {
@@ -16414,8 +16623,8 @@ var Methods = {
16414
16623
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(record, key, null);
16415
16624
  }
16416
16625
  });
16417
- if (treeConfig && treeOpts.lazy && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(record[treeOpts.children])) {
16418
- record[treeOpts.children] = null;
16626
+ if (treeConfig && treeOpts.lazy && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(record[childrenField])) {
16627
+ record[childrenField] = null;
16419
16628
  }
16420
16629
  // 必须有行数据的唯一主键,可以自行设置;也可以默认生成一个随机数
16421
16630
  if (eqEmptyValue(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(record, rowkey))) {
@@ -16430,9 +16639,9 @@ var Methods = {
16430
16639
  * @param {Array} records 新数据
16431
16640
  */
16432
16641
  createData: function createData(records) {
16433
- var _this14 = this;
16642
+ var _this15 = this;
16434
16643
  return this.$nextTick().then(function () {
16435
- return _this14.defineField(records);
16644
+ return _this15.defineField(records);
16436
16645
  });
16437
16646
  },
16438
16647
  /**
@@ -16457,7 +16666,7 @@ var Methods = {
16457
16666
  * 如果还额外传了 field 则还原指定的单元格数据
16458
16667
  */
16459
16668
  revertData: function revertData(rows, field) {
16460
- var _this15 = this;
16669
+ var _this16 = this;
16461
16670
  var keepSource = this.keepSource,
16462
16671
  tableSourceData = this.tableSourceData,
16463
16672
  treeConfig = this.treeConfig;
@@ -16475,8 +16684,8 @@ var Methods = {
16475
16684
  }
16476
16685
  if (targetRows.length) {
16477
16686
  targetRows.forEach(function (row) {
16478
- if (!_this15.isInsertByRow(row)) {
16479
- var rowIndex = _this15.getRowIndex(row);
16687
+ if (!_this16.isInsertByRow(row)) {
16688
+ var rowIndex = _this16.getRowIndex(row);
16480
16689
  if (treeConfig && rowIndex === -1) {
16481
16690
  errLog('vxe.error.noTree', ['revertData']);
16482
16691
  }
@@ -16550,39 +16759,24 @@ var Methods = {
16550
16759
  * @param {String} field 字段名
16551
16760
  */
16552
16761
  isUpdateByRow: function isUpdateByRow(row, field) {
16553
- var _this16 = this;
16554
16762
  var tableFullColumn = this.tableFullColumn,
16555
16763
  keepSource = this.keepSource,
16556
- treeConfig = this.treeConfig,
16557
- treeOpts = this.treeOpts,
16558
- tableSourceData = this.tableSourceData,
16764
+ sourceDataRowIdData = this.sourceDataRowIdData,
16559
16765
  fullDataRowIdData = this.fullDataRowIdData;
16560
16766
  if (keepSource) {
16561
- var oRow, property;
16562
16767
  var rowid = getRowid(this, row);
16563
16768
  // 新增的数据不需要检测
16564
16769
  if (!fullDataRowIdData[rowid]) {
16565
16770
  return false;
16566
16771
  }
16567
- if (treeConfig) {
16568
- var children = treeOpts.children;
16569
- var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(tableSourceData, function (item) {
16570
- return rowid === getRowid(_this16, item);
16571
- }, treeOpts);
16572
- row = Object.assign({}, row, _defineProperty({}, children, null));
16573
- if (matchObj) {
16574
- oRow = Object.assign({}, matchObj.item, _defineProperty({}, children, null));
16575
- }
16576
- } else {
16577
- var oRowIndex = fullDataRowIdData[rowid].index;
16578
- oRow = tableSourceData[oRowIndex];
16579
- }
16580
- if (oRow) {
16772
+ var oldRest = sourceDataRowIdData[rowid];
16773
+ if (oldRest) {
16774
+ var oRow = oldRest.row;
16581
16775
  if (arguments.length > 1) {
16582
16776
  return !eqCellValue(oRow, row, field);
16583
16777
  }
16584
16778
  for (var index = 0, len = tableFullColumn.length; index < len; index++) {
16585
- property = tableFullColumn[index].field;
16779
+ var property = tableFullColumn[index].field;
16586
16780
  if (property && !eqCellValue(oRow, row, property)) {
16587
16781
  return true;
16588
16782
  }
@@ -16647,9 +16841,9 @@ var Methods = {
16647
16841
  tableFullTreeData = this.tableFullTreeData,
16648
16842
  afterTreeFullData = this.afterTreeFullData;
16649
16843
  var transform = treeOpts.transform,
16650
- children = treeOpts.children,
16651
- mapChildren = treeOpts.mapChildren;
16844
+ mapChildrenField = treeOpts.mapChildrenField;
16652
16845
  var checkField = checkboxOpts.checkField;
16846
+ var childrenField = treeOpts.children || treeOpts.childrenField;
16653
16847
  var currTableData = isFull ? transform ? tableFullTreeData : tableFullData : transform ? afterTreeFullData : afterFullData;
16654
16848
  var rowList = [];
16655
16849
  if (checkField) {
@@ -16657,7 +16851,7 @@ var Methods = {
16657
16851
  rowList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().filterTree(currTableData, function (row) {
16658
16852
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField);
16659
16853
  }, {
16660
- children: transform ? mapChildren : children
16854
+ children: transform ? mapChildrenField : childrenField
16661
16855
  });
16662
16856
  } else {
16663
16857
  rowList = currTableData.filter(function (row) {
@@ -16665,16 +16859,16 @@ var Methods = {
16665
16859
  });
16666
16860
  }
16667
16861
  } else {
16668
- var selection = this.selection;
16862
+ var selectCheckboxRows = this.selectCheckboxRows;
16669
16863
  if (treeConfig) {
16670
16864
  rowList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().filterTree(currTableData, function (row) {
16671
- return _this17.findRowIndexOf(selection, row) > -1;
16865
+ return _this17.findRowIndexOf(selectCheckboxRows, row) > -1;
16672
16866
  }, {
16673
- children: transform ? mapChildren : children
16867
+ children: transform ? mapChildrenField : childrenField
16674
16868
  });
16675
16869
  } else {
16676
16870
  rowList = currTableData.filter(function (row) {
16677
- return _this17.findRowIndexOf(selection, row) > -1;
16871
+ return _this17.findRowIndexOf(selectCheckboxRows, row) > -1;
16678
16872
  });
16679
16873
  }
16680
16874
  }
@@ -16699,7 +16893,7 @@ var Methods = {
16699
16893
  fullData.push(row);
16700
16894
  }
16701
16895
  }, {
16702
- children: treeOpts.mapChildren
16896
+ children: treeOpts.mapChildrenField
16703
16897
  });
16704
16898
  this.afterFullData = fullData;
16705
16899
  this.updateScrollYStatus(fullData);
@@ -16924,6 +17118,7 @@ var Methods = {
16924
17118
  fullAllDataRowIdData = this.fullAllDataRowIdData,
16925
17119
  afterTreeFullData = this.afterTreeFullData,
16926
17120
  treeOpts = this.treeOpts;
17121
+ var childrenField = treeOpts.children || treeOpts.childrenField;
16927
17122
  if (treeConfig) {
16928
17123
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterTreeFullData, function (row, index, items, path) {
16929
17124
  var rowid = getRowid(_this19, row);
@@ -16950,7 +17145,7 @@ var Methods = {
16950
17145
  fullDataRowIdData[rowid] = rest;
16951
17146
  }
16952
17147
  }, {
16953
- children: treeOpts.transform ? treeOpts.mapChildren : treeOpts.children
17148
+ children: treeOpts.transform ? treeOpts.mapChildrenField : childrenField
16954
17149
  });
16955
17150
  } else {
16956
17151
  afterFullData.forEach(function (row, index) {
@@ -17115,7 +17310,7 @@ var Methods = {
17115
17310
  */
17116
17311
  showColumn: function showColumn(fieldOrColumn) {
17117
17312
  var column = handleFieldOrColumn(this, fieldOrColumn);
17118
- if (column & !column.visible) {
17313
+ if (column && column.visible) {
17119
17314
  column.visible = true;
17120
17315
  return this.handleCustom();
17121
17316
  }
@@ -17752,6 +17947,7 @@ var Methods = {
17752
17947
  },
17753
17948
  updateHeight: function updateHeight() {
17754
17949
  this.customHeight = calcHeight(this, 'height');
17950
+ this.customMinHeight = calcHeight(this, 'minHeight');
17755
17951
  this.customMaxHeight = calcHeight(this, 'maxHeight');
17756
17952
  },
17757
17953
  updateStyle: function updateStyle() {
@@ -17761,6 +17957,7 @@ var Methods = {
17761
17957
  fullColumnIdData = this.fullColumnIdData,
17762
17958
  tableColumn = this.tableColumn,
17763
17959
  customHeight = this.customHeight,
17960
+ customMinHeight = this.customMinHeight,
17764
17961
  customMaxHeight = this.customMaxHeight,
17765
17962
  border = this.border,
17766
17963
  headerHeight = this.headerHeight,
@@ -17869,15 +18066,22 @@ var Methods = {
17869
18066
  } else if (layout === 'body') {
17870
18067
  var emptyBlockElem = elemStore["".concat(name, "-").concat(layout, "-emptyBlock")];
17871
18068
  if (methods_isNodeElement(wrapperElem)) {
18069
+ var bodyMinHeight = fixedType ? customMinHeight - headerHeight - footerHeight - (showFooter ? 0 : scrollbarHeight) : customMinHeight - headerHeight - footerHeight;
18070
+ var bodyMaxHeight = 0;
17872
18071
  if (customMaxHeight) {
17873
- wrapperElem.style.maxHeight = "".concat(fixedType ? customMaxHeight - headerHeight - (showFooter ? 0 : scrollbarHeight) : customMaxHeight - headerHeight - footerHeight, "px");
17874
- } else {
17875
- if (customHeight > 0) {
17876
- wrapperElem.style.height = "".concat(fixedType ? (customHeight > 0 ? customHeight - headerHeight - footerHeight : tableHeight) - (showFooter ? 0 : scrollbarHeight) : customHeight - headerHeight - footerHeight, "px");
17877
- } else {
17878
- wrapperElem.style.height = '';
18072
+ bodyMaxHeight = Math.max(bodyMinHeight, fixedType ? customMaxHeight - headerHeight - (showFooter ? 0 : scrollbarHeight) : customMaxHeight - headerHeight - footerHeight);
18073
+ wrapperElem.style.maxHeight = "".concat(bodyMaxHeight, "px");
18074
+ }
18075
+ if (customHeight > 0) {
18076
+ var bodyHeight = fixedType ? (customHeight > 0 ? customHeight - headerHeight - footerHeight : tableHeight) - (showFooter ? 0 : scrollbarHeight) : customHeight - headerHeight - footerHeight;
18077
+ if (bodyMaxHeight) {
18078
+ bodyHeight = Math.min(bodyMaxHeight, bodyHeight);
17879
18079
  }
18080
+ wrapperElem.style.height = "".concat(Math.max(bodyMinHeight, bodyHeight), "px");
18081
+ } else {
18082
+ wrapperElem.style.height = '';
17880
18083
  }
18084
+ wrapperElem.style.minHeight = "".concat(bodyMinHeight, "px");
17881
18085
  }
17882
18086
 
17883
18087
  // 如果是固定列
@@ -18759,12 +18963,12 @@ var Methods = {
18759
18963
  return this.handleCheckedCheckboxRow(rows, value, true);
18760
18964
  },
18761
18965
  isCheckedByCheckboxRow: function isCheckedByCheckboxRow(row) {
18762
- var selection = this.selection;
18966
+ var selectCheckboxRows = this.selectCheckboxRows;
18763
18967
  var checkField = this.checkboxOpts.checkField;
18764
18968
  if (checkField) {
18765
18969
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField);
18766
18970
  }
18767
- return this.findRowIndexOf(selection, row) > -1;
18971
+ return this.findRowIndexOf(selectCheckboxRows, row) > -1;
18768
18972
  },
18769
18973
  isIndeterminateByCheckboxRow: function isIndeterminateByCheckboxRow(row) {
18770
18974
  var treeIndeterminates = this.treeIndeterminates;
@@ -18777,7 +18981,7 @@ var Methods = {
18777
18981
  handleSelectRow: function handleSelectRow(_ref6, value, isForce) {
18778
18982
  var _this33 = this;
18779
18983
  var row = _ref6.row;
18780
- var selection = this.selection,
18984
+ var selectCheckboxRows = this.selectCheckboxRows,
18781
18985
  afterFullData = this.afterFullData,
18782
18986
  treeConfig = this.treeConfig,
18783
18987
  treeOpts = this.treeOpts,
@@ -18849,7 +19053,7 @@ var Methods = {
18849
19053
  if (this.findRowIndexOf(treeIndeterminates, row) === -1) {
18850
19054
  treeIndeterminates.push(row);
18851
19055
  }
18852
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(selection, function (item) {
19056
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(selectCheckboxRows, function (item) {
18853
19057
  return _this33.eqRow(item, row);
18854
19058
  });
18855
19059
  } else {
@@ -18859,9 +19063,9 @@ var Methods = {
18859
19063
  row: item
18860
19064
  })) {
18861
19065
  if (value) {
18862
- selection.push(item);
19066
+ selectCheckboxRows.push(item);
18863
19067
  } else {
18864
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(selection, function (select) {
19068
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(selectCheckboxRows, function (select) {
18865
19069
  return _this33.eqRow(select, item);
18866
19070
  });
18867
19071
  }
@@ -18890,7 +19094,7 @@ var Methods = {
18890
19094
  _parentStatus = -1;
18891
19095
  } else {
18892
19096
  var _selectItems = _matchObj.items.filter(function (item) {
18893
- return _this33.findRowIndexOf(selection, item) > -1;
19097
+ return _this33.findRowIndexOf(selectCheckboxRows, item) > -1;
18894
19098
  });
18895
19099
  _parentStatus = _selectItems.filter(function (item) {
18896
19100
  return _this33.findRowIndexOf(_vItems, item) > -1;
@@ -18905,11 +19109,11 @@ var Methods = {
18905
19109
  row: row
18906
19110
  })) {
18907
19111
  if (value) {
18908
- if (this.findRowIndexOf(selection, row) === -1) {
18909
- selection.push(row);
19112
+ if (this.findRowIndexOf(selectCheckboxRows, row) === -1) {
19113
+ selectCheckboxRows.push(row);
18910
19114
  }
18911
19115
  } else {
18912
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(selection, function (item) {
19116
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().remove(selectCheckboxRows, function (item) {
18913
19117
  return _this33.eqRow(item, row);
18914
19118
  });
18915
19119
  }
@@ -18920,11 +19124,11 @@ var Methods = {
18920
19124
  this.checkSelectionStatus();
18921
19125
  },
18922
19126
  handleToggleCheckRowEvent: function handleToggleCheckRowEvent(evnt, params) {
18923
- var selection = this.selection,
19127
+ var selectCheckboxRows = this.selectCheckboxRows,
18924
19128
  checkboxOpts = this.checkboxOpts;
18925
19129
  var checkField = checkboxOpts.checkField;
18926
19130
  var row = params.row;
18927
- var value = checkField ? !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField) : this.findRowIndexOf(selection, row) === -1;
19131
+ var value = checkField ? !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField) : this.findRowIndexOf(selectCheckboxRows, row) === -1;
18928
19132
  if (evnt) {
18929
19133
  this.triggerCheckRowEvent(evnt, params, value);
18930
19134
  } else {
@@ -18949,10 +19153,10 @@ var Methods = {
18949
19153
  * 多选,切换某一行的选中状态
18950
19154
  */
18951
19155
  toggleCheckboxRow: function toggleCheckboxRow(row) {
18952
- var selection = this.selection,
19156
+ var selectCheckboxRows = this.selectCheckboxRows,
18953
19157
  checkboxOpts = this.checkboxOpts;
18954
19158
  var checkField = checkboxOpts.checkField;
18955
- var value = checkField ? !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField) : this.findRowIndexOf(selection, row) === -1;
19159
+ var value = checkField ? !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, checkField) : this.findRowIndexOf(selectCheckboxRows, row) === -1;
18956
19160
  this.handleSelectRow({
18957
19161
  row: row
18958
19162
  }, value, true);
@@ -18963,7 +19167,7 @@ var Methods = {
18963
19167
  var afterFullData = this.afterFullData,
18964
19168
  treeConfig = this.treeConfig,
18965
19169
  treeOpts = this.treeOpts,
18966
- selection = this.selection,
19170
+ selectCheckboxRows = this.selectCheckboxRows,
18967
19171
  checkboxReserveRowMap = this.checkboxReserveRowMap,
18968
19172
  checkboxOpts = this.checkboxOpts;
18969
19173
  var checkField = checkboxOpts.checkField,
@@ -18971,7 +19175,7 @@ var Methods = {
18971
19175
  checkStrictly = checkboxOpts.checkStrictly,
18972
19176
  checkMethod = checkboxOpts.checkMethod;
18973
19177
  var selectRows = [];
18974
- var beforeSelection = treeConfig ? [] : selection.filter(function (row) {
19178
+ var beforeSelection = treeConfig ? [] : selectCheckboxRows.filter(function (row) {
18975
19179
  return _this34.findRowIndexOf(afterFullData, row) === -1;
18976
19180
  });
18977
19181
  if (checkStrictly) {
@@ -19026,7 +19230,7 @@ var Methods = {
19026
19230
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(afterFullData, function (row) {
19027
19231
  if (checkMethod({
19028
19232
  row: row
19029
- }) ? 0 : _this34.findRowIndexOf(selection, row) > -1) {
19233
+ }) ? 0 : _this34.findRowIndexOf(selectCheckboxRows, row) > -1) {
19030
19234
  selectRows.push(row);
19031
19235
  }
19032
19236
  }, treeOpts);
@@ -19041,7 +19245,7 @@ var Methods = {
19041
19245
  */
19042
19246
  if (!isForce && checkMethod) {
19043
19247
  selectRows = afterFullData.filter(function (row) {
19044
- return _this34.findRowIndexOf(selection, row) > -1 || checkMethod({
19248
+ return _this34.findRowIndexOf(selectCheckboxRows, row) > -1 || checkMethod({
19045
19249
  row: row
19046
19250
  });
19047
19251
  });
@@ -19058,7 +19262,7 @@ var Methods = {
19058
19262
  selectRows = afterFullData.filter(function (row) {
19059
19263
  return checkMethod({
19060
19264
  row: row
19061
- }) ? 0 : _this34.findRowIndexOf(selection, row) > -1;
19265
+ }) ? 0 : _this34.findRowIndexOf(selectCheckboxRows, row) > -1;
19062
19266
  });
19063
19267
  }
19064
19268
  }
@@ -19075,7 +19279,7 @@ var Methods = {
19075
19279
  });
19076
19280
  }
19077
19281
  }
19078
- this.selection = checkField ? [] : beforeSelection.concat(selectRows);
19282
+ this.selectCheckboxRows = checkField ? [] : beforeSelection.concat(selectRows);
19079
19283
  }
19080
19284
  this.treeIndeterminates = [];
19081
19285
  this.checkSelectionStatus();
@@ -19091,7 +19295,7 @@ var Methods = {
19091
19295
  checkSelectionStatus: function checkSelectionStatus() {
19092
19296
  var _this35 = this;
19093
19297
  var afterFullData = this.afterFullData,
19094
- selection = this.selection,
19298
+ selectCheckboxRows = this.selectCheckboxRows,
19095
19299
  treeIndeterminates = this.treeIndeterminates,
19096
19300
  checkboxOpts = this.checkboxOpts,
19097
19301
  treeConfig = this.treeConfig;
@@ -19151,22 +19355,22 @@ var Methods = {
19151
19355
  disableRows.push(row);
19152
19356
  return true;
19153
19357
  }
19154
- if (_this35.findRowIndexOf(selection, row) > -1) {
19358
+ if (_this35.findRowIndexOf(selectCheckboxRows, row) > -1) {
19155
19359
  checkRows.push(row);
19156
19360
  return true;
19157
19361
  }
19158
19362
  return false;
19159
19363
  } : function (row) {
19160
- return _this35.findRowIndexOf(selection, row) > -1;
19364
+ return _this35.findRowIndexOf(selectCheckboxRows, row) > -1;
19161
19365
  });
19162
19366
  isAllSelected = isAllResolve && afterFullData.length !== disableRows.length;
19163
19367
  if (treeConfig) {
19164
19368
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
19165
- return _this35.findRowIndexOf(treeIndeterminates, row) > -1 || _this35.findRowIndexOf(selection, row) > -1;
19369
+ return _this35.findRowIndexOf(treeIndeterminates, row) > -1 || _this35.findRowIndexOf(selectCheckboxRows, row) > -1;
19166
19370
  });
19167
19371
  } else {
19168
19372
  isIndeterminate = !isAllSelected && afterFullData.some(function (row) {
19169
- return _this35.findRowIndexOf(selection, row) > -1;
19373
+ return _this35.findRowIndexOf(selectCheckboxRows, row) > -1;
19170
19374
  });
19171
19375
  }
19172
19376
  }
@@ -19186,7 +19390,7 @@ var Methods = {
19186
19390
  radioReserveRow = this.radioReserveRow,
19187
19391
  radioOpts = this.radioOpts,
19188
19392
  checkboxOpts = this.checkboxOpts,
19189
- selection = this.selection,
19393
+ selectCheckboxRows = this.selectCheckboxRows,
19190
19394
  rowExpandeds = this.rowExpandeds,
19191
19395
  treeExpandeds = this.treeExpandeds,
19192
19396
  expandOpts = this.expandOpts;
@@ -19202,7 +19406,7 @@ var Methods = {
19202
19406
  }
19203
19407
  }
19204
19408
  // 复选框
19205
- this.selection = getRecoverRow(this, selection); // 刷新多选行状态
19409
+ this.selectCheckboxRows = getRecoverRow(this, selectCheckboxRows); // 刷新多选行状态
19206
19410
  // 还原保留选中状态
19207
19411
  if (checkboxOpts.reserve) {
19208
19412
  this.handleCheckedCheckboxRow(handleReserveRow(this, this.checkboxReserveRowMap), true, true);
@@ -19372,7 +19576,7 @@ var Methods = {
19372
19576
  }
19373
19577
  this.isAllSelected = false;
19374
19578
  this.isIndeterminate = false;
19375
- this.selection = [];
19579
+ this.selectCheckboxRows = [];
19376
19580
  this.treeIndeterminates = [];
19377
19581
  return this.$nextTick();
19378
19582
  },
@@ -19793,12 +19997,18 @@ var Methods = {
19793
19997
  });
19794
19998
  }
19795
19999
  var params = {
20000
+ $table: this,
20001
+ $event: evnt,
19796
20002
  column: column,
19797
20003
  field: field,
19798
20004
  property: field,
19799
20005
  order: column.order,
19800
- sortList: this.getSortColumns()
20006
+ sortList: this.getSortColumns(),
20007
+ sortTime: column.sortTime
19801
20008
  };
20009
+ if (this.mouseConfig && this.mouseOpts.area && this.handleSortEvent) {
20010
+ return this.handleSortEvent(evnt, params);
20011
+ }
19802
20012
  this.emitEvent('sort-change', params, evnt);
19803
20013
  }
19804
20014
  },
@@ -19848,7 +20058,10 @@ var Methods = {
19848
20058
  if (!remote || firstSortColumn && firstSortColumn.remoteSort) {
19849
20059
  this.handleTableData(true);
19850
20060
  }
19851
- return this.$nextTick().then(this.updateStyle);
20061
+ return this.$nextTick().then(function () {
20062
+ _this41.updateCellAreas();
20063
+ return _this41.updateStyle();
20064
+ });
19852
20065
  }
19853
20066
  return this.$nextTick();
19854
20067
  },
@@ -20051,7 +20264,19 @@ var Methods = {
20051
20264
  * @param {Boolean} expanded 是否展开
20052
20265
  */
20053
20266
  setAllRowExpand: function setAllRowExpand(expanded) {
20054
- return this.setRowExpand(this.expandOpts.lazy ? this.tableData : this.tableFullData, expanded);
20267
+ var treeConfig = this.treeConfig,
20268
+ treeOpts = this.treeOpts,
20269
+ tableFullData = this.tableFullData,
20270
+ tableFullTreeData = this.tableFullTreeData;
20271
+ var expandedRows = [];
20272
+ if (treeConfig) {
20273
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData, function (row) {
20274
+ expandedRows.push(row);
20275
+ }, treeOpts);
20276
+ } else {
20277
+ expandedRows = tableFullData;
20278
+ }
20279
+ return this.setRowExpand(expandedRows, expanded);
20055
20280
  },
20056
20281
  handleAsyncRowExpand: function handleAsyncRowExpand(row) {
20057
20282
  var _this44 = this;
@@ -20243,9 +20468,9 @@ var Methods = {
20243
20468
  var treeOpts = this.treeOpts,
20244
20469
  treeLazyLoadeds = this.treeLazyLoadeds;
20245
20470
  var transform = treeOpts.transform,
20246
- lazy = treeOpts.lazy,
20247
- hasChild = treeOpts.hasChild;
20248
- if (lazy && row[hasChild] && treeLazyLoadeds.indexOf(row) === -1) {
20471
+ lazy = treeOpts.lazy;
20472
+ var hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
20473
+ if (lazy && row[hasChildField] && treeLazyLoadeds.indexOf(row) === -1) {
20249
20474
  this.clearTreeExpandLoaded(row).then(function () {
20250
20475
  return _this47.handleAsyncTreeExpandChilds(row);
20251
20476
  }).then(function () {
@@ -20383,11 +20608,11 @@ var Methods = {
20383
20608
  setAllTreeExpand: function setAllTreeExpand(expanded) {
20384
20609
  var tableFullData = this.tableFullData,
20385
20610
  treeOpts = this.treeOpts;
20386
- var lazy = treeOpts.lazy,
20387
- children = treeOpts.children;
20611
+ var lazy = treeOpts.lazy;
20612
+ var childrenField = treeOpts.children || treeOpts.childrenField;
20388
20613
  var expandeds = [];
20389
20614
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullData, function (row) {
20390
- var rowChildren = row[children];
20615
+ var rowChildren = row[childrenField];
20391
20616
  if (lazy || rowChildren && rowChildren.length) {
20392
20617
  expandeds.push(row);
20393
20618
  }
@@ -20410,10 +20635,10 @@ var Methods = {
20410
20635
  treeNodeColumn = this.treeNodeColumn;
20411
20636
  var reserve = treeOpts.reserve,
20412
20637
  lazy = treeOpts.lazy,
20413
- hasChild = treeOpts.hasChild,
20414
- children = treeOpts.children,
20415
20638
  accordion = treeOpts.accordion,
20416
20639
  toggleMethod = treeOpts.toggleMethod;
20640
+ var childrenField = treeOpts.children || treeOpts.childrenField;
20641
+ var hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
20417
20642
  var result = [];
20418
20643
  var columnIndex = this.getColumnIndex(treeNodeColumn);
20419
20644
  var $columnIndex = this.getVMColumnIndex(treeNodeColumn);
@@ -20442,12 +20667,12 @@ var Methods = {
20442
20667
  validRows.forEach(function (row) {
20443
20668
  if (treeExpandeds.indexOf(row) === -1) {
20444
20669
  var rest = fullAllDataRowMap.get(row);
20445
- var isLoad = lazy && row[hasChild] && !rest.treeLoaded && treeLazyLoadeds.indexOf(row) === -1;
20670
+ var isLoad = lazy && row[hasChildField] && !rest.treeLoaded && treeLazyLoadeds.indexOf(row) === -1;
20446
20671
  // 是否使用懒加载
20447
20672
  if (isLoad) {
20448
20673
  result.push(_this49.handleAsyncTreeExpandChilds(row));
20449
20674
  } else {
20450
- if (row[children] && row[children].length) {
20675
+ if (row[childrenField] && row[childrenField].length) {
20451
20676
  treeExpandeds.push(row);
20452
20677
  }
20453
20678
  }
@@ -20932,16 +21157,16 @@ var Methods = {
20932
21157
  * 如果组件值 v-model 发生 change 时,调用改函数用于更新某一列编辑状态
20933
21158
  * 如果单元格配置了校验规则,则会进行校验
20934
21159
  */
20935
- updateStatus: function updateStatus(scope, cellValue) {
21160
+ updateStatus: function updateStatus(slotParams, cellValue) {
20936
21161
  var _this57 = this;
20937
21162
  var customVal = !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(cellValue);
20938
21163
  return this.$nextTick().then(function () {
20939
21164
  var $refs = _this57.$refs,
20940
21165
  editRules = _this57.editRules,
20941
21166
  validStore = _this57.validStore;
20942
- if (scope && $refs.tableBody && editRules) {
20943
- var row = scope.row,
20944
- column = scope.column;
21167
+ if (slotParams && $refs.tableBody && editRules) {
21168
+ var row = slotParams.row,
21169
+ column = slotParams.column;
20945
21170
  var type = 'change';
20946
21171
  if (_this57.hasCellRules(type, row, column)) {
20947
21172
  var cell = _this57.getCell(row, column);
@@ -21132,11 +21357,11 @@ var Methods = {
21132
21357
  columnIndex: this.getColumnIndex(column)
21133
21358
  };
21134
21359
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(formatter)) {
21135
- var globalFunc = formats.get(formatter);
21136
- cellLabel = globalFunc ? globalFunc(formatParams) : '';
21360
+ var gFormatOpts = formats.get(formatter);
21361
+ cellLabel = gFormatOpts && gFormatOpts.cellFormatMethod ? gFormatOpts.cellFormatMethod(formatParams) : '';
21137
21362
  } else if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(formatter)) {
21138
- var _globalFunc = formats.get(formatter[0]);
21139
- cellLabel = _globalFunc ? _globalFunc.apply(void 0, [formatParams].concat(_toConsumableArray(formatter.slice(1)))) : '';
21363
+ var _gFormatOpts = formats.get(formatter[0]);
21364
+ cellLabel = _gFormatOpts && _gFormatOpts.cellFormatMethod ? _gFormatOpts.cellFormatMethod.apply(_gFormatOpts, [formatParams].concat(_toConsumableArray(formatter.slice(1)))) : '';
21140
21365
  } else {
21141
21366
  cellLabel = formatter(formatParams);
21142
21367
  }
@@ -21264,6 +21489,7 @@ var Loading = Object.assign(loading, {
21264
21489
 
21265
21490
 
21266
21491
 
21492
+
21267
21493
 
21268
21494
 
21269
21495
  /**
@@ -21354,6 +21580,13 @@ function handleUupdateResize(_vm) {
21354
21580
  data: Array,
21355
21581
  // 表格的高度
21356
21582
  height: [Number, String],
21583
+ // 表格的最小高度
21584
+ minHeight: {
21585
+ type: [Number, String],
21586
+ "default": function _default() {
21587
+ return conf.table.minHeight;
21588
+ }
21589
+ },
21357
21590
  // 表格的最大高度
21358
21591
  maxHeight: [Number, String],
21359
21592
  // 已废弃,被 column-config.resizable 替换
@@ -21675,7 +21908,7 @@ function handleUupdateResize(_vm) {
21675
21908
  // 复选框属性,有选中且非全选状态
21676
21909
  isIndeterminate: false,
21677
21910
  // 复选框属性,已选中的行
21678
- selection: [],
21911
+ selectCheckboxRows: [],
21679
21912
  // 当前行
21680
21913
  currentRow: null,
21681
21914
  // 单选框属性,选中列
@@ -22273,6 +22506,7 @@ function handleUupdateResize(_vm) {
22273
22506
  this.preventEvent(null, 'destroyed');
22274
22507
  },
22275
22508
  render: function render(h) {
22509
+ var _ref;
22276
22510
  var _e = this._e,
22277
22511
  $scopedSlots = this.$scopedSlots,
22278
22512
  tId = this.tId,
@@ -22311,33 +22545,12 @@ function handleUupdateResize(_vm) {
22311
22545
  hasTip = this.hasTip,
22312
22546
  columnOpts = this.columnOpts,
22313
22547
  rowOpts = this.rowOpts,
22314
- loadingOpts = this.loadingOpts;
22548
+ loadingOpts = this.loadingOpts,
22549
+ editRules = this.editRules;
22315
22550
  var leftList = columnStore.leftList,
22316
22551
  rightList = columnStore.rightList;
22317
22552
  return h('div', {
22318
- "class": ['vxe-table', 'vxe-table--render-default', "tid_".concat(tId), vSize ? "size--".concat(vSize) : '', "border--".concat(tableBorder), {
22319
- 'vxe-editable': !!editConfig,
22320
- 'cell--highlight': highlightCell,
22321
- 'cell--selected': mouseConfig && mouseOpts.selected,
22322
- 'cell--area': mouseConfig && mouseOpts.area,
22323
- 'row--highlight': rowOpts.isHover || highlightHoverRow,
22324
- 'column--highlight': columnOpts.isHover || highlightHoverColumn,
22325
- 'is--header': showHeader,
22326
- 'is--footer': showFooter,
22327
- 'is--group': isGroup,
22328
- 'is--tree-line': treeConfig && treeOpts.line,
22329
- 'is--fixed-left': leftList.length,
22330
- 'is--fixed-right': rightList.length,
22331
- 'is--animat': !!this.animat,
22332
- 'is--round': this.round,
22333
- 'is--stripe': !treeConfig && stripe,
22334
- 'is--loading': loading,
22335
- 'is--empty': !loading && !tableData.length,
22336
- 'is--scroll-y': overflowY,
22337
- 'is--scroll-x': overflowX,
22338
- 'is--virtual-x': scrollXLoad,
22339
- 'is--virtual-y': scrollYLoad
22340
- }],
22553
+ "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.showLine || 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)],
22341
22554
  on: {
22342
22555
  keydown: this.keydownEvent
22343
22556
  }
@@ -22956,12 +23169,9 @@ var Table = Object.assign(table, {
22956
23169
  }
22957
23170
  });
22958
23171
  var filterList = this.getCheckedFilters();
22959
- // 如果是服务端筛选,则跳过本地筛选处理
22960
- if (!filterOpts.remote) {
22961
- this.handleTableData(true);
22962
- this.checkSelectionStatus();
22963
- }
22964
- this.emitEvent('filter-change', {
23172
+ var params = {
23173
+ $table: this,
23174
+ $event: evnt,
22965
23175
  column: column,
22966
23176
  field: field,
22967
23177
  property: field,
@@ -22969,7 +23179,16 @@ var Table = Object.assign(table, {
22969
23179
  datas: datas,
22970
23180
  filters: filterList,
22971
23181
  filterList: filterList
22972
- }, evnt);
23182
+ };
23183
+ // 如果是服务端筛选,则跳过本地筛选处理
23184
+ if (!filterOpts.remote) {
23185
+ this.handleTableData(true);
23186
+ this.checkSelectionStatus();
23187
+ }
23188
+ if (this.mouseConfig && this.mouseOpts.area && this.handleFilterEvent) {
23189
+ this.handleFilterEvent(evnt, params);
23190
+ }
23191
+ this.emitEvent('filter-change', params, evnt);
22973
23192
  this.closeFilter();
22974
23193
  this.updateFooter().then(function () {
22975
23194
  var scrollXLoad = _this2.scrollXLoad,
@@ -23473,15 +23692,15 @@ var Filter = {
23473
23692
  ctxMenuLinkEvent: function ctxMenuLinkEvent(evnt, menu) {
23474
23693
  // 如果一级菜单有配置 code 则允许点击,否则不能点击
23475
23694
  if (!menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
23476
- var ctxMenuMethod = v_x_e_table.menus.get(menu.code);
23695
+ var gMenuOpts = v_x_e_table.menus.get(menu.code);
23477
23696
  var params = Object.assign({
23478
23697
  menu: menu,
23479
23698
  $grid: this.$xegrid,
23480
23699
  $table: this,
23481
23700
  $event: evnt
23482
23701
  }, this.ctxMenuStore.args);
23483
- if (ctxMenuMethod) {
23484
- ctxMenuMethod.call(this, params, evnt);
23702
+ if (gMenuOpts && gMenuOpts.menuMethod) {
23703
+ gMenuOpts.menuMethod(params, evnt);
23485
23704
  }
23486
23705
  // 在 v4 中废弃事件 context-menu-click
23487
23706
  if (this.$listeners['context-menu-click']) {
@@ -23549,8 +23768,8 @@ function insertTreeRow(_vm, newRecords, isAppend) {
23549
23768
  treeOpts = _vm.treeOpts;
23550
23769
  var rowField = treeOpts.rowField,
23551
23770
  parentField = treeOpts.parentField,
23552
- children = treeOpts.children,
23553
- mapChildren = treeOpts.mapChildren;
23771
+ mapChildrenField = treeOpts.mapChildrenField;
23772
+ var childrenField = treeOpts.children || treeOpts.childrenField;
23554
23773
  var funcName = isAppend ? 'push' : 'unshift';
23555
23774
  newRecords.forEach(function (item) {
23556
23775
  var parentRowId = item[parentField];
@@ -23558,15 +23777,15 @@ function insertTreeRow(_vm, newRecords, isAppend) {
23558
23777
  var matchObj = parentRowId ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(tableFullTreeData, function (item) {
23559
23778
  return parentRowId === item[rowField];
23560
23779
  }, {
23561
- children: mapChildren
23780
+ children: mapChildrenField
23562
23781
  }) : null;
23563
23782
  if (matchObj) {
23564
23783
  var parentRow = matchObj.item;
23565
23784
  var parentRest = fullAllDataRowIdData[getRowid(_vm, parentRow)];
23566
23785
  var parentLevel = parentRest ? parentRest.level : 0;
23567
- var parentChilds = parentRow[children];
23786
+ var parentChilds = parentRow[childrenField];
23568
23787
  if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(parentChilds)) {
23569
- parentChilds = parentRow[children] = [];
23788
+ parentChilds = parentRow[childrenField] = [];
23570
23789
  }
23571
23790
  parentChilds[funcName](item);
23572
23791
  var rest = {
@@ -23633,7 +23852,7 @@ function insertTreeRow(_vm, newRecords, isAppend) {
23633
23852
  treeOpts = this.treeOpts;
23634
23853
  var transform = treeOpts.transform,
23635
23854
  rowField = treeOpts.rowField,
23636
- mapChildren = treeOpts.mapChildren;
23855
+ mapChildrenField = treeOpts.mapChildrenField;
23637
23856
  if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(records)) {
23638
23857
  records = [records];
23639
23858
  }
@@ -23678,7 +23897,7 @@ function insertTreeRow(_vm, newRecords, isAppend) {
23678
23897
  var matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(tableFullTreeData, function (item) {
23679
23898
  return row[rowField] === item[rowField];
23680
23899
  }, {
23681
- children: mapChildren
23900
+ children: mapChildrenField
23682
23901
  });
23683
23902
  if (matchObj) {
23684
23903
  var parentRow = matchObj.parent;
@@ -23784,7 +24003,7 @@ function insertTreeRow(_vm, newRecords, isAppend) {
23784
24003
  mergeList = this.mergeList,
23785
24004
  editStore = this.editStore,
23786
24005
  checkboxOpts = this.checkboxOpts,
23787
- selection = this.selection,
24006
+ selectCheckboxRows = this.selectCheckboxRows,
23788
24007
  isInsertByRow = this.isInsertByRow,
23789
24008
  treeOpts = this.treeOpts;
23790
24009
  var transform = treeOpts.transform;
@@ -23808,9 +24027,9 @@ function insertTreeRow(_vm, newRecords, isAppend) {
23808
24027
  // 如果绑定了多选属性,则更新状态
23809
24028
  if (!checkField) {
23810
24029
  rows.forEach(function (row) {
23811
- var sIndex = _this2.findRowIndexOf(selection, row);
24030
+ var sIndex = _this2.findRowIndexOf(selectCheckboxRows, row);
23812
24031
  if (sIndex > -1) {
23813
- selection.splice(sIndex, 1);
24032
+ selectCheckboxRows.splice(sIndex, 1);
23814
24033
  }
23815
24034
  });
23816
24035
  }
@@ -26196,7 +26415,12 @@ function renderExtraSuffixIcon(h, _vm) {
26196
26415
  },
26197
26416
  readonly: Boolean,
26198
26417
  disabled: Boolean,
26199
- placeholder: String,
26418
+ placeholder: {
26419
+ type: String,
26420
+ "default": function _default() {
26421
+ 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;
26422
+ }
26423
+ },
26200
26424
  maxlength: [String, Number],
26201
26425
  autocomplete: {
26202
26426
  type: String,
@@ -26888,6 +27112,11 @@ function renderExtraSuffixIcon(h, _vm) {
26888
27112
  this.isActivated = false;
26889
27113
  return this.$nextTick();
26890
27114
  },
27115
+ select: function select() {
27116
+ this.$refs.input.select();
27117
+ this.isActivated = false;
27118
+ return this.$nextTick();
27119
+ },
26891
27120
  triggerEvent: function triggerEvent(evnt) {
26892
27121
  var $refs = this.$refs,
26893
27122
  inputValue = this.inputValue;
@@ -28396,7 +28625,12 @@ function renderOpts(h, _vm) {
28396
28625
  props: {
28397
28626
  value: null,
28398
28627
  clearable: Boolean,
28399
- placeholder: String,
28628
+ placeholder: {
28629
+ type: String,
28630
+ "default": function _default() {
28631
+ 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;
28632
+ }
28633
+ },
28400
28634
  loading: Boolean,
28401
28635
  disabled: Boolean,
28402
28636
  multiple: Boolean,
@@ -28414,6 +28648,7 @@ function renderOpts(h, _vm) {
28414
28648
  optionGroupProps: Object,
28415
28649
  optionConfig: Object,
28416
28650
  className: [String, Function],
28651
+ popupClassName: [String, Function],
28417
28652
  max: [String, Number],
28418
28653
  size: {
28419
28654
  type: String,
@@ -28601,6 +28836,7 @@ function renderOpts(h, _vm) {
28601
28836
  $scopedSlots = this.$scopedSlots,
28602
28837
  vSize = this.vSize,
28603
28838
  className = this.className,
28839
+ popupClassName = this.popupClassName,
28604
28840
  inited = this.inited,
28605
28841
  isActivated = this.isActivated,
28606
28842
  loading = this.loading,
@@ -28641,7 +28877,9 @@ function renderOpts(h, _vm) {
28641
28877
  } : {}
28642
28878
  }), h('div', {
28643
28879
  ref: 'panel',
28644
- "class": ['vxe-table--ignore-clear vxe-select--panel', (_ref2 = {}, _defineProperty(_ref2, "size--".concat(vSize), vSize), _defineProperty(_ref2, 'is--transfer', this.transfer), _defineProperty(_ref2, 'animat--leave', !loading && this.animatVisible), _defineProperty(_ref2, 'animat--enter', !loading && visiblePanel), _ref2)],
28880
+ "class": ['vxe-table--ignore-clear vxe-select--panel', popupClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(popupClassName) ? popupClassName({
28881
+ $select: this
28882
+ }) : popupClassName : '', (_ref2 = {}, _defineProperty(_ref2, "size--".concat(vSize), vSize), _defineProperty(_ref2, 'is--transfer', this.transfer), _defineProperty(_ref2, 'animat--leave', !loading && this.animatVisible), _defineProperty(_ref2, 'animat--enter', !loading && visiblePanel), _ref2)],
28645
28883
  attrs: {
28646
28884
  placement: this.panelPlacement
28647
28885
  },
@@ -30082,7 +30320,8 @@ function getExportBlobByContent(content, options) {
30082
30320
  }
30083
30321
  function hasTreeChildren($xetable, row) {
30084
30322
  var treeOpts = $xetable.treeOpts;
30085
- return row[treeOpts.children] && row[treeOpts.children].length > 0;
30323
+ var childrenField = treeOpts.children || treeOpts.childrenField;
30324
+ return row[childrenField] && row[childrenField].length > 0;
30086
30325
  }
30087
30326
  function getSeq($xetable, row, $rowIndex, column, $columnIndex) {
30088
30327
  var seqOpts = $xetable.seqOpts;
@@ -30120,7 +30359,8 @@ function getLabelData($xetable, opts, columns, datas) {
30120
30359
  var treeConfig = $xetable.treeConfig,
30121
30360
  treeOpts = $xetable.treeOpts,
30122
30361
  radioOpts = $xetable.radioOpts,
30123
- checkboxOpts = $xetable.checkboxOpts;
30362
+ checkboxOpts = $xetable.checkboxOpts,
30363
+ columnOpts = $xetable.columnOpts;
30124
30364
  if (!htmlCellElem) {
30125
30365
  htmlCellElem = document.createElement('div');
30126
30366
  }
@@ -30142,15 +30382,18 @@ function getLabelData($xetable, opts, columns, datas) {
30142
30382
  columns.forEach(function (column, $columnIndex) {
30143
30383
  var cellValue = '';
30144
30384
  var renderOpts = column.editRender || column.cellRender;
30145
- var exportLabelMethod = column.exportMethod;
30146
- if (!exportLabelMethod && renderOpts && renderOpts.name) {
30385
+ var bodyExportMethod = column.exportMethod;
30386
+ if (!bodyExportMethod && renderOpts && renderOpts.name) {
30147
30387
  var compConf = v_x_e_table.renderer.get(renderOpts.name);
30148
30388
  if (compConf) {
30149
- exportLabelMethod = compConf.exportMethod || compConf.cellExportMethod;
30389
+ bodyExportMethod = compConf.exportMethod || compConf.cellExportMethod;
30150
30390
  }
30151
30391
  }
30152
- if (exportLabelMethod) {
30153
- cellValue = exportLabelMethod({
30392
+ if (!bodyExportMethod) {
30393
+ bodyExportMethod = columnOpts.exportMethod;
30394
+ }
30395
+ if (bodyExportMethod) {
30396
+ cellValue = bodyExportMethod({
30154
30397
  $table: $xetable,
30155
30398
  row: row,
30156
30399
  column: column,
@@ -30282,23 +30525,29 @@ function getBooleanValue(cellValue) {
30282
30525
  return cellValue === 'TRUE' || cellValue === 'true' || cellValue === true;
30283
30526
  }
30284
30527
  function getHeaderTitle($xetable, opts, column) {
30285
- var headerExportMethod = column.headerExportMethod;
30286
- return headerExportMethod ? headerExportMethod({
30528
+ var columnOpts = $xetable.columnOpts;
30529
+ var headExportMethod = column.headerExportMethod || columnOpts.headerExportMethod;
30530
+ return headExportMethod ? headExportMethod({
30287
30531
  column: column,
30532
+ options: opts,
30288
30533
  $table: $xetable
30289
30534
  }) : (opts.original ? column.property : column.getTitle()) || '';
30290
30535
  }
30291
30536
  function getFooterCellValue($xetable, opts, items, column) {
30537
+ var columnOpts = $xetable.columnOpts;
30292
30538
  var renderOpts = column.editRender || column.cellRender;
30293
- var exportLabelMethod = column.footerExportMethod;
30294
- if (!exportLabelMethod && renderOpts && renderOpts.name) {
30539
+ var footLabelMethod = column.footerExportMethod;
30540
+ if (!footLabelMethod && renderOpts && renderOpts.name) {
30295
30541
  var compConf = v_x_e_table.renderer.get(renderOpts.name);
30296
30542
  if (compConf) {
30297
- exportLabelMethod = compConf.footerExportMethod || compConf.footerCellExportMethod;
30543
+ footLabelMethod = compConf.footerExportMethod || compConf.footerCellExportMethod;
30298
30544
  }
30299
30545
  }
30546
+ if (!footLabelMethod) {
30547
+ footLabelMethod = columnOpts.footerExportMethod;
30548
+ }
30300
30549
  var _columnIndex = $xetable.getVTColumnIndex(column);
30301
- var cellValue = exportLabelMethod ? exportLabelMethod({
30550
+ var cellValue = footLabelMethod ? footLabelMethod({
30302
30551
  $table: $xetable,
30303
30552
  items: items,
30304
30553
  itemIndex: _columnIndex,
@@ -32143,6 +32392,8 @@ var Keyboard = {
32143
32392
 
32144
32393
 
32145
32394
 
32395
+
32396
+
32146
32397
 
32147
32398
 
32148
32399
 
@@ -32213,12 +32464,14 @@ function validErrorRuleValue(rule, val) {
32213
32464
  * 完整校验,和 validate 的区别就是会给有效数据中的每一行进行校验
32214
32465
  */
32215
32466
  _fullValidate: function _fullValidate(rows, cb) {
32467
+ if (false) {}
32216
32468
  return this.beginValidate(rows, cb, true);
32217
32469
  },
32218
32470
  /**
32219
32471
  * 快速校验,如果存在记录不通过的记录,则返回不再继续校验(异步校验除外)
32220
32472
  */
32221
32473
  _validate: function _validate(rows, cb) {
32474
+ if (false) {}
32222
32475
  return this.beginValidate(rows, cb);
32223
32476
  },
32224
32477
  /**
@@ -32410,10 +32663,11 @@ function validErrorRuleValue(rule, val) {
32410
32663
  rules.forEach(function (rule) {
32411
32664
  var type = rule.type,
32412
32665
  trigger = rule.trigger,
32413
- required = rule.required;
32666
+ required = rule.required,
32667
+ validator = rule.validator;
32414
32668
  if (validType === 'all' || !trigger || validType === trigger) {
32415
- if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rule.validator)) {
32416
- var customValid = rule.validator({
32669
+ if (validator) {
32670
+ var validParams = {
32417
32671
  cellValue: cellValue,
32418
32672
  rule: rule,
32419
32673
  rules: rules,
@@ -32423,7 +32677,22 @@ function validErrorRuleValue(rule, val) {
32423
32677
  columnIndex: _this3.getColumnIndex(column),
32424
32678
  field: column.property,
32425
32679
  $table: _this3
32426
- });
32680
+ };
32681
+ var customValid;
32682
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(validator)) {
32683
+ var gvItem = v_x_e_table.validators.get(validator);
32684
+ if (gvItem) {
32685
+ if (gvItem.cellValidatorMethod) {
32686
+ customValid = gvItem.cellValidatorMethod(validParams);
32687
+ } else {
32688
+ if (false) {}
32689
+ }
32690
+ } else {
32691
+ if (false) {}
32692
+ }
32693
+ } else {
32694
+ customValid = validator(validParams);
32695
+ }
32427
32696
  if (customValid) {
32428
32697
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isError(customValid)) {
32429
32698
  _this3.validRuleErr = true;
@@ -33990,14 +34259,16 @@ Object.keys(packages_table.methods).forEach(function (name) {
33990
34259
  }
33991
34260
  default:
33992
34261
  {
33993
- var btnMethod = v_x_e_table.commands.get(code);
33994
- if (btnMethod) {
33995
- btnMethod.apply(void 0, [{
34262
+ var gCommandOpts = v_x_e_table.commands.get(code);
34263
+ if (gCommandOpts.commandMethod) {
34264
+ gCommandOpts.commandMethod.apply(gCommandOpts, [{
33996
34265
  code: code,
33997
34266
  button: button,
33998
34267
  $grid: this,
33999
34268
  $table: $xetable
34000
34269
  }].concat(args));
34270
+ } else {
34271
+ if (false) {}
34001
34272
  }
34002
34273
  }
34003
34274
  }
@@ -34703,7 +34974,8 @@ function renderCustoms(h, _vm) {
34703
34974
  created: function created() {
34704
34975
  var _this = this;
34705
34976
  var refresh = this.refresh,
34706
- refreshOpts = this.refreshOpts;
34977
+ refreshOpts = this.refreshOpts,
34978
+ customOpts = this.customOpts;
34707
34979
  this.$nextTick(function () {
34708
34980
  var $xetable = _this.fintTable();
34709
34981
  var queryMethod = refreshOpts.queryMethod || refreshOpts.query;
@@ -35031,7 +35303,7 @@ function renderCustoms(h, _vm) {
35031
35303
  if ($xegrid) {
35032
35304
  $xegrid.triggerToolbarBtnEvent(item, evnt);
35033
35305
  } else {
35034
- var commandMethod = v_x_e_table.commands.get(code);
35306
+ var gCommandOpts = v_x_e_table.commands.get(code);
35035
35307
  var params = {
35036
35308
  code: code,
35037
35309
  button: item,
@@ -35039,8 +35311,12 @@ function renderCustoms(h, _vm) {
35039
35311
  $grid: $xegrid,
35040
35312
  $event: evnt
35041
35313
  };
35042
- if (commandMethod) {
35043
- commandMethod.call(this, params, evnt);
35314
+ if (gCommandOpts) {
35315
+ if (gCommandOpts.commandMethod) {
35316
+ gCommandOpts.commandMethod(params);
35317
+ } else {
35318
+ if (false) {}
35319
+ }
35044
35320
  }
35045
35321
  this.$emit('button-click', params);
35046
35322
  }
@@ -35054,7 +35330,7 @@ function renderCustoms(h, _vm) {
35054
35330
  if ($xegrid) {
35055
35331
  $xegrid.triggerToolbarTolEvent(item, evnt);
35056
35332
  } else {
35057
- var commandMethod = v_x_e_table.commands.get(code);
35333
+ var gCommandOpts = v_x_e_table.commands.get(code);
35058
35334
  var params = {
35059
35335
  code: code,
35060
35336
  tool: item,
@@ -35062,8 +35338,12 @@ function renderCustoms(h, _vm) {
35062
35338
  $table: $xetable,
35063
35339
  $event: evnt
35064
35340
  };
35065
- if (commandMethod) {
35066
- commandMethod.call(this, params, evnt);
35341
+ if (gCommandOpts) {
35342
+ if (gCommandOpts.commandMethod) {
35343
+ gCommandOpts.commandMethod(params);
35344
+ } else {
35345
+ if (false) {}
35346
+ }
35067
35347
  }
35068
35348
  this.$emit('tool-click', params);
35069
35349
  }
@@ -35941,7 +36221,12 @@ var autoTxtElem;
35941
36221
  name: String,
35942
36222
  readonly: Boolean,
35943
36223
  disabled: Boolean,
35944
- placeholder: String,
36224
+ placeholder: {
36225
+ type: String,
36226
+ "default": function _default() {
36227
+ 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;
36228
+ }
36229
+ },
35945
36230
  maxlength: [String, Number],
35946
36231
  rows: {
35947
36232
  type: [String, Number],
@@ -36230,7 +36515,8 @@ var Textarea = Object.assign(src_textarea, {
36230
36515
  disabled: Boolean,
36231
36516
  loading: Boolean,
36232
36517
  destroyOnClose: Boolean,
36233
- className: String,
36518
+ className: [String, Function],
36519
+ popupClassName: [String, Function],
36234
36520
  transfer: {
36235
36521
  type: Boolean,
36236
36522
  "default": function _default() {
@@ -36280,6 +36566,7 @@ var Textarea = Object.assign(src_textarea, {
36280
36566
  var $scopedSlots = this.$scopedSlots,
36281
36567
  $listeners = this.$listeners,
36282
36568
  className = this.className,
36569
+ popupClassName = this.popupClassName,
36283
36570
  inited = this.inited,
36284
36571
  type = this.type,
36285
36572
  destroyOnClose = this.destroyOnClose,
@@ -36295,7 +36582,9 @@ var Textarea = Object.assign(src_textarea, {
36295
36582
  panelPlacement = this.panelPlacement;
36296
36583
  var downsSlot = $scopedSlots.dropdowns;
36297
36584
  return downsSlot ? h('div', {
36298
- "class": ['vxe-button--dropdown', className, (_ref = {}, _defineProperty(_ref, "size--".concat(vSize), vSize), _defineProperty(_ref, 'is--active', showPanel), _ref)]
36585
+ "class": ['vxe-button--dropdown', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
36586
+ $button: this
36587
+ }) : className : '', (_ref = {}, _defineProperty(_ref, "size--".concat(vSize), vSize), _defineProperty(_ref, 'is--active', showPanel), _ref)]
36299
36588
  }, [h('button', {
36300
36589
  ref: 'xBtn',
36301
36590
  "class": ['vxe-button', "type--".concat(btnType), (_ref2 = {}, _defineProperty(_ref2, "size--".concat(vSize), vSize), _defineProperty(_ref2, "theme--".concat(status), status), _defineProperty(_ref2, 'is--round', this.round), _defineProperty(_ref2, 'is--circle', this.circle), _defineProperty(_ref2, 'is--disabled', disabled || loading), _defineProperty(_ref2, 'is--loading', loading), _ref2)],
@@ -36318,7 +36607,9 @@ var Textarea = Object.assign(src_textarea, {
36318
36607
  "class": "vxe-button--dropdown-arrow ".concat(conf.icon.BUTTON_DROPDOWN)
36319
36608
  })])), h('div', {
36320
36609
  ref: 'panel',
36321
- "class": ['vxe-button--dropdown-panel', (_ref3 = {}, _defineProperty(_ref3, "size--".concat(vSize), vSize), _defineProperty(_ref3, 'animat--leave', animatVisible), _defineProperty(_ref3, 'animat--enter', showPanel), _ref3)],
36610
+ "class": ['vxe-button--dropdown-panel', popupClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(popupClassName) ? popupClassName({
36611
+ $button: this
36612
+ }) : popupClassName : '', (_ref3 = {}, _defineProperty(_ref3, "size--".concat(vSize), vSize), _defineProperty(_ref3, 'animat--leave', animatVisible), _defineProperty(_ref3, 'animat--enter', showPanel), _ref3)],
36322
36613
  attrs: {
36323
36614
  placement: panelPlacement
36324
36615
  },
@@ -36820,6 +37111,7 @@ function renderContent(h, _vm) {
36820
37111
  },
36821
37112
  useHTML: Boolean,
36822
37113
  zIndex: [String, Number],
37114
+ popupClassName: [String, Function],
36823
37115
  isArrow: {
36824
37116
  type: Boolean,
36825
37117
  "default": true
@@ -36929,6 +37221,7 @@ function renderContent(h, _vm) {
36929
37221
  var _ref;
36930
37222
  var $scopedSlots = this.$scopedSlots,
36931
37223
  vSize = this.vSize,
37224
+ popupClassName = this.popupClassName,
36932
37225
  theme = this.theme,
36933
37226
  tipActive = this.tipActive,
36934
37227
  isArrow = this.isArrow,
@@ -36943,7 +37236,9 @@ function renderContent(h, _vm) {
36943
37236
  };
36944
37237
  }
36945
37238
  return h('div', {
36946
- "class": ['vxe-table--tooltip-wrapper', "theme--".concat(theme), (_ref = {}, _defineProperty(_ref, "size--".concat(vSize), vSize), _defineProperty(_ref, "placement--".concat(tipStore.placement), tipStore.placement), _defineProperty(_ref, 'is--enterable', enterable), _defineProperty(_ref, 'is--visible', visible), _defineProperty(_ref, 'is--arrow', isArrow), _defineProperty(_ref, 'is--actived', tipActive), _ref)],
37239
+ "class": ['vxe-table--tooltip-wrapper', "theme--".concat(theme), popupClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(popupClassName) ? popupClassName({
37240
+ $tooltip: this
37241
+ }) : popupClassName : '', (_ref = {}, _defineProperty(_ref, "size--".concat(vSize), vSize), _defineProperty(_ref, "placement--".concat(tipStore.placement), tipStore.placement), _defineProperty(_ref, 'is--enterable', enterable), _defineProperty(_ref, 'is--visible', visible), _defineProperty(_ref, 'is--arrow', isArrow), _defineProperty(_ref, 'is--actived', tipActive), _ref)],
36947
37242
  style: tipStore.style,
36948
37243
  ref: 'tipWrapper',
36949
37244
  on: on
@@ -37923,7 +38218,9 @@ function getResetValue(value, resetValue) {
37923
38218
  validateField: function validateField(fieldOrItem, callback) {
37924
38219
  var _this7 = this;
37925
38220
  var fields = [];
37926
- if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrItem)) {
38221
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrItem)) {
38222
+ fields = fieldOrItem;
38223
+ } else {
37927
38224
  fields = [fieldOrItem];
37928
38225
  }
37929
38226
  return this.beginValidate(fields.map(function (field) {
@@ -38021,10 +38318,11 @@ function getResetValue(value, resetValue) {
38021
38318
  rules.forEach(function (rule) {
38022
38319
  var type = rule.type,
38023
38320
  trigger = rule.trigger,
38024
- required = rule.required;
38321
+ required = rule.required,
38322
+ validator = rule.validator;
38025
38323
  if (validType === 'all' || !trigger || validType === rule.trigger) {
38026
- if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rule.validator)) {
38027
- var customValid = rule.validator({
38324
+ if (validator) {
38325
+ var validParams = {
38028
38326
  itemValue: itemValue,
38029
38327
  rule: rule,
38030
38328
  rules: rules,
@@ -38032,7 +38330,22 @@ function getResetValue(value, resetValue) {
38032
38330
  field: property,
38033
38331
  property: property,
38034
38332
  $form: _this9
38035
- });
38333
+ };
38334
+ var customValid;
38335
+ if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(validator)) {
38336
+ var gvItem = v_x_e_table.validators.get(validator);
38337
+ if (gvItem) {
38338
+ if (gvItem.itemValidatorMethod) {
38339
+ customValid = gvItem.itemValidatorMethod(validParams);
38340
+ } else {
38341
+ if (false) {}
38342
+ }
38343
+ } else {
38344
+ if (false) {}
38345
+ }
38346
+ } else {
38347
+ customValid = validator(validParams);
38348
+ }
38036
38349
  if (customValid) {
38037
38350
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isError(customValid)) {
38038
38351
  errorRules.push(new form_Rule({
@@ -39066,6 +39379,7 @@ var List = Object.assign(list, {
39066
39379
 
39067
39380
 
39068
39381
 
39382
+
39069
39383
  /* harmony default export */ const pulldown = ({
39070
39384
  name: 'VxePulldown',
39071
39385
  mixins: [size],
@@ -39079,6 +39393,8 @@ var List = Object.assign(list, {
39079
39393
  return conf.size;
39080
39394
  }
39081
39395
  },
39396
+ className: [String, Function],
39397
+ popupClassName: [String, Function],
39082
39398
  destroyOnClose: Boolean,
39083
39399
  transfer: Boolean
39084
39400
  },
@@ -39123,6 +39439,8 @@ var List = Object.assign(list, {
39123
39439
  var _ref, _ref2;
39124
39440
  var $scopedSlots = this.$scopedSlots,
39125
39441
  inited = this.inited,
39442
+ className = this.className,
39443
+ popupClassName = this.popupClassName,
39126
39444
  vSize = this.vSize,
39127
39445
  destroyOnClose = this.destroyOnClose,
39128
39446
  transfer = this.transfer,
@@ -39135,7 +39453,9 @@ var List = Object.assign(list, {
39135
39453
  var defaultSlot = $scopedSlots["default"];
39136
39454
  var downSlot = $scopedSlots.dropdown;
39137
39455
  return h('div', {
39138
- "class": ['vxe-pulldown', (_ref = {}, _defineProperty(_ref, "size--".concat(vSize), vSize), _defineProperty(_ref, 'is--visivle', visiblePanel), _defineProperty(_ref, 'is--disabled', disabled), _defineProperty(_ref, 'is--active', isActivated), _ref)]
39456
+ "class": ['vxe-pulldown', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
39457
+ $pulldown: this
39458
+ }) : className : '', (_ref = {}, _defineProperty(_ref, "size--".concat(vSize), vSize), _defineProperty(_ref, 'is--visivle', visiblePanel), _defineProperty(_ref, 'is--disabled', disabled), _defineProperty(_ref, 'is--active', isActivated), _ref)]
39139
39459
  }, [h('div', {
39140
39460
  ref: 'content',
39141
39461
  "class": 'vxe-pulldown--content'
@@ -39143,7 +39463,9 @@ var List = Object.assign(list, {
39143
39463
  $pulldown: this
39144
39464
  }, h) : []), h('div', {
39145
39465
  ref: 'panel',
39146
- "class": ['vxe-table--ignore-clear vxe-pulldown--panel', (_ref2 = {}, _defineProperty(_ref2, "size--".concat(vSize), vSize), _defineProperty(_ref2, 'is--transfer', transfer), _defineProperty(_ref2, 'animat--leave', animatVisible), _defineProperty(_ref2, 'animat--enter', visiblePanel), _ref2)],
39466
+ "class": ['vxe-table--ignore-clear vxe-pulldown--panel', popupClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(popupClassName) ? popupClassName({
39467
+ $pulldown: this
39468
+ }) : popupClassName : '', (_ref2 = {}, _defineProperty(_ref2, "size--".concat(vSize), vSize), _defineProperty(_ref2, 'is--transfer', transfer), _defineProperty(_ref2, 'animat--leave', animatVisible), _defineProperty(_ref2, 'animat--enter', visiblePanel), _ref2)],
39147
39469
  attrs: {
39148
39470
  placement: panelPlacement
39149
39471
  },
@@ -39358,6 +39680,10 @@ var Pulldown = Object.assign(pulldown, {
39358
39680
  ;// CONCATENATED MODULE: ./packages/locale/lang/zh-CN.js
39359
39681
  /* harmony default export */ const zh_CN = ({
39360
39682
  vxe: {
39683
+ base: {
39684
+ pleaseInput: '请输入',
39685
+ pleaseSelect: '请选择'
39686
+ },
39361
39687
  loading: {
39362
39688
  text: '加载中...'
39363
39689
  },
@@ -39377,6 +39703,10 @@ var Pulldown = Object.assign(pulldown, {
39377
39703
  errProp: '不支持的参数 "{0}",可能为 "{1}"',
39378
39704
  colRepet: 'column.{0}="{1}" 重复了,这可能会导致某些功能无法使用',
39379
39705
  notFunc: '方法 "{0}" 不存在',
39706
+ errFunc: '参数 "{0}" 不是一个方法',
39707
+ notValidators: '全局校验 "{0}" 不存在',
39708
+ notFormats: '全局格式化 "{0}" 不存在',
39709
+ notCommands: '全局指令 "{0}" 不存在',
39380
39710
  notSlot: '插槽 "{0}" 不存在',
39381
39711
  noTree: '树结构不支持 "{0}"',
39382
39712
  notProp: '不支持的参数 "{0}"',