优化
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
<span class="text">{{ $t('ShoppingCart.brands') }}</span>
|
||||
</div>
|
||||
<div class="brands-item" v-for="v in brandsList" :key="v.brand">
|
||||
<span class="label">{{ v.brand }}</span>
|
||||
<span class="label" @click="handleBrandClick(v.id)">{{ v.brand }}</span>
|
||||
<span class="value"
|
||||
><span>{{ v.children.length }}</span
|
||||
>{{ $t('ShoppingCart.item') }}</span
|
||||
@@ -51,6 +51,7 @@
|
||||
if (index === -1) {
|
||||
arr.push({
|
||||
brand: v.brand,
|
||||
id: v.sellerId,
|
||||
children: [v]
|
||||
})
|
||||
} else {
|
||||
@@ -68,6 +69,12 @@
|
||||
query: { list }
|
||||
})
|
||||
}
|
||||
const handleBrandClick = (id) => {
|
||||
router.push({
|
||||
name: 'brandDetail',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@@ -124,6 +131,8 @@
|
||||
> .label {
|
||||
text-decoration: underline;
|
||||
color: #585858;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
> .value {
|
||||
color: #808080;
|
||||
|
||||
Reference in New Issue
Block a user