From 6c01794fa322a6d9a584c4eaf691fa18da476888 Mon Sep 17 00:00:00 2001 From: zhh Date: Thu, 24 May 2018 14:47:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E5=88=97=E8=BE=93=E5=85=A5=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E4=BB=A5=E6=8D=A2=E8=A1=8C=E7=AC=A6=E9=9A=94=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pms/productAttr/components/ProductAttrDetail.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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};