vxe-table 3.6.11 → 3.6.12-beta.0

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 (175) hide show
  1. package/lib/all.js +3 -3
  2. package/lib/button/index.js +5 -5
  3. package/lib/button/src/button.js +29 -29
  4. package/lib/button/style/style.css +7 -22
  5. package/lib/button/style/style.min.css +1 -1
  6. package/lib/checkbox/index.js +5 -5
  7. package/lib/checkbox/src/checkbox.js +17 -17
  8. package/lib/checkbox/src/group.js +10 -10
  9. package/lib/checkbox/style/style.css +3 -13
  10. package/lib/checkbox/style/style.min.css +1 -1
  11. package/lib/checkbox-group/index.js +5 -5
  12. package/lib/colgroup/index.js +6 -6
  13. package/lib/column/index.js +6 -6
  14. package/lib/edit/index.js +5 -5
  15. package/lib/edit/src/mixin.js +26 -26
  16. package/lib/export/index.js +15 -15
  17. package/lib/export/src/export-panel.js +57 -57
  18. package/lib/export/src/import-panel.js +21 -21
  19. package/lib/export/src/mixin.js +73 -73
  20. package/lib/export/style/style.css +2 -9
  21. package/lib/export/style/style.min.css +1 -1
  22. package/lib/filter/index.js +7 -7
  23. package/lib/filter/src/mixin.js +8 -8
  24. package/lib/filter/src/panel.js +24 -24
  25. package/lib/filter/style/style.css +1 -5
  26. package/lib/filter/style/style.min.css +1 -1
  27. package/lib/footer/index.js +5 -5
  28. package/lib/footer/src/footer.js +14 -14
  29. package/lib/form/index.js +5 -5
  30. package/lib/form/src/form-config-item.js +23 -23
  31. package/lib/form/src/form-gather.js +5 -5
  32. package/lib/form/src/form-item.js +30 -30
  33. package/lib/form/src/form.js +61 -61
  34. package/lib/form/src/render.js +9 -9
  35. package/lib/form/src/util.js +6 -6
  36. package/lib/form/style/style.css +11 -57
  37. package/lib/form/style/style.min.css +1 -1
  38. package/lib/form-gather/index.js +5 -5
  39. package/lib/form-item/index.js +5 -5
  40. package/lib/grid/index.js +7 -7
  41. package/lib/grid/src/grid.js +77 -77
  42. package/lib/grid/style/style.css +0 -1
  43. package/lib/grid/style/style.min.css +1 -1
  44. package/lib/header/index.js +5 -5
  45. package/lib/header/src/header.js +21 -21
  46. package/lib/icon/index.js +5 -5
  47. package/lib/icon/src/icon.js +3 -3
  48. package/lib/icon/style/style.css +33 -80
  49. package/lib/icon/style/style.min.css +33 -80
  50. package/lib/index.common.js +3 -3
  51. package/lib/index.css +1 -1
  52. package/lib/index.umd.js +1822 -1218
  53. package/lib/index.umd.min.js +1 -1
  54. package/lib/input/index.js +5 -5
  55. package/lib/input/src/date.js +3 -3
  56. package/lib/input/src/input.js +243 -243
  57. package/lib/input/src/number.js +4 -4
  58. package/lib/input/style/style.css +39 -159
  59. package/lib/input/style/style.min.css +1 -1
  60. package/lib/keyboard/index.js +5 -5
  61. package/lib/keyboard/src/mixin.js +15 -15
  62. package/lib/list/index.js +5 -5
  63. package/lib/list/src/list.js +19 -19
  64. package/lib/loading/index.js +6 -6
  65. package/lib/loading/src/loading.js +13 -13
  66. package/lib/loading/style/style.css +5 -21
  67. package/lib/loading/style/style.min.css +1 -1
  68. package/lib/locale/lang/en-US.js +7 -7
  69. package/lib/locale/lang/en-US.umd.js +7 -7
  70. package/lib/locale/lang/ja-JP.js +7 -7
  71. package/lib/locale/lang/ja-JP.umd.js +7 -7
  72. package/lib/locale/lang/zh-CN.js +7 -7
  73. package/lib/locale/lang/zh-CN.umd.js +7 -7
  74. package/lib/locale/lang/zh-HK.js +4 -4
  75. package/lib/locale/lang/zh-HK.umd.js +7 -7
  76. package/lib/locale/lang/zh-MO.js +4 -4
  77. package/lib/locale/lang/zh-MO.umd.js +7 -7
  78. package/lib/locale/lang/zh-TC.js +7 -7
  79. package/lib/locale/lang/zh-TC.umd.js +7 -7
  80. package/lib/locale/lang/zh-TW.js +4 -4
  81. package/lib/locale/lang/zh-TW.umd.js +7 -7
  82. package/lib/menu/index.js +7 -7
  83. package/lib/menu/src/mixin.js +16 -16
  84. package/lib/menu/src/panel.js +14 -14
  85. package/lib/menu/style/style.css +1 -3
  86. package/lib/menu/style/style.min.css +1 -1
  87. package/lib/mixins/size.js +2 -2
  88. package/lib/modal/index.js +12 -12
  89. package/lib/modal/src/modal.js +104 -104
  90. package/lib/modal/style/style.css +14 -49
  91. package/lib/modal/style/style.min.css +1 -1
  92. package/lib/optgroup/index.js +5 -5
  93. package/lib/option/index.js +5 -5
  94. package/lib/pager/index.js +5 -5
  95. package/lib/pager/src/pager.js +66 -66
  96. package/lib/pager/style/style.css +4 -15
  97. package/lib/pager/style/style.min.css +1 -1
  98. package/lib/pulldown/index.js +5 -5
  99. package/lib/pulldown/src/pulldown.js +16 -16
  100. package/lib/pulldown/style/style.css +5 -13
  101. package/lib/pulldown/style/style.min.css +1 -1
  102. package/lib/radio/index.js +5 -5
  103. package/lib/radio/src/button.js +14 -14
  104. package/lib/radio/src/group.js +12 -12
  105. package/lib/radio/src/radio.js +16 -16
  106. package/lib/radio/style/style.css +3 -13
  107. package/lib/radio/style/style.min.css +1 -1
  108. package/lib/radio-button/index.js +5 -5
  109. package/lib/radio-group/index.js +5 -5
  110. package/lib/select/index.js +9 -9
  111. package/lib/select/src/optgroup.js +6 -6
  112. package/lib/select/src/option.js +6 -6
  113. package/lib/select/src/select.js +56 -56
  114. package/lib/select/src/util.js +2 -2
  115. package/lib/select/style/style.css +6 -19
  116. package/lib/select/style/style.min.css +1 -1
  117. package/lib/style.css +1 -1
  118. package/lib/style.min.css +1 -1
  119. package/lib/switch/index.js +5 -5
  120. package/lib/switch/src/switch.js +17 -17
  121. package/lib/switch/style/style.css +3 -9
  122. package/lib/switch/style/style.min.css +1 -1
  123. package/lib/table/index.js +14 -14
  124. package/lib/table/src/body.js +39 -39
  125. package/lib/table/src/cell.js +77 -77
  126. package/lib/table/src/column.js +17 -17
  127. package/lib/table/src/columnInfo.js +13 -13
  128. package/lib/table/src/group.js +4 -4
  129. package/lib/table/src/methods.js +220 -219
  130. package/lib/table/src/methods.min.js +1 -1
  131. package/lib/table/src/table.js +120 -120
  132. package/lib/table/src/util.js +19 -19
  133. package/lib/table/style/style.css +25 -106
  134. package/lib/table/style/style.min.css +1 -1
  135. package/lib/textarea/index.js +5 -5
  136. package/lib/textarea/src/textarea.js +25 -25
  137. package/lib/textarea/style/style.css +0 -9
  138. package/lib/textarea/style/style.min.css +1 -1
  139. package/lib/toolbar/index.js +5 -5
  140. package/lib/toolbar/src/toolbar.js +73 -73
  141. package/lib/toolbar/style/style.css +9 -34
  142. package/lib/toolbar/style/style.min.css +1 -1
  143. package/lib/tools/dom.js +8 -8
  144. package/lib/tools/event.js +3 -3
  145. package/lib/tools/log.js +2 -2
  146. package/lib/tools/log.min.js +1 -1
  147. package/lib/tools/resize.js +4 -4
  148. package/lib/tools/utils.js +12 -12
  149. package/lib/tools/vn.js +2 -2
  150. package/lib/tooltip/index.js +6 -6
  151. package/lib/tooltip/src/tooltip.js +30 -30
  152. package/lib/tooltip/style/style.css +2 -4
  153. package/lib/tooltip/style/style.min.css +1 -1
  154. package/lib/v-x-e-table/index.js +9 -9
  155. package/lib/v-x-e-table/index.min.js +1 -1
  156. package/lib/v-x-e-table/src/commands.js +2 -2
  157. package/lib/v-x-e-table/src/conf.js +4 -4
  158. package/lib/v-x-e-table/src/formats.js +2 -2
  159. package/lib/v-x-e-table/src/interceptor.js +5 -5
  160. package/lib/v-x-e-table/src/menus.js +2 -2
  161. package/lib/v-x-e-table/src/renderer.js +47 -47
  162. package/lib/v-x-e-table/src/setup.js +2 -2
  163. package/lib/v-x-e-table/src/store.js +6 -6
  164. package/lib/v-x-e-table/style/style.css +37 -100
  165. package/lib/v-x-e-table/style/style.min.css +1 -1
  166. package/lib/validator/index.js +5 -5
  167. package/lib/validator/src/mixin.js +25 -25
  168. package/package.json +2 -6
  169. package/packages/table/src/methods.js +5 -2
  170. /package/lib/icon/style/{iconfont.1676990912741.ttf → iconfont.1677164683133.ttf} +0 -0
  171. /package/lib/icon/style/{iconfont.1676990912741.woff → iconfont.1677164683133.woff} +0 -0
  172. /package/lib/icon/style/{iconfont.1676990912741.woff2 → iconfont.1677164683133.woff2} +0 -0
  173. /package/lib/{iconfont.1676990912741.ttf → iconfont.1677164683133.ttf} +0 -0
  174. /package/lib/{iconfont.1676990912741.woff → iconfont.1677164683133.woff} +0 -0
  175. /package/lib/{iconfont.1676990912741.woff2 → iconfont.1677164683133.woff2} +0 -0
@@ -3,12 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = void 0;
6
+ exports["default"] = void 0;
7
7
  var _xeUtils = _interopRequireDefault(require("xe-utils"));
8
8
  var _conf = _interopRequireDefault(require("../../v-x-e-table/src/conf"));
9
9
  var _utils = require("../../tools/utils");
10
10
  var _dom = _interopRequireDefault(require("../../tools/dom"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
12
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
13
13
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
14
14
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
@@ -54,21 +54,21 @@ function validErrorRuleValue(rule, val) {
54
54
  max = rule.max,
55
55
  pattern = rule.pattern;
56
56
  var isNumType = type === 'number';
57
- var numVal = isNumType ? _xeUtils.default.toNumber(val) : _xeUtils.default.getSize(val);
57
+ var numVal = isNumType ? _xeUtils["default"].toNumber(val) : _xeUtils["default"].getSize(val);
58
58
  // 判断数值
59
59
  if (isNumType && isNaN(val)) {
60
60
  return true;
61
61
  }
62
62
  // 如果存在 min,判断最小值
63
- if (!_xeUtils.default.eqNull(min) && numVal < _xeUtils.default.toNumber(min)) {
63
+ if (!_xeUtils["default"].eqNull(min) && numVal < _xeUtils["default"].toNumber(min)) {
64
64
  return true;
65
65
  }
66
66
  // 如果存在 max,判断最大值
67
- if (!_xeUtils.default.eqNull(max) && numVal > _xeUtils.default.toNumber(max)) {
67
+ if (!_xeUtils["default"].eqNull(max) && numVal > _xeUtils["default"].toNumber(max)) {
68
68
  return true;
69
69
  }
70
70
  // 如果存在 pattern,正则校验
71
- if (pattern && !(_xeUtils.default.isRegExp(pattern) ? pattern : new RegExp(pattern)).test(val)) {
71
+ if (pattern && !(_xeUtils["default"].isRegExp(pattern) ? pattern : new RegExp(pattern)).test(val)) {
72
72
  return true;
73
73
  }
74
74
  return false;
@@ -128,10 +128,10 @@ var _default = {
128
128
  if (rows === true) {
129
129
  vaildDatas = afterFullData;
130
130
  } else if (rows) {
131
- if (_xeUtils.default.isFunction(rows)) {
131
+ if (_xeUtils["default"].isFunction(rows)) {
132
132
  cb = rows;
133
133
  } else {
134
- vaildDatas = _xeUtils.default.isArray(rows) ? rows : [rows];
134
+ vaildDatas = _xeUtils["default"].isArray(rows) ? rows : [rows];
135
135
  }
136
136
  }
137
137
  if (!vaildDatas) {
@@ -147,8 +147,8 @@ var _default = {
147
147
  if (isFull || !_this2.validRuleErr) {
148
148
  var colVailds = [];
149
149
  columns.forEach(function (column) {
150
- if ((isFull || !_this2.validRuleErr) && _xeUtils.default.has(editRules, column.property)) {
151
- colVailds.push(_this2.validCellRules('all', row, column).catch(function (_ref) {
150
+ if ((isFull || !_this2.validRuleErr) && _xeUtils["default"].has(editRules, column.property)) {
151
+ colVailds.push(_this2.validCellRules('all', row, column)["catch"](function (_ref) {
152
152
  var rule = _ref.rule,
153
153
  rules = _ref.rules;
154
154
  var rest = {
@@ -176,7 +176,7 @@ var _default = {
176
176
  }
177
177
  };
178
178
  if (treeConfig) {
179
- _xeUtils.default.eachTree(vaildDatas, handleVaild, treeOpts);
179
+ _xeUtils["default"].eachTree(vaildDatas, handleVaild, treeOpts);
180
180
  } else {
181
181
  vaildDatas.forEach(handleVaild);
182
182
  }
@@ -190,7 +190,7 @@ var _default = {
190
190
  cb();
191
191
  }
192
192
  });
193
- }).catch(function (firstErrParams) {
193
+ })["catch"](function (firstErrParams) {
194
194
  return new Promise(function (resolve, reject) {
195
195
  var finish = function finish() {
196
196
  _this2.$nextTick(function () {
@@ -198,7 +198,7 @@ var _default = {
198
198
  cb(validRest);
199
199
  resolve();
200
200
  } else {
201
- if (_conf.default.validToReject === 'obsolete') {
201
+ if (_conf["default"].validToReject === 'obsolete') {
202
202
  // 已废弃,校验失败将不会执行catch
203
203
  reject(validRest);
204
204
  } else {
@@ -209,7 +209,7 @@ var _default = {
209
209
  };
210
210
  var posAndFinish = function posAndFinish() {
211
211
  firstErrParams.cell = _this2.getCell(firstErrParams.row, firstErrParams.column);
212
- _dom.default.scrollToView(firstErrParams.cell);
212
+ _dom["default"].scrollToView(firstErrParams.cell);
213
213
  _this2.handleValidError(firstErrParams).then(finish);
214
214
  };
215
215
  /**
@@ -242,8 +242,8 @@ var _default = {
242
242
  var editRules = this.editRules;
243
243
  var property = column.property;
244
244
  if (property && editRules) {
245
- var rules = _xeUtils.default.get(editRules, property);
246
- return rules && _xeUtils.default.find(rules, function (rule) {
245
+ var rules = _xeUtils["default"].get(editRules, property);
246
+ return rules && _xeUtils["default"].find(rules, function (rule) {
247
247
  return type === 'all' || !rule.trigger || type === rule.trigger;
248
248
  });
249
249
  }
@@ -270,15 +270,15 @@ var _default = {
270
270
  var errorRules = [];
271
271
  var syncVailds = [];
272
272
  if (property && editRules) {
273
- var rules = _xeUtils.default.get(editRules, property);
273
+ var rules = _xeUtils["default"].get(editRules, property);
274
274
  if (rules) {
275
- var cellValue = _xeUtils.default.isUndefined(val) ? _xeUtils.default.get(row, property) : val;
275
+ var cellValue = _xeUtils["default"].isUndefined(val) ? _xeUtils["default"].get(row, property) : val;
276
276
  rules.forEach(function (rule) {
277
277
  var type = rule.type,
278
278
  trigger = rule.trigger,
279
279
  required = rule.required;
280
280
  if (validType === 'all' || !trigger || validType === trigger) {
281
- if (_xeUtils.default.isFunction(rule.validator)) {
281
+ if (_xeUtils["default"].isFunction(rule.validator)) {
282
282
  var customValid = rule.validator({
283
283
  cellValue: cellValue,
284
284
  rule: rule,
@@ -291,7 +291,7 @@ var _default = {
291
291
  $table: _this3
292
292
  });
293
293
  if (customValid) {
294
- if (_xeUtils.default.isError(customValid)) {
294
+ if (_xeUtils["default"].isError(customValid)) {
295
295
  _this3.validRuleErr = true;
296
296
  errorRules.push(new Rule({
297
297
  type: 'custom',
@@ -299,9 +299,9 @@ var _default = {
299
299
  content: customValid.message,
300
300
  rule: new Rule(rule)
301
301
  }));
302
- } else if (customValid.catch) {
302
+ } else if (customValid["catch"]) {
303
303
  // 如果为异步校验(注:异步校验是并发无序的)
304
- syncVailds.push(customValid.catch(function (e) {
304
+ syncVailds.push(customValid["catch"](function (e) {
305
305
  _this3.validRuleErr = true;
306
306
  errorRules.push(new Rule({
307
307
  type: 'custom',
@@ -314,7 +314,7 @@ var _default = {
314
314
  }
315
315
  } else {
316
316
  var isArrType = type === 'array';
317
- var hasEmpty = isArrType || _xeUtils.default.isArray(cellValue) ? !_xeUtils.default.isArray(cellValue) || !cellValue.length : (0, _utils.eqEmptyValue)(cellValue);
317
+ var hasEmpty = isArrType || _xeUtils["default"].isArray(cellValue) ? !_xeUtils["default"].isArray(cellValue) || !cellValue.length : (0, _utils.eqEmptyValue)(cellValue);
318
318
  if (required ? hasEmpty || validErrorRuleValue(rule, cellValue) : !hasEmpty && validErrorRuleValue(rule, cellValue)) {
319
319
  _this3.validRuleErr = true;
320
320
  errorRules.push(new Rule(rule));
@@ -370,7 +370,7 @@ var _default = {
370
370
  _this4.clearValidate();
371
371
  }
372
372
  }
373
- }).catch(function (_ref2) {
373
+ })["catch"](function (_ref2) {
374
374
  var rule = _ref2.rule;
375
375
  // 如果校验不通过与触发方式一致,则聚焦提示错误,否则跳过并不作任何处理
376
376
  if (!rule.trigger || type === rule.trigger) {
@@ -420,4 +420,4 @@ var _default = {
420
420
  }
421
421
  }
422
422
  };
423
- exports.default = _default;
423
+ exports["default"] = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vxe-table",
3
- "version": "3.6.11",
3
+ "version": "3.6.12-beta.0",
4
4
  "description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器等...",
5
5
  "scripts": {
6
6
  "update": "npm install --legacy-peer-deps",
@@ -99,9 +99,5 @@
99
99
  "bugs": {
100
100
  "url": "https://github.com/x-extends/vxe-table/issues"
101
101
  },
102
- "homepage": "https://vxetable.cn/",
103
- "browserslist": [
104
- "> 1%",
105
- "last 2 versions"
106
- ]
102
+ "homepage": "https://vxetable.cn/"
107
103
  }
@@ -2727,9 +2727,12 @@ const Methods = {
2727
2727
  * 获取复选框半选状态的行数据
2728
2728
  */
2729
2729
  getCheckboxIndeterminateRecords (isFull) {
2730
- const { treeConfig, treeIndeterminates, afterFullData } = this
2730
+ const { treeConfig, treeIndeterminates, fullDataRowIdData } = this
2731
2731
  if (treeConfig) {
2732
- return isFull ? treeIndeterminates.slice(0) : treeIndeterminates.filter(row => this.findRowIndexOf(afterFullData, row) > -1)
2732
+ return isFull ? treeIndeterminates.slice(0) : treeIndeterminates.filter(row => {
2733
+ const rowid = getRowid(this, row)
2734
+ return fullDataRowIdData[rowid]
2735
+ })
2733
2736
  }
2734
2737
  return []
2735
2738
  },