fix商品品牌分类选择显示bug

master
czc 2 years ago
parent b423183c82
commit 1123bad1d8

@ -26,11 +26,13 @@ export default {
}, },
methods:{ methods:{
handleBrandChange (id) { handleBrandChange (id) {
if (this.value1) { if (id) {
let brand=this.brandList.find(item=>{ let brand=this.brandList.find(item=>{
return item.id==id return item.id==id
}) })
this.$emit('change', brand.name); this.$emit('change', brand.name);
} else {
this.$emit('change', null);
} }
}, },
}, },

@ -36,10 +36,12 @@ export default {
} }
}, },
methods: { methods: {
handleMallCatergoryChange () { handleMallCatergoryChange (e) {
if (this.value1 && this.value1.length != 0) { if (e.length > 0) {
let arr = this.$refs['cascaderMallCatergory'].getCheckedNodes()[0].pathLabels let arr = this.$refs['cascaderMallCatergory'].getCheckedNodes()[0].pathLabels
this.$emit('change', arr); this.$emit('change', arr);
} else {
this.$emit('change', '');
} }
}, },
recurs(list){ recurs(list){

Loading…
Cancel
Save