商品共有元素 优化
parent
a1f08feb16
commit
a6451848c3
|
@ -219,7 +219,8 @@
|
|||
:props="{'value': 'id', 'label': 'name'}"
|
||||
:options="categoryOptions"></el-cascader>
|
||||
</el-form-item>
|
||||
<el-tabs v-model="activeName" type="border-card">
|
||||
<el-empty v-show="categoryOptionValue.length === 0" description="请选择品类,在进行操作"></el-empty>
|
||||
<el-tabs v-show="categoryOptionValue.length > 0" v-model="activeName" type="border-card">
|
||||
<el-tab-pane label="商品属性组" name="attributeGroup">
|
||||
<el-row style="overflow-x: auto; height: 300px;">
|
||||
<el-col :span="6" v-for="templateAttributeGroup in categoryCommonElement.templateAttributeGroupList">
|
||||
|
@ -439,8 +440,7 @@ export default {
|
|||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
attributeCheckedFun(checkedValue) {
|
||||
console.log(checkedValue)
|
||||
attributeCheckedFun() {
|
||||
// attributeIdCheckedList -> attributeCheckedList 不在
|
||||
// 1 -> ID 1 : attributeCheckedList[] -> 1
|
||||
// 2 -> ID 3 : attributeCheckedList[1] -> 3
|
||||
|
@ -457,7 +457,8 @@ export default {
|
|||
// attributeIdCheckedList [3,5,9] : attributeCheckedList [3,5] -> [3,5,9]
|
||||
// attributeIdCheckedList [3,9] : attributeCheckedList [3,5,9] -> [3,9]
|
||||
// attributeCheckedList 集合 不在 attributeIdCheckedList 集合的元素,然后删除
|
||||
|
||||
let attributeChecked = this.attributeCheckedList.find(attributeChecked => this.attributeIdCheckedList.indexOf(attributeChecked.id) === -1);
|
||||
this.attributeCheckedList.splice(this.attributeCheckedList.indexOf(attributeChecked), 1);
|
||||
}
|
||||
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue