fix: 🐛 修复规格列表中,第一次新增规格点击编辑不回显问题

master
Yer 2023-05-09 11:42:41 +08:00
parent 7ded1c564e
commit 9dece4dd2c
1 changed files with 5 additions and 4 deletions

View File

@ -269,11 +269,12 @@ export default {
let localVal = v.specValue;
this.form.specName = v.specName;
this.form.id = v.id;
// this.$nextTick(() => {
// this.$set(this.form, 'specValue', localVal.split(","))
// })
this.form.specValue = localVal.split(",")
this.$nextTick(() => {
this.$set(this.form, 'specValue', v.specValue);
})
if (localVal && localVal.indexOf("," > 0)) {
this.$set(this.form, 'specValue', localVal.split(","));
this.specValue = this.form.specValue;
} else {
this.specValue = [];