This commit is contained in:
熊成强 2020-11-19 16:09:02 +08:00
parent b6261a2873
commit 50fcc04e0c

View File

@ -368,7 +368,12 @@ export default {
} }
this.$refs.form.validate((v) => { this.$refs.form.validate((v) => {
if (v) { if (v) {
if (this.form.weight) {
this.form.weight = this.form.weight / 100 > 1 ? 1 : this.form.weight / 100 this.form.weight = this.form.weight / 100 > 1 ? 1 : this.form.weight / 100
}
if (!this.weight) {
this.form.weight = ''
}
if (this.form.isEdit) { if (this.form.isEdit) {
this.info.modelItems[this.form.index] = Object.assign({}, this.form) this.info.modelItems[this.form.index] = Object.assign({}, this.form)
this.form = {} this.form = {}