diff --git a/src/views/pms/productAttr/components/ProductAttrDetail.vue b/src/views/pms/productAttr/components/ProductAttrDetail.vue index c158ba4..19d3ff2 100644 --- a/src/views/pms/productAttr/components/ProductAttrDetail.vue +++ b/src/views/pms/productAttr/components/ProductAttrDetail.vue @@ -47,7 +47,7 @@ - + @@ -100,19 +100,27 @@ {min: 2, max: 140, message: '长度在 2 到 140 个字符', trigger: 'blur'} ] }, - productAttrCateList: null + productAttrCateList: null, + inputListFormat:null } }, created() { if(this.isEdit){ getProductAttr(this.$route.query.id).then(response => { this.productAttr = response.data; + this.inputListFormat = this.productAttr.inputList.replace(/,/g,'\n'); }); }else{ this.resetProductAttr(); } this.getCateList(); }, + watch:{ + inputListFormat: function (newValue, oldValue) { + newValue = newValue.replace(/\n/g,','); + this.productAttr.inputList = newValue; + } + }, methods: { getCateList() { let listQuery = {pageNum: 1, pageSize: 100};