vxe-table 3.6.16 → 3.6.17
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/export/src/mixin.js +12 -7
- package/lib/export/src/mixin.min.js +1 -1
- package/lib/form/src/form.js +109 -89
- 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 +133 -99
- 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/cell.js +7 -1
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +2 -0
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +1 -0
- package/lib/table/src/columnInfo.min.js +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/package.json +1 -1
- package/packages/export/src/mixin.js +9 -7
- package/packages/form/src/form.js +91 -60
- package/packages/table/src/cell.js +9 -1
- package/packages/table/src/column.js +2 -0
- package/packages/table/src/columnInfo.js +1 -0
- package/types/column.d.ts +2 -1
- package/types/export.d.ts +5 -0
- package/types/form.d.ts +14 -8
- /package/lib/icon/style/{iconfont.1688167751253.ttf → iconfont.1688790389988.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1688167751253.woff → iconfont.1688790389988.woff} +0 -0
- /package/lib/icon/style/{iconfont.1688167751253.woff2 → iconfont.1688790389988.woff2} +0 -0
- /package/lib/{iconfont.1688167751253.ttf → iconfont.1688790389988.ttf} +0 -0
- /package/lib/{iconfont.1688167751253.woff → iconfont.1688790389988.woff} +0 -0
- /package/lib/{iconfont.1688167751253.woff2 → iconfont.1688790389988.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -11033,7 +11033,7 @@ var es_array_concat = __webpack_require__(2222);
|
|
|
11033
11033
|
|
|
11034
11034
|
|
|
11035
11035
|
function getLog(message, params) {
|
|
11036
|
-
return "[vxe-table v".concat("3.6.
|
|
11036
|
+
return "[vxe-table v".concat("3.6.17", "] ").concat(conf.i18n(message, params));
|
|
11037
11037
|
}
|
|
11038
11038
|
function outLog(type) {
|
|
11039
11039
|
return function (message, params) {
|
|
@@ -12220,7 +12220,7 @@ function _t(key, args) {
|
|
|
12220
12220
|
var v = 'v3';
|
|
12221
12221
|
var VXETable = {
|
|
12222
12222
|
v: v,
|
|
12223
|
-
version: "3.6.
|
|
12223
|
+
version: "3.6.17",
|
|
12224
12224
|
reg: reg,
|
|
12225
12225
|
use: use,
|
|
12226
12226
|
setup: setup,
|
|
@@ -12396,6 +12396,7 @@ var ColumnInfo = /*#__PURE__*/function () {
|
|
|
12396
12396
|
cellRender: _vm.cellRender,
|
|
12397
12397
|
editRender: _vm.editRender,
|
|
12398
12398
|
contentRender: _vm.contentRender,
|
|
12399
|
+
headerExportMethod: _vm.headerExportMethod,
|
|
12399
12400
|
exportMethod: _vm.exportMethod,
|
|
12400
12401
|
footerExportMethod: _vm.footerExportMethod,
|
|
12401
12402
|
titleHelp: _vm.titleHelp,
|
|
@@ -14813,7 +14814,8 @@ var Cell = {
|
|
|
14813
14814
|
}
|
|
14814
14815
|
if (!trigger || trigger === 'default') {
|
|
14815
14816
|
on.click = function (evnt) {
|
|
14816
|
-
|
|
14817
|
+
evnt.stopPropagation();
|
|
14818
|
+
$table.triggerTreeExpandEvent(evnt, params);
|
|
14817
14819
|
};
|
|
14818
14820
|
}
|
|
14819
14821
|
return [h('div', {
|
|
@@ -14893,6 +14895,7 @@ var Cell = {
|
|
|
14893
14895
|
on = {
|
|
14894
14896
|
click: function click(evnt) {
|
|
14895
14897
|
if (!isDisabled && isVisible) {
|
|
14898
|
+
evnt.stopPropagation();
|
|
14896
14899
|
$table.triggerRadioRowEvent(evnt, params);
|
|
14897
14900
|
}
|
|
14898
14901
|
}
|
|
@@ -14953,6 +14956,7 @@ var Cell = {
|
|
|
14953
14956
|
on = {
|
|
14954
14957
|
click: function click(evnt) {
|
|
14955
14958
|
if (!isAllCheckboxDisabled) {
|
|
14959
|
+
evnt.stopPropagation();
|
|
14956
14960
|
$table.triggerCheckAllEvent(evnt, !isAllCheckboxSelected);
|
|
14957
14961
|
}
|
|
14958
14962
|
}
|
|
@@ -15014,6 +15018,7 @@ var Cell = {
|
|
|
15014
15018
|
on = {
|
|
15015
15019
|
click: function click(evnt) {
|
|
15016
15020
|
if (!isDisabled && isVisible) {
|
|
15021
|
+
evnt.stopPropagation();
|
|
15017
15022
|
$table.triggerCheckRowEvent(evnt, params, !isChecked);
|
|
15018
15023
|
}
|
|
15019
15024
|
}
|
|
@@ -15087,6 +15092,7 @@ var Cell = {
|
|
|
15087
15092
|
on = {
|
|
15088
15093
|
click: function click(evnt) {
|
|
15089
15094
|
if (!isDisabled && isVisible) {
|
|
15095
|
+
evnt.stopPropagation();
|
|
15090
15096
|
$table.triggerCheckRowEvent(evnt, params, !isChecked);
|
|
15091
15097
|
}
|
|
15092
15098
|
}
|
|
@@ -15169,6 +15175,7 @@ var Cell = {
|
|
|
15169
15175
|
}],
|
|
15170
15176
|
on: {
|
|
15171
15177
|
click: function click(evnt) {
|
|
15178
|
+
evnt.stopPropagation();
|
|
15172
15179
|
$table.triggerRowExpandEvent(evnt, params);
|
|
15173
15180
|
}
|
|
15174
15181
|
}
|
|
@@ -30216,8 +30223,12 @@ function getExportData($xetable, opts) {
|
|
|
30216
30223
|
function getBooleanValue(cellValue) {
|
|
30217
30224
|
return cellValue === 'TRUE' || cellValue === 'true' || cellValue === true;
|
|
30218
30225
|
}
|
|
30219
|
-
function getHeaderTitle(opts, column) {
|
|
30220
|
-
|
|
30226
|
+
function getHeaderTitle($xetable, opts, column) {
|
|
30227
|
+
var headerExportMethod = column.headerExportMethod;
|
|
30228
|
+
return headerExportMethod ? headerExportMethod({
|
|
30229
|
+
column: column,
|
|
30230
|
+
$table: $xetable
|
|
30231
|
+
}) : (opts.original ? column.property : column.getTitle()) || '';
|
|
30221
30232
|
}
|
|
30222
30233
|
function getFooterCellValue($xetable, opts, items, column) {
|
|
30223
30234
|
var renderOpts = column.editRender || column.cellRender;
|
|
@@ -30280,7 +30291,7 @@ function toCsv($xetable, opts, columns, datas) {
|
|
|
30280
30291
|
var content = csvBOM;
|
|
30281
30292
|
if (opts.isHeader) {
|
|
30282
30293
|
content += columns.map(function (column) {
|
|
30283
|
-
return toTxtCellLabel(getHeaderTitle(opts, column));
|
|
30294
|
+
return toTxtCellLabel(getHeaderTitle($xetable, opts, column));
|
|
30284
30295
|
}).join(',') + enterSymbol;
|
|
30285
30296
|
}
|
|
30286
30297
|
datas.forEach(function (row) {
|
|
@@ -30303,7 +30314,7 @@ function toTxt($xetable, opts, columns, datas) {
|
|
|
30303
30314
|
var content = '';
|
|
30304
30315
|
if (opts.isHeader) {
|
|
30305
30316
|
content += columns.map(function (column) {
|
|
30306
|
-
return toTxtCellLabel(getHeaderTitle(opts, column));
|
|
30317
|
+
return toTxtCellLabel(getHeaderTitle($xetable, opts, column));
|
|
30307
30318
|
}).join('\t') + enterSymbol;
|
|
30308
30319
|
}
|
|
30309
30320
|
datas.forEach(function (row) {
|
|
@@ -30373,7 +30384,7 @@ function toHtml($xetable, opts, columns, datas) {
|
|
|
30373
30384
|
tables.push("<tr>".concat(cols.map(function (column) {
|
|
30374
30385
|
var headAlign = column.headerAlign || column.align || allHeaderAlign || allAlign;
|
|
30375
30386
|
var classNames = hasEllipsis($xetable, column, 'showHeaderOverflow', allColumnHeaderOverflow) ? ['col--ellipsis'] : [];
|
|
30376
|
-
var cellTitle = getHeaderTitle(opts, column);
|
|
30387
|
+
var cellTitle = getHeaderTitle($xetable, opts, column);
|
|
30377
30388
|
var childWidth = 0;
|
|
30378
30389
|
var countChild = 0;
|
|
30379
30390
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], function (item) {
|
|
@@ -30398,7 +30409,7 @@ function toHtml($xetable, opts, columns, datas) {
|
|
|
30398
30409
|
tables.push("<tr>".concat(columns.map(function (column) {
|
|
30399
30410
|
var headAlign = column.headerAlign || column.align || allHeaderAlign || allAlign;
|
|
30400
30411
|
var classNames = hasEllipsis($xetable, column, 'showHeaderOverflow', allColumnHeaderOverflow) ? ['col--ellipsis'] : [];
|
|
30401
|
-
var cellTitle = getHeaderTitle(opts, column);
|
|
30412
|
+
var cellTitle = getHeaderTitle($xetable, opts, column);
|
|
30402
30413
|
if (headAlign) {
|
|
30403
30414
|
classNames.push("col--".concat(headAlign));
|
|
30404
30415
|
}
|
|
@@ -30512,7 +30523,7 @@ function toXML($xetable, opts, columns, datas) {
|
|
|
30512
30523
|
}).join('')].join('');
|
|
30513
30524
|
if (opts.isHeader) {
|
|
30514
30525
|
xml += "<Row>".concat(columns.map(function (column) {
|
|
30515
|
-
return "<Cell><Data ss:Type=\"String\">".concat(getHeaderTitle(opts, column), "</Data></Cell>");
|
|
30526
|
+
return "<Cell><Data ss:Type=\"String\">".concat(getHeaderTitle($xetable, opts, column), "</Data></Cell>");
|
|
30516
30527
|
}).join(''), "</Row>");
|
|
30517
30528
|
}
|
|
30518
30529
|
datas.forEach(function (row) {
|
|
@@ -31317,6 +31328,7 @@ var mixin_convertToRows = function convertToRows(originColumns) {
|
|
|
31317
31328
|
};
|
|
31318
31329
|
}
|
|
31319
31330
|
if (customCols) {
|
|
31331
|
+
opts._isCustomColumn = true;
|
|
31320
31332
|
groups = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().searchTree(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().mapTree(customCols, function (item) {
|
|
31321
31333
|
var targetColumn;
|
|
31322
31334
|
if (item) {
|
|
@@ -32950,6 +32962,8 @@ var column_props = {
|
|
|
32950
32962
|
type: Boolean,
|
|
32951
32963
|
"default": null
|
|
32952
32964
|
},
|
|
32965
|
+
// 表头单元格数据导出方法
|
|
32966
|
+
headerExportMethod: Function,
|
|
32953
32967
|
// 单元格数据导出方法
|
|
32954
32968
|
exportMethod: Function,
|
|
32955
32969
|
// 表尾单元格数据导出方法
|
|
@@ -37777,11 +37791,20 @@ function getResetValue(value, resetValue) {
|
|
|
37777
37791
|
}
|
|
37778
37792
|
},
|
|
37779
37793
|
clearValidate: function clearValidate(fieldOrItem) {
|
|
37794
|
+
var _this6 = this;
|
|
37780
37795
|
if (fieldOrItem) {
|
|
37781
|
-
var
|
|
37782
|
-
if (
|
|
37783
|
-
|
|
37796
|
+
var fields = fieldOrItem;
|
|
37797
|
+
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrItem)) {
|
|
37798
|
+
fields = [fieldOrItem];
|
|
37784
37799
|
}
|
|
37800
|
+
fields.forEach(function (field) {
|
|
37801
|
+
if (field) {
|
|
37802
|
+
var item = handleFieldOrItem(_this6, field);
|
|
37803
|
+
if (item) {
|
|
37804
|
+
item.showError = false;
|
|
37805
|
+
}
|
|
37806
|
+
}
|
|
37807
|
+
});
|
|
37785
37808
|
} else {
|
|
37786
37809
|
this.getItems().forEach(function (item) {
|
|
37787
37810
|
item.showError = false;
|
|
@@ -37794,11 +37817,17 @@ function getResetValue(value, resetValue) {
|
|
|
37794
37817
|
return this.beginValidate(this.getItems(), '', callback);
|
|
37795
37818
|
},
|
|
37796
37819
|
validateField: function validateField(fieldOrItem, callback) {
|
|
37797
|
-
var
|
|
37798
|
-
|
|
37820
|
+
var _this7 = this;
|
|
37821
|
+
var fields = [];
|
|
37822
|
+
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fieldOrItem)) {
|
|
37823
|
+
fields = [fieldOrItem];
|
|
37824
|
+
}
|
|
37825
|
+
return this.beginValidate(fields.map(function (field) {
|
|
37826
|
+
return handleFieldOrItem(_this7, field);
|
|
37827
|
+
}), '', callback);
|
|
37799
37828
|
},
|
|
37800
37829
|
beginValidate: function beginValidate(itemList, type, callback) {
|
|
37801
|
-
var
|
|
37830
|
+
var _this8 = this;
|
|
37802
37831
|
var data = this.data,
|
|
37803
37832
|
formRules = this.rules,
|
|
37804
37833
|
validOpts = this.validOpts;
|
|
@@ -37809,26 +37838,17 @@ function getResetValue(value, resetValue) {
|
|
|
37809
37838
|
if (data && formRules) {
|
|
37810
37839
|
itemList.forEach(function (item) {
|
|
37811
37840
|
var field = item.field;
|
|
37812
|
-
if (field && !isHiddenItem(
|
|
37813
|
-
itemValids.push(
|
|
37841
|
+
if (field && !isHiddenItem(_this8, item) && isActivetem(_this8, item)) {
|
|
37842
|
+
itemValids.push(_this8.validItemRules(type || 'all', field).then(function () {
|
|
37814
37843
|
item.errRule = null;
|
|
37815
|
-
})["catch"](function (
|
|
37816
|
-
var
|
|
37817
|
-
rules = _ref2.rules;
|
|
37818
|
-
var rest = {
|
|
37819
|
-
rule: rule,
|
|
37820
|
-
rules: rules,
|
|
37821
|
-
data: data,
|
|
37822
|
-
field: field,
|
|
37823
|
-
property: field,
|
|
37824
|
-
$form: _this6
|
|
37825
|
-
};
|
|
37844
|
+
})["catch"](function (errorMaps) {
|
|
37845
|
+
var rest = errorMaps[field];
|
|
37826
37846
|
if (!validRest[field]) {
|
|
37827
37847
|
validRest[field] = [];
|
|
37828
37848
|
}
|
|
37829
37849
|
validRest[field].push(rest);
|
|
37830
37850
|
validFields.push(field);
|
|
37831
|
-
item.errRule = rule;
|
|
37851
|
+
item.errRule = rest[0].rule;
|
|
37832
37852
|
return Promise.reject(rest);
|
|
37833
37853
|
}));
|
|
37834
37854
|
}
|
|
@@ -37839,7 +37859,7 @@ function getResetValue(value, resetValue) {
|
|
|
37839
37859
|
}
|
|
37840
37860
|
})["catch"](function () {
|
|
37841
37861
|
return new Promise(function (resolve) {
|
|
37842
|
-
|
|
37862
|
+
_this8.showErrTime = setTimeout(function () {
|
|
37843
37863
|
itemList.forEach(function (item) {
|
|
37844
37864
|
if (item.errRule) {
|
|
37845
37865
|
item.showError = true;
|
|
@@ -37847,8 +37867,8 @@ function getResetValue(value, resetValue) {
|
|
|
37847
37867
|
});
|
|
37848
37868
|
}, 20);
|
|
37849
37869
|
if (validOpts.autoPos) {
|
|
37850
|
-
|
|
37851
|
-
|
|
37870
|
+
_this8.$nextTick(function () {
|
|
37871
|
+
_this8.handleFocus(validFields);
|
|
37852
37872
|
});
|
|
37853
37873
|
}
|
|
37854
37874
|
if (callback) {
|
|
@@ -37879,77 +37899,91 @@ function getResetValue(value, resetValue) {
|
|
|
37879
37899
|
* validator=Function({ itemValue, rule, rules, data, property }) 自定义校验,接收一个 Promise
|
|
37880
37900
|
* trigger=change 触发方式
|
|
37881
37901
|
*/
|
|
37882
|
-
validItemRules: function validItemRules(validType,
|
|
37883
|
-
var
|
|
37902
|
+
validItemRules: function validItemRules(validType, fields, val) {
|
|
37903
|
+
var _this9 = this;
|
|
37884
37904
|
var data = this.data,
|
|
37885
37905
|
formRules = this.rules;
|
|
37886
|
-
var
|
|
37887
|
-
|
|
37888
|
-
|
|
37889
|
-
|
|
37890
|
-
|
|
37891
|
-
|
|
37892
|
-
|
|
37893
|
-
|
|
37894
|
-
|
|
37895
|
-
|
|
37896
|
-
|
|
37897
|
-
|
|
37898
|
-
|
|
37899
|
-
|
|
37900
|
-
|
|
37901
|
-
|
|
37902
|
-
|
|
37903
|
-
|
|
37904
|
-
|
|
37905
|
-
|
|
37906
|
-
|
|
37907
|
-
|
|
37908
|
-
|
|
37909
|
-
|
|
37910
|
-
|
|
37911
|
-
|
|
37912
|
-
|
|
37913
|
-
|
|
37914
|
-
}));
|
|
37915
|
-
} else if (customValid["catch"]) {
|
|
37916
|
-
// 如果为异步校验(注:异步校验是并发无序的)
|
|
37917
|
-
syncVailds.push(customValid["catch"](function (e) {
|
|
37906
|
+
var errorMaps = {};
|
|
37907
|
+
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(fields)) {
|
|
37908
|
+
fields = [fields];
|
|
37909
|
+
}
|
|
37910
|
+
return Promise.all(fields.map(function (property) {
|
|
37911
|
+
var syncVailds = [];
|
|
37912
|
+
var errorRules = [];
|
|
37913
|
+
if (property && formRules) {
|
|
37914
|
+
var rules = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(formRules, property);
|
|
37915
|
+
if (rules) {
|
|
37916
|
+
var itemValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(val) ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(data, property) : val;
|
|
37917
|
+
rules.forEach(function (rule) {
|
|
37918
|
+
var type = rule.type,
|
|
37919
|
+
trigger = rule.trigger,
|
|
37920
|
+
required = rule.required;
|
|
37921
|
+
if (validType === 'all' || !trigger || validType === rule.trigger) {
|
|
37922
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rule.validator)) {
|
|
37923
|
+
var customValid = rule.validator({
|
|
37924
|
+
itemValue: itemValue,
|
|
37925
|
+
rule: rule,
|
|
37926
|
+
rules: rules,
|
|
37927
|
+
data: data,
|
|
37928
|
+
field: property,
|
|
37929
|
+
property: property,
|
|
37930
|
+
$form: _this9
|
|
37931
|
+
});
|
|
37932
|
+
if (customValid) {
|
|
37933
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isError(customValid)) {
|
|
37918
37934
|
errorRules.push(new form_Rule({
|
|
37919
37935
|
type: 'custom',
|
|
37920
37936
|
trigger: trigger,
|
|
37921
|
-
content:
|
|
37937
|
+
content: customValid.message,
|
|
37922
37938
|
rule: new form_Rule(rule)
|
|
37923
37939
|
}));
|
|
37924
|
-
})
|
|
37940
|
+
} else if (customValid["catch"]) {
|
|
37941
|
+
// 如果为异步校验(注:异步校验是并发无序的)
|
|
37942
|
+
syncVailds.push(customValid["catch"](function (e) {
|
|
37943
|
+
errorRules.push(new form_Rule({
|
|
37944
|
+
type: 'custom',
|
|
37945
|
+
trigger: trigger,
|
|
37946
|
+
content: e ? e.message : rule.content || rule.message,
|
|
37947
|
+
rule: new form_Rule(rule)
|
|
37948
|
+
}));
|
|
37949
|
+
}));
|
|
37950
|
+
}
|
|
37925
37951
|
}
|
|
37926
|
-
}
|
|
37927
|
-
} else {
|
|
37928
|
-
var isArrType = type === 'array';
|
|
37929
|
-
var isArrVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(itemValue);
|
|
37930
|
-
var hasEmpty = true;
|
|
37931
|
-
if (isArrType || isArrVal) {
|
|
37932
|
-
hasEmpty = !isArrVal || !itemValue.length;
|
|
37933
|
-
} else if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(itemValue)) {
|
|
37934
|
-
hasEmpty = eqEmptyValue(itemValue.trim());
|
|
37935
37952
|
} else {
|
|
37936
|
-
|
|
37937
|
-
|
|
37938
|
-
|
|
37939
|
-
|
|
37953
|
+
var isArrType = type === 'array';
|
|
37954
|
+
var isArrVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(itemValue);
|
|
37955
|
+
var hasEmpty = true;
|
|
37956
|
+
if (isArrType || isArrVal) {
|
|
37957
|
+
hasEmpty = !isArrVal || !itemValue.length;
|
|
37958
|
+
} else if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(itemValue)) {
|
|
37959
|
+
hasEmpty = eqEmptyValue(itemValue.trim());
|
|
37960
|
+
} else {
|
|
37961
|
+
hasEmpty = eqEmptyValue(itemValue);
|
|
37962
|
+
}
|
|
37963
|
+
if (required ? hasEmpty || form_validErrorRuleValue(rule, itemValue) : !hasEmpty && form_validErrorRuleValue(rule, itemValue)) {
|
|
37964
|
+
errorRules.push(new form_Rule(rule));
|
|
37965
|
+
}
|
|
37940
37966
|
}
|
|
37941
37967
|
}
|
|
37942
|
-
}
|
|
37943
|
-
}
|
|
37968
|
+
});
|
|
37969
|
+
}
|
|
37944
37970
|
}
|
|
37945
|
-
|
|
37946
|
-
|
|
37947
|
-
|
|
37948
|
-
|
|
37949
|
-
|
|
37950
|
-
|
|
37951
|
-
|
|
37952
|
-
|
|
37971
|
+
return Promise.all(syncVailds).then(function () {
|
|
37972
|
+
if (errorRules.length) {
|
|
37973
|
+
errorMaps[property] = errorRules.map(function (rule) {
|
|
37974
|
+
return {
|
|
37975
|
+
$form: _this9,
|
|
37976
|
+
rule: rule,
|
|
37977
|
+
data: data,
|
|
37978
|
+
field: property,
|
|
37979
|
+
property: property
|
|
37980
|
+
};
|
|
37981
|
+
});
|
|
37982
|
+
}
|
|
37983
|
+
});
|
|
37984
|
+
})).then(function () {
|
|
37985
|
+
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEmpty(errorMaps)) {
|
|
37986
|
+
return Promise.reject(errorMaps);
|
|
37953
37987
|
}
|
|
37954
37988
|
});
|
|
37955
37989
|
},
|
|
@@ -37988,16 +38022,16 @@ function getResetValue(value, resetValue) {
|
|
|
37988
38022
|
}
|
|
37989
38023
|
},
|
|
37990
38024
|
triggerItemEvent: function triggerItemEvent(evnt, field, itemValue) {
|
|
37991
|
-
var
|
|
38025
|
+
var _this10 = this;
|
|
37992
38026
|
if (field) {
|
|
37993
38027
|
return this.validItemRules(evnt ? ['blur'].includes(evnt.type) ? 'blur' : 'change' : 'all', field, itemValue).then(function () {
|
|
37994
|
-
|
|
37995
|
-
})["catch"](function (
|
|
37996
|
-
var
|
|
37997
|
-
var item =
|
|
37998
|
-
if (item) {
|
|
38028
|
+
_this10.clearValidate(field);
|
|
38029
|
+
})["catch"](function (errorMaps) {
|
|
38030
|
+
var rest = errorMaps[field];
|
|
38031
|
+
var item = _this10.getItemByField(field);
|
|
38032
|
+
if (item && rest) {
|
|
37999
38033
|
item.showError = true;
|
|
38000
|
-
item.errRule = rule;
|
|
38034
|
+
item.errRule = rest[0].rule;
|
|
38001
38035
|
}
|
|
38002
38036
|
});
|
|
38003
38037
|
}
|