vxe-table 3.8.7-beta.5 → 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.
- package/lib/all.js +2 -2
- package/lib/all.min.js +1 -1
- package/lib/export/index.js +1 -1
- package/lib/export/index.min.js +1 -1
- package/lib/form/src/form.js +33 -41
- package/lib/form/src/form.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.umd.js +59 -56
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/methods.js +8 -2
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/style/style.css +1 -1
- package/lib/table/style/style.min.css +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/validator/src/mixin.js +12 -12
- package/lib/vxe-table/style/style.css +1 -1
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/all.js +3 -3
- package/packages/export/index.js +1 -1
- package/packages/form/src/form.js +4 -11
- package/packages/table/src/methods.js +8 -2
- package/packages/validator/src/mixin.js +12 -12
- package/styles/table.scss +1 -1
- /package/lib/icon/style/{iconfont.1716214381092.ttf → iconfont.1716544406262.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1716214381092.woff → iconfont.1716544406262.woff} +0 -0
- /package/lib/icon/style/{iconfont.1716214381092.woff2 → iconfont.1716544406262.woff2} +0 -0
- /package/lib/{iconfont.1716214381092.ttf → iconfont.1716544406262.ttf} +0 -0
- /package/lib/{iconfont.1716214381092.woff → iconfont.1716544406262.woff} +0 -0
- /package/lib/{iconfont.1716214381092.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.
|
|
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.
|
|
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
|
|
17869
|
-
|
|
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
|
}
|
|
@@ -33517,6 +33523,7 @@ var convertToRows = function convertToRows(originColumns) {
|
|
|
33517
33523
|
|
|
33518
33524
|
|
|
33519
33525
|
|
|
33526
|
+
|
|
33520
33527
|
function print(options) {
|
|
33521
33528
|
var opts = Object.assign({}, options, {
|
|
33522
33529
|
type: 'html'
|
|
@@ -33531,7 +33538,7 @@ var VxeTableExportModule = {
|
|
|
33531
33538
|
v_x_e_table.saveFile = saveLocalFile;
|
|
33532
33539
|
v_x_e_table.readFile = readLocalFile;
|
|
33533
33540
|
v_x_e_table.print = print;
|
|
33534
|
-
v_x_e_table.
|
|
33541
|
+
v_x_e_table.setConfig({
|
|
33535
33542
|
export: {
|
|
33536
33543
|
types: {
|
|
33537
33544
|
csv: 0,
|
|
@@ -34130,18 +34137,18 @@ function validErrorRuleValue(rule, val) {
|
|
|
34130
34137
|
treeConfig = this.treeConfig,
|
|
34131
34138
|
treeOpts = this.treeOpts;
|
|
34132
34139
|
var childrenField = treeOpts.children || treeOpts.childrenField;
|
|
34133
|
-
var
|
|
34140
|
+
var validList;
|
|
34134
34141
|
if (rows === true) {
|
|
34135
|
-
|
|
34142
|
+
validList = afterFullData;
|
|
34136
34143
|
} else if (rows) {
|
|
34137
34144
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rows)) {
|
|
34138
34145
|
cb = rows;
|
|
34139
34146
|
} else {
|
|
34140
|
-
|
|
34147
|
+
validList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows) ? rows : [rows];
|
|
34141
34148
|
}
|
|
34142
34149
|
}
|
|
34143
|
-
if (!
|
|
34144
|
-
|
|
34150
|
+
if (!validList) {
|
|
34151
|
+
validList = this.getInsertRecords().concat(this.getUpdateRecords());
|
|
34145
34152
|
}
|
|
34146
34153
|
var rowValidErrs = [];
|
|
34147
34154
|
this.lastCallTime = Date.now();
|
|
@@ -34189,11 +34196,11 @@ function validErrorRuleValue(rule, val) {
|
|
|
34189
34196
|
}
|
|
34190
34197
|
};
|
|
34191
34198
|
if (treeConfig) {
|
|
34192
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(
|
|
34199
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(validList, handleVaild, {
|
|
34193
34200
|
children: childrenField
|
|
34194
34201
|
});
|
|
34195
34202
|
} else {
|
|
34196
|
-
|
|
34203
|
+
validList.forEach(handleVaild);
|
|
34197
34204
|
}
|
|
34198
34205
|
return Promise.all(rowValidErrs).then(function () {
|
|
34199
34206
|
var ruleProps = Object.keys(validRest);
|
|
@@ -34285,7 +34292,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
34285
34292
|
var editRules = this.editRules;
|
|
34286
34293
|
var property = column.property;
|
|
34287
34294
|
var errorRules = [];
|
|
34288
|
-
var
|
|
34295
|
+
var syncValidList = [];
|
|
34289
34296
|
if (property && editRules) {
|
|
34290
34297
|
var rules = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(editRules, property);
|
|
34291
34298
|
if (rules) {
|
|
@@ -34334,7 +34341,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
34334
34341
|
}));
|
|
34335
34342
|
} else if (customValid.catch) {
|
|
34336
34343
|
// 如果为异步校验(注:异步校验是并发无序的)
|
|
34337
|
-
|
|
34344
|
+
syncValidList.push(customValid.catch(function (e) {
|
|
34338
34345
|
_this3.validRuleErr = true;
|
|
34339
34346
|
errorRules.push(new Rule({
|
|
34340
34347
|
type: 'custom',
|
|
@@ -34365,7 +34372,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
34365
34372
|
});
|
|
34366
34373
|
}
|
|
34367
34374
|
}
|
|
34368
|
-
return Promise.all(
|
|
34375
|
+
return Promise.all(syncValidList).then(function () {
|
|
34369
34376
|
if (errorRules.length) {
|
|
34370
34377
|
var rest = {
|
|
34371
34378
|
rules: errorRules,
|
|
@@ -34404,11 +34411,11 @@ function validErrorRuleValue(rule, val) {
|
|
|
34404
34411
|
});
|
|
34405
34412
|
});
|
|
34406
34413
|
} else if (rowList.length) {
|
|
34407
|
-
var
|
|
34414
|
+
var rowIdList = rowList.map(function (row) {
|
|
34408
34415
|
return "".concat(getRowid(_this4, row));
|
|
34409
34416
|
});
|
|
34410
34417
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(validErrorMaps, function (item, key) {
|
|
34411
|
-
if (
|
|
34418
|
+
if (rowIdList.indexOf(key.split(':')[0]) > -1) {
|
|
34412
34419
|
validErrMaps[key] = item;
|
|
34413
34420
|
}
|
|
34414
34421
|
});
|
|
@@ -40090,14 +40097,10 @@ function getResetValue(value, resetValue) {
|
|
|
40090
40097
|
}
|
|
40091
40098
|
},
|
|
40092
40099
|
created: function created() {
|
|
40093
|
-
var
|
|
40094
|
-
|
|
40095
|
-
|
|
40096
|
-
|
|
40097
|
-
if (items) {
|
|
40098
|
-
_this.loadItem(items);
|
|
40099
|
-
}
|
|
40100
|
-
});
|
|
40100
|
+
var items = this.items;
|
|
40101
|
+
if (items && items.length) {
|
|
40102
|
+
this.loadItem(items);
|
|
40103
|
+
}
|
|
40101
40104
|
},
|
|
40102
40105
|
render: function render(h) {
|
|
40103
40106
|
var _e = this._e,
|
|
@@ -40172,10 +40175,10 @@ function getResetValue(value, resetValue) {
|
|
|
40172
40175
|
return [];
|
|
40173
40176
|
},
|
|
40174
40177
|
loadItem: function loadItem(list) {
|
|
40175
|
-
var
|
|
40178
|
+
var _this = this;
|
|
40176
40179
|
if (false) { var $scopedSlots; }
|
|
40177
40180
|
this.staticItems = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().mapTree(list, function (item) {
|
|
40178
|
-
return createItem(
|
|
40181
|
+
return createItem(_this, item);
|
|
40179
40182
|
}, {
|
|
40180
40183
|
children: 'children'
|
|
40181
40184
|
});
|
|
@@ -40219,26 +40222,26 @@ function getResetValue(value, resetValue) {
|
|
|
40219
40222
|
}, evnt);
|
|
40220
40223
|
},
|
|
40221
40224
|
submitEvent: function submitEvent(evnt) {
|
|
40222
|
-
var
|
|
40225
|
+
var _this2 = this;
|
|
40223
40226
|
evnt.preventDefault();
|
|
40224
40227
|
if (!this.preventSubmit) {
|
|
40225
40228
|
this.clearValidate();
|
|
40226
40229
|
this.beginValidate(this.getItems()).then(function (errMap) {
|
|
40227
40230
|
if (errMap) {
|
|
40228
|
-
|
|
40229
|
-
data:
|
|
40231
|
+
_this2.dispatchEvent('submit-invalid', {
|
|
40232
|
+
data: _this2.data,
|
|
40230
40233
|
errMap: errMap
|
|
40231
40234
|
}, evnt);
|
|
40232
40235
|
} else {
|
|
40233
|
-
|
|
40234
|
-
data:
|
|
40236
|
+
_this2.dispatchEvent('submit', {
|
|
40237
|
+
data: _this2.data
|
|
40235
40238
|
}, evnt);
|
|
40236
40239
|
}
|
|
40237
40240
|
});
|
|
40238
40241
|
}
|
|
40239
40242
|
},
|
|
40240
40243
|
reset: function reset() {
|
|
40241
|
-
var
|
|
40244
|
+
var _this3 = this;
|
|
40242
40245
|
var data = this.data;
|
|
40243
40246
|
if (data) {
|
|
40244
40247
|
var itemList = this.getItems();
|
|
@@ -40254,8 +40257,8 @@ function getResetValue(value, resetValue) {
|
|
|
40254
40257
|
field: field,
|
|
40255
40258
|
property: field,
|
|
40256
40259
|
item: item,
|
|
40257
|
-
$form:
|
|
40258
|
-
$grid:
|
|
40260
|
+
$form: _this3,
|
|
40261
|
+
$grid: _this3.xegrid
|
|
40259
40262
|
});
|
|
40260
40263
|
} else if (field) {
|
|
40261
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));
|
|
@@ -40308,7 +40311,7 @@ function getResetValue(value, resetValue) {
|
|
|
40308
40311
|
}
|
|
40309
40312
|
},
|
|
40310
40313
|
handleTitleTipLeaveEvent: function handleTitleTipLeaveEvent() {
|
|
40311
|
-
var
|
|
40314
|
+
var _this4 = this;
|
|
40312
40315
|
var tooltipOpts = this.tooltipOpts;
|
|
40313
40316
|
var $tooltip = this.$refs.tooltip;
|
|
40314
40317
|
if ($tooltip) {
|
|
@@ -40316,9 +40319,9 @@ function getResetValue(value, resetValue) {
|
|
|
40316
40319
|
}
|
|
40317
40320
|
if (tooltipOpts.enterable) {
|
|
40318
40321
|
this.tooltipTimeout = setTimeout(function () {
|
|
40319
|
-
$tooltip =
|
|
40322
|
+
$tooltip = _this4.$refs.tooltip;
|
|
40320
40323
|
if ($tooltip && !$tooltip.isActived()) {
|
|
40321
|
-
|
|
40324
|
+
_this4.closeTooltip();
|
|
40322
40325
|
}
|
|
40323
40326
|
}, tooltipOpts.leaveDelay);
|
|
40324
40327
|
} else {
|
|
@@ -40326,7 +40329,7 @@ function getResetValue(value, resetValue) {
|
|
|
40326
40329
|
}
|
|
40327
40330
|
},
|
|
40328
40331
|
clearValidate: function clearValidate(fieldOrItem) {
|
|
40329
|
-
var
|
|
40332
|
+
var _this5 = this;
|
|
40330
40333
|
if (fieldOrItem) {
|
|
40331
40334
|
var fields = fieldOrItem;
|
|
40332
40335
|
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrItem)) {
|
|
@@ -40334,7 +40337,7 @@ function getResetValue(value, resetValue) {
|
|
|
40334
40337
|
}
|
|
40335
40338
|
fields.forEach(function (field) {
|
|
40336
40339
|
if (field) {
|
|
40337
|
-
var item = handleFieldOrItem(
|
|
40340
|
+
var item = handleFieldOrItem(_this5, field);
|
|
40338
40341
|
if (item) {
|
|
40339
40342
|
item.showError = false;
|
|
40340
40343
|
}
|
|
@@ -40352,7 +40355,7 @@ function getResetValue(value, resetValue) {
|
|
|
40352
40355
|
return this.beginValidate(this.getItems(), '', callback);
|
|
40353
40356
|
},
|
|
40354
40357
|
validateField: function validateField(fieldOrItem, callback) {
|
|
40355
|
-
var
|
|
40358
|
+
var _this6 = this;
|
|
40356
40359
|
var fields = [];
|
|
40357
40360
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrItem)) {
|
|
40358
40361
|
fields = fieldOrItem;
|
|
@@ -40360,11 +40363,11 @@ function getResetValue(value, resetValue) {
|
|
|
40360
40363
|
fields = [fieldOrItem];
|
|
40361
40364
|
}
|
|
40362
40365
|
return this.beginValidate(fields.map(function (field) {
|
|
40363
|
-
return handleFieldOrItem(
|
|
40366
|
+
return handleFieldOrItem(_this6, field);
|
|
40364
40367
|
}), '', callback);
|
|
40365
40368
|
},
|
|
40366
40369
|
beginValidate: function beginValidate(itemList, type, callback) {
|
|
40367
|
-
var
|
|
40370
|
+
var _this7 = this;
|
|
40368
40371
|
var data = this.data,
|
|
40369
40372
|
formRules = this.rules,
|
|
40370
40373
|
validOpts = this.validOpts;
|
|
@@ -40375,8 +40378,8 @@ function getResetValue(value, resetValue) {
|
|
|
40375
40378
|
if (data && formRules) {
|
|
40376
40379
|
itemList.forEach(function (item) {
|
|
40377
40380
|
var field = item.field;
|
|
40378
|
-
if (field && !isHiddenItem(
|
|
40379
|
-
itemValids.push(
|
|
40381
|
+
if (field && !isHiddenItem(_this7, item) && isActivetem(_this7, item)) {
|
|
40382
|
+
itemValids.push(_this7.validItemRules(type || 'all', field).then(function () {
|
|
40380
40383
|
item.errRule = null;
|
|
40381
40384
|
}).catch(function (errorMaps) {
|
|
40382
40385
|
var rest = errorMaps[field];
|
|
@@ -40396,7 +40399,7 @@ function getResetValue(value, resetValue) {
|
|
|
40396
40399
|
}
|
|
40397
40400
|
}).catch(function () {
|
|
40398
40401
|
return new Promise(function (resolve) {
|
|
40399
|
-
|
|
40402
|
+
_this7.showErrTime = setTimeout(function () {
|
|
40400
40403
|
itemList.forEach(function (item) {
|
|
40401
40404
|
if (item.errRule) {
|
|
40402
40405
|
item.showError = true;
|
|
@@ -40404,8 +40407,8 @@ function getResetValue(value, resetValue) {
|
|
|
40404
40407
|
});
|
|
40405
40408
|
}, 20);
|
|
40406
40409
|
if (validOpts.autoPos) {
|
|
40407
|
-
|
|
40408
|
-
|
|
40410
|
+
_this7.$nextTick(function () {
|
|
40411
|
+
_this7.handleFocus(validFields);
|
|
40409
40412
|
});
|
|
40410
40413
|
}
|
|
40411
40414
|
if (callback) {
|
|
@@ -40437,7 +40440,7 @@ function getResetValue(value, resetValue) {
|
|
|
40437
40440
|
* trigger=change 触发方式
|
|
40438
40441
|
*/
|
|
40439
40442
|
validItemRules: function validItemRules(validType, fields, val) {
|
|
40440
|
-
var
|
|
40443
|
+
var _this8 = this;
|
|
40441
40444
|
var data = this.data,
|
|
40442
40445
|
formRules = this.rules;
|
|
40443
40446
|
var errorMaps = {};
|
|
@@ -40465,7 +40468,7 @@ function getResetValue(value, resetValue) {
|
|
|
40465
40468
|
data: data,
|
|
40466
40469
|
field: property,
|
|
40467
40470
|
property: property,
|
|
40468
|
-
$form:
|
|
40471
|
+
$form: _this8
|
|
40469
40472
|
};
|
|
40470
40473
|
var customValid;
|
|
40471
40474
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(validator)) {
|
|
@@ -40525,7 +40528,7 @@ function getResetValue(value, resetValue) {
|
|
|
40525
40528
|
if (errorRules.length) {
|
|
40526
40529
|
errorMaps[property] = errorRules.map(function (rule) {
|
|
40527
40530
|
return {
|
|
40528
|
-
$form:
|
|
40531
|
+
$form: _this8,
|
|
40529
40532
|
rule: rule,
|
|
40530
40533
|
data: data,
|
|
40531
40534
|
field: property,
|
|
@@ -40575,13 +40578,13 @@ function getResetValue(value, resetValue) {
|
|
|
40575
40578
|
}
|
|
40576
40579
|
},
|
|
40577
40580
|
triggerItemEvent: function triggerItemEvent(evnt, field, itemValue) {
|
|
40578
|
-
var
|
|
40581
|
+
var _this9 = this;
|
|
40579
40582
|
if (field) {
|
|
40580
40583
|
return this.validItemRules(evnt ? ['blur'].includes(evnt.type) ? 'blur' : 'change' : 'all', field, itemValue).then(function () {
|
|
40581
|
-
|
|
40584
|
+
_this9.clearValidate(field);
|
|
40582
40585
|
}).catch(function (errorMaps) {
|
|
40583
40586
|
var rest = errorMaps[field];
|
|
40584
|
-
var item =
|
|
40587
|
+
var item = _this9.getItemByField(field);
|
|
40585
40588
|
if (item && rest) {
|
|
40586
40589
|
item.showError = true;
|
|
40587
40590
|
item.errRule = rest[0].rule;
|
|
@@ -42356,7 +42359,7 @@ Icon, Column, Colgroup, Table, Grid, Toolbar, Pager, Checkbox, CheckboxGroup, Ra
|
|
|
42356
42359
|
// 默认安装
|
|
42357
42360
|
function install(Vue, options) {
|
|
42358
42361
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isPlainObject(options)) {
|
|
42359
|
-
|
|
42362
|
+
setConfig(options);
|
|
42360
42363
|
if (options.theme) {
|
|
42361
42364
|
setTheme(options);
|
|
42362
42365
|
}
|
|
@@ -42367,7 +42370,7 @@ function install(Vue, options) {
|
|
|
42367
42370
|
}
|
|
42368
42371
|
|
|
42369
42372
|
// 默认中文
|
|
42370
|
-
|
|
42373
|
+
setConfig({
|
|
42371
42374
|
i18n: function i18n(key, args) {
|
|
42372
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);
|
|
42373
42376
|
}
|