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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/lib/all.js +2 -2
  2. package/lib/all.min.js +1 -1
  3. package/lib/form/src/form.js +33 -41
  4. package/lib/form/src/form.min.js +1 -1
  5. package/lib/icon/style/style.css +1 -1
  6. package/lib/icon/style/style.min.css +1 -1
  7. package/lib/index.css +1 -1
  8. package/lib/index.umd.js +57 -55
  9. package/lib/index.umd.min.js +1 -1
  10. package/lib/style.css +1 -1
  11. package/lib/style.min.css +1 -1
  12. package/lib/table/src/methods.js +8 -2
  13. package/lib/table/src/methods.min.js +1 -1
  14. package/lib/table/style/style.css +1 -1
  15. package/lib/table/style/style.min.css +1 -1
  16. package/lib/tools/log.js +1 -1
  17. package/lib/tools/log.min.js +1 -1
  18. package/lib/v-x-e-table/index.js +1 -1
  19. package/lib/v-x-e-table/index.min.js +1 -1
  20. package/lib/validator/src/mixin.js +12 -12
  21. package/lib/vxe-table/style/style.css +1 -1
  22. package/lib/vxe-table/style/style.min.css +1 -1
  23. package/package.json +1 -1
  24. package/packages/all.js +3 -3
  25. package/packages/form/src/form.js +4 -11
  26. package/packages/table/src/methods.js +8 -2
  27. package/packages/validator/src/mixin.js +12 -12
  28. package/styles/table.scss +1 -1
  29. /package/lib/icon/style/{iconfont.1716215368165.ttf → iconfont.1716544406262.ttf} +0 -0
  30. /package/lib/icon/style/{iconfont.1716215368165.woff → iconfont.1716544406262.woff} +0 -0
  31. /package/lib/icon/style/{iconfont.1716215368165.woff2 → iconfont.1716544406262.woff2} +0 -0
  32. /package/lib/{iconfont.1716215368165.ttf → iconfont.1716544406262.ttf} +0 -0
  33. /package/lib/{iconfont.1716215368165.woff → iconfont.1716544406262.woff} +0 -0
  34. /package/lib/{iconfont.1716215368165.woff2 → iconfont.1716544406262.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -11449,7 +11449,7 @@ var es_array_concat = __webpack_require__(8706);
11449
11449
 
11450
11450
 
11451
11451
  function getLog(message, params) {
11452
- return "[vxe-table v".concat("3.8.7-beta.6", "] ").concat(conf.i18n(message, params));
11452
+ return "[vxe-table v".concat("3.8.7-beta.7", "] ").concat(conf.i18n(message, params));
11453
11453
  }
11454
11454
  function outLog(type) {
11455
11455
  return function (message, params) {
@@ -13116,7 +13116,7 @@ function setIcon(options) {
13116
13116
  var globalStore = {};
13117
13117
  var VXETable = {
13118
13118
  v: v,
13119
- version: "3.8.7-beta.6",
13119
+ version: "3.8.7-beta.7",
13120
13120
  reg: reg,
13121
13121
  use: use,
13122
13122
  setConfig: setConfig,
@@ -17865,8 +17865,14 @@ var Methods = {
17865
17865
  var selectCheckboxMaps = this.selectCheckboxMaps,
17866
17866
  fullDataRowIdData = this.fullDataRowIdData;
17867
17867
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(selectCheckboxMaps, function (row, rowid) {
17868
- if (isFull ? fullDataRowIdData[rowid] : afterFullRowMaps[rowid]) {
17869
- rowList.push(row);
17868
+ if (isFull) {
17869
+ if (fullDataRowIdData[rowid]) {
17870
+ rowList.push(fullDataRowIdData[rowid].row);
17871
+ }
17872
+ } else {
17873
+ if (afterFullRowMaps[rowid]) {
17874
+ rowList.push(afterFullRowMaps[rowid]);
17875
+ }
17870
17876
  }
17871
17877
  });
17872
17878
  }
@@ -34131,18 +34137,18 @@ function validErrorRuleValue(rule, val) {
34131
34137
  treeConfig = this.treeConfig,
34132
34138
  treeOpts = this.treeOpts;
34133
34139
  var childrenField = treeOpts.children || treeOpts.childrenField;
34134
- var validDatas;
34140
+ var validList;
34135
34141
  if (rows === true) {
34136
- validDatas = afterFullData;
34142
+ validList = afterFullData;
34137
34143
  } else if (rows) {
34138
34144
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rows)) {
34139
34145
  cb = rows;
34140
34146
  } else {
34141
- validDatas = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows) ? rows : [rows];
34147
+ validList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows) ? rows : [rows];
34142
34148
  }
34143
34149
  }
34144
- if (!validDatas) {
34145
- validDatas = this.getInsertRecords().concat(this.getUpdateRecords());
34150
+ if (!validList) {
34151
+ validList = this.getInsertRecords().concat(this.getUpdateRecords());
34146
34152
  }
34147
34153
  var rowValidErrs = [];
34148
34154
  this.lastCallTime = Date.now();
@@ -34190,11 +34196,11 @@ function validErrorRuleValue(rule, val) {
34190
34196
  }
34191
34197
  };
34192
34198
  if (treeConfig) {
34193
- external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(validDatas, handleVaild, {
34199
+ external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(validList, handleVaild, {
34194
34200
  children: childrenField
34195
34201
  });
34196
34202
  } else {
34197
- validDatas.forEach(handleVaild);
34203
+ validList.forEach(handleVaild);
34198
34204
  }
34199
34205
  return Promise.all(rowValidErrs).then(function () {
34200
34206
  var ruleProps = Object.keys(validRest);
@@ -34286,7 +34292,7 @@ function validErrorRuleValue(rule, val) {
34286
34292
  var editRules = this.editRules;
34287
34293
  var property = column.property;
34288
34294
  var errorRules = [];
34289
- var syncVailds = [];
34295
+ var syncValidList = [];
34290
34296
  if (property && editRules) {
34291
34297
  var rules = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, property);
34292
34298
  if (rules) {
@@ -34335,7 +34341,7 @@ function validErrorRuleValue(rule, val) {
34335
34341
  }));
34336
34342
  } else if (customValid.catch) {
34337
34343
  // 如果为异步校验(注:异步校验是并发无序的)
34338
- syncVailds.push(customValid.catch(function (e) {
34344
+ syncValidList.push(customValid.catch(function (e) {
34339
34345
  _this3.validRuleErr = true;
34340
34346
  errorRules.push(new Rule({
34341
34347
  type: 'custom',
@@ -34366,7 +34372,7 @@ function validErrorRuleValue(rule, val) {
34366
34372
  });
34367
34373
  }
34368
34374
  }
34369
- return Promise.all(syncVailds).then(function () {
34375
+ return Promise.all(syncValidList).then(function () {
34370
34376
  if (errorRules.length) {
34371
34377
  var rest = {
34372
34378
  rules: errorRules,
@@ -34405,11 +34411,11 @@ function validErrorRuleValue(rule, val) {
34405
34411
  });
34406
34412
  });
34407
34413
  } else if (rowList.length) {
34408
- var rowidList = rowList.map(function (row) {
34414
+ var rowIdList = rowList.map(function (row) {
34409
34415
  return "".concat(getRowid(_this4, row));
34410
34416
  });
34411
34417
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(validErrorMaps, function (item, key) {
34412
- if (rowidList.indexOf(key.split(':')[0]) > -1) {
34418
+ if (rowIdList.indexOf(key.split(':')[0]) > -1) {
34413
34419
  validErrMaps[key] = item;
34414
34420
  }
34415
34421
  });
@@ -40091,14 +40097,10 @@ function getResetValue(value, resetValue) {
40091
40097
  }
40092
40098
  },
40093
40099
  created: function created() {
40094
- var _this = this;
40095
- this.$nextTick(function () {
40096
- var items = _this.items;
40097
- if (false) {}
40098
- if (items) {
40099
- _this.loadItem(items);
40100
- }
40101
- });
40100
+ var items = this.items;
40101
+ if (items && items.length) {
40102
+ this.loadItem(items);
40103
+ }
40102
40104
  },
40103
40105
  render: function render(h) {
40104
40106
  var _e = this._e,
@@ -40173,10 +40175,10 @@ function getResetValue(value, resetValue) {
40173
40175
  return [];
40174
40176
  },
40175
40177
  loadItem: function loadItem(list) {
40176
- var _this2 = this;
40178
+ var _this = this;
40177
40179
  if (false) { var $scopedSlots; }
40178
40180
  this.staticItems = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().mapTree(list, function (item) {
40179
- return createItem(_this2, item);
40181
+ return createItem(_this, item);
40180
40182
  }, {
40181
40183
  children: 'children'
40182
40184
  });
@@ -40220,26 +40222,26 @@ function getResetValue(value, resetValue) {
40220
40222
  }, evnt);
40221
40223
  },
40222
40224
  submitEvent: function submitEvent(evnt) {
40223
- var _this3 = this;
40225
+ var _this2 = this;
40224
40226
  evnt.preventDefault();
40225
40227
  if (!this.preventSubmit) {
40226
40228
  this.clearValidate();
40227
40229
  this.beginValidate(this.getItems()).then(function (errMap) {
40228
40230
  if (errMap) {
40229
- _this3.dispatchEvent('submit-invalid', {
40230
- data: _this3.data,
40231
+ _this2.dispatchEvent('submit-invalid', {
40232
+ data: _this2.data,
40231
40233
  errMap: errMap
40232
40234
  }, evnt);
40233
40235
  } else {
40234
- _this3.dispatchEvent('submit', {
40235
- data: _this3.data
40236
+ _this2.dispatchEvent('submit', {
40237
+ data: _this2.data
40236
40238
  }, evnt);
40237
40239
  }
40238
40240
  });
40239
40241
  }
40240
40242
  },
40241
40243
  reset: function reset() {
40242
- var _this4 = this;
40244
+ var _this3 = this;
40243
40245
  var data = this.data;
40244
40246
  if (data) {
40245
40247
  var itemList = this.getItems();
@@ -40255,8 +40257,8 @@ function getResetValue(value, resetValue) {
40255
40257
  field: field,
40256
40258
  property: field,
40257
40259
  item: item,
40258
- $form: _this4,
40259
- $grid: _this4.xegrid
40260
+ $form: _this3,
40261
+ $grid: _this3.xegrid
40260
40262
  });
40261
40263
  } else if (field) {
40262
40264
  external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(data, field, resetValue === null ? getResetValue(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, field), undefined) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(resetValue, true));
@@ -40309,7 +40311,7 @@ function getResetValue(value, resetValue) {
40309
40311
  }
40310
40312
  },
40311
40313
  handleTitleTipLeaveEvent: function handleTitleTipLeaveEvent() {
40312
- var _this5 = this;
40314
+ var _this4 = this;
40313
40315
  var tooltipOpts = this.tooltipOpts;
40314
40316
  var $tooltip = this.$refs.tooltip;
40315
40317
  if ($tooltip) {
@@ -40317,9 +40319,9 @@ function getResetValue(value, resetValue) {
40317
40319
  }
40318
40320
  if (tooltipOpts.enterable) {
40319
40321
  this.tooltipTimeout = setTimeout(function () {
40320
- $tooltip = _this5.$refs.tooltip;
40322
+ $tooltip = _this4.$refs.tooltip;
40321
40323
  if ($tooltip && !$tooltip.isActived()) {
40322
- _this5.closeTooltip();
40324
+ _this4.closeTooltip();
40323
40325
  }
40324
40326
  }, tooltipOpts.leaveDelay);
40325
40327
  } else {
@@ -40327,7 +40329,7 @@ function getResetValue(value, resetValue) {
40327
40329
  }
40328
40330
  },
40329
40331
  clearValidate: function clearValidate(fieldOrItem) {
40330
- var _this6 = this;
40332
+ var _this5 = this;
40331
40333
  if (fieldOrItem) {
40332
40334
  var fields = fieldOrItem;
40333
40335
  if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrItem)) {
@@ -40335,7 +40337,7 @@ function getResetValue(value, resetValue) {
40335
40337
  }
40336
40338
  fields.forEach(function (field) {
40337
40339
  if (field) {
40338
- var item = handleFieldOrItem(_this6, field);
40340
+ var item = handleFieldOrItem(_this5, field);
40339
40341
  if (item) {
40340
40342
  item.showError = false;
40341
40343
  }
@@ -40353,7 +40355,7 @@ function getResetValue(value, resetValue) {
40353
40355
  return this.beginValidate(this.getItems(), '', callback);
40354
40356
  },
40355
40357
  validateField: function validateField(fieldOrItem, callback) {
40356
- var _this7 = this;
40358
+ var _this6 = this;
40357
40359
  var fields = [];
40358
40360
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrItem)) {
40359
40361
  fields = fieldOrItem;
@@ -40361,11 +40363,11 @@ function getResetValue(value, resetValue) {
40361
40363
  fields = [fieldOrItem];
40362
40364
  }
40363
40365
  return this.beginValidate(fields.map(function (field) {
40364
- return handleFieldOrItem(_this7, field);
40366
+ return handleFieldOrItem(_this6, field);
40365
40367
  }), '', callback);
40366
40368
  },
40367
40369
  beginValidate: function beginValidate(itemList, type, callback) {
40368
- var _this8 = this;
40370
+ var _this7 = this;
40369
40371
  var data = this.data,
40370
40372
  formRules = this.rules,
40371
40373
  validOpts = this.validOpts;
@@ -40376,8 +40378,8 @@ function getResetValue(value, resetValue) {
40376
40378
  if (data && formRules) {
40377
40379
  itemList.forEach(function (item) {
40378
40380
  var field = item.field;
40379
- if (field && !isHiddenItem(_this8, item) && isActivetem(_this8, item)) {
40380
- itemValids.push(_this8.validItemRules(type || 'all', field).then(function () {
40381
+ if (field && !isHiddenItem(_this7, item) && isActivetem(_this7, item)) {
40382
+ itemValids.push(_this7.validItemRules(type || 'all', field).then(function () {
40381
40383
  item.errRule = null;
40382
40384
  }).catch(function (errorMaps) {
40383
40385
  var rest = errorMaps[field];
@@ -40397,7 +40399,7 @@ function getResetValue(value, resetValue) {
40397
40399
  }
40398
40400
  }).catch(function () {
40399
40401
  return new Promise(function (resolve) {
40400
- _this8.showErrTime = setTimeout(function () {
40402
+ _this7.showErrTime = setTimeout(function () {
40401
40403
  itemList.forEach(function (item) {
40402
40404
  if (item.errRule) {
40403
40405
  item.showError = true;
@@ -40405,8 +40407,8 @@ function getResetValue(value, resetValue) {
40405
40407
  });
40406
40408
  }, 20);
40407
40409
  if (validOpts.autoPos) {
40408
- _this8.$nextTick(function () {
40409
- _this8.handleFocus(validFields);
40410
+ _this7.$nextTick(function () {
40411
+ _this7.handleFocus(validFields);
40410
40412
  });
40411
40413
  }
40412
40414
  if (callback) {
@@ -40438,7 +40440,7 @@ function getResetValue(value, resetValue) {
40438
40440
  * trigger=change 触发方式
40439
40441
  */
40440
40442
  validItemRules: function validItemRules(validType, fields, val) {
40441
- var _this9 = this;
40443
+ var _this8 = this;
40442
40444
  var data = this.data,
40443
40445
  formRules = this.rules;
40444
40446
  var errorMaps = {};
@@ -40466,7 +40468,7 @@ function getResetValue(value, resetValue) {
40466
40468
  data: data,
40467
40469
  field: property,
40468
40470
  property: property,
40469
- $form: _this9
40471
+ $form: _this8
40470
40472
  };
40471
40473
  var customValid;
40472
40474
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(validator)) {
@@ -40526,7 +40528,7 @@ function getResetValue(value, resetValue) {
40526
40528
  if (errorRules.length) {
40527
40529
  errorMaps[property] = errorRules.map(function (rule) {
40528
40530
  return {
40529
- $form: _this9,
40531
+ $form: _this8,
40530
40532
  rule: rule,
40531
40533
  data: data,
40532
40534
  field: property,
@@ -40576,13 +40578,13 @@ function getResetValue(value, resetValue) {
40576
40578
  }
40577
40579
  },
40578
40580
  triggerItemEvent: function triggerItemEvent(evnt, field, itemValue) {
40579
- var _this10 = this;
40581
+ var _this9 = this;
40580
40582
  if (field) {
40581
40583
  return this.validItemRules(evnt ? ['blur'].includes(evnt.type) ? 'blur' : 'change' : 'all', field, itemValue).then(function () {
40582
- _this10.clearValidate(field);
40584
+ _this9.clearValidate(field);
40583
40585
  }).catch(function (errorMaps) {
40584
40586
  var rest = errorMaps[field];
40585
- var item = _this10.getItemByField(field);
40587
+ var item = _this9.getItemByField(field);
40586
40588
  if (item && rest) {
40587
40589
  item.showError = true;
40588
40590
  item.errRule = rest[0].rule;
@@ -42357,7 +42359,7 @@ Icon, Column, Colgroup, Table, Grid, Toolbar, Pager, Checkbox, CheckboxGroup, Ra
42357
42359
  // 默认安装
42358
42360
  function install(Vue, options) {
42359
42361
  if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isPlainObject(options)) {
42360
- VXETable.setConfig(options);
42362
+ setConfig(options);
42361
42363
  if (options.theme) {
42362
42364
  setTheme(options);
42363
42365
  }
@@ -42368,7 +42370,7 @@ function install(Vue, options) {
42368
42370
  }
42369
42371
 
42370
42372
  // 默认中文
42371
- VXETable.setConfig({
42373
+ setConfig({
42372
42374
  i18n: function i18n(key, args) {
42373
42375
  return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFormatString(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(zh_CN, key), args);
42374
42376
  }