Commit 7839c351 by zhuzhequan

sku 筛选

parent 3687e70f
......@@ -185,6 +185,9 @@
width="800px"
:close-on-click-modal="false"
title="选择属性">
<div class="filter" style="margin-bottom: 10px">
<el-input placeholder="请输入属性类名称" clearable v-model="filterVal"></el-input>
</div>
<div class="product-prop">
<div
class="product-prop_item"
......@@ -271,6 +274,7 @@ export default {
currentPage: 1,
total: 0
},
filterVal: '',
selectProps: []
}
},
......@@ -353,7 +357,7 @@ export default {
enname: item.enname,
children: []
}
const current = properties.find((e) => e.code === item.cateCode)
const current = properties.find((e) => e.code === item.cateCode && item.cnname.includes(this.filterVal))
if (current) {
current.children.push(item)
} else {
......@@ -361,6 +365,10 @@ export default {
properties.push(prop)
}
})
console.log(properties)
properties.forEach(el => {
el.children = el.children.filter(item => item.cnname.includes(this.filterVal))
})
return properties
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment