新增订单列表对接数据
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<div class="list_title">{{ item.name }}</div>
|
||||
<div class="item_wrap">
|
||||
<el-button :type="item.active ? 'primary' : ''" @click="selectHandle(item)">全部</el-button>
|
||||
<el-button :type="item.active ? 'primary' : ''" v-for="val in item.childrenList" :key="val.id"
|
||||
<el-button :type="val.active ? 'primary' : ''" v-for="val in item.childrenList" :key="val.id"
|
||||
@click="selectHandle(val, index)">{{
|
||||
val.name }}</el-button>
|
||||
</div>
|
||||
@@ -58,9 +58,12 @@ export default {
|
||||
},
|
||||
// 选择分类
|
||||
selectHandle(item, index = -1) {
|
||||
console.log(item, index)
|
||||
if (index != -1) {
|
||||
this.categorys[index].childrenList.map(val => {
|
||||
val.active = false
|
||||
this.categorys[index].active = false
|
||||
} else {
|
||||
item.childrenList.map(item => {
|
||||
item.active = false
|
||||
})
|
||||
}
|
||||
item.active = !item.active
|
||||
|
||||
Reference in New Issue
Block a user