This commit is contained in:
李志鹏
2026-06-01 11:18:35 +08:00
parent ad0f4f65e5
commit bf5c27d857
12 changed files with 54 additions and 22 deletions

View File

@@ -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;