This commit is contained in:
梁灏 2017-04-25 14:50:37 +08:00
parent c5625bfdba
commit 05e2dda017
2 changed files with 27 additions and 66 deletions

View file

@ -191,10 +191,17 @@
let prop = getPropByPath(model, path);
if (Array.isArray(value) && value.length > 0) {
// if (Array.isArray(value) && value.length > 0) {
// this.validateDisabled = true;
// prop.o[prop.k] = [];
// } else if (value !== this.initialValue) {
// this.validateDisabled = true;
// prop.o[prop.k] = this.initialValue;
// }
if (Array.isArray(value)) {
this.validateDisabled = true;
prop.o[prop.k] = [];
} else if (value !== this.initialValue) {
prop.o[prop.k] = [].concat(this.initialValue);
} else {
this.validateDisabled = true;
prop.o[prop.k] = this.initialValue;
}