Commit 9df9de634f29c0bf7fea59125acfc1c3e22e93fc
1 parent
e30ce035
fix: prod2.sh-19/20
Showing
2 changed files
with
14 additions
and
10 deletions
components/ProductDetail.vue
... | ... | @@ -9,18 +9,18 @@ |
9 | 9 | :class="{ |
10 | 10 | 'breadcrumb-disabled': item.disabled, |
11 | 11 | 'breadcrumb-active': !item.disabled, |
12 | + 'breadcrumb-last': index === items.length - 1, | |
12 | 13 | }" |
14 | + :style="index === items.length - 1 ? 'color: black;' : ''" | |
13 | 15 | > |
14 | 16 | {{ item.title }} |
15 | 17 | </v-breadcrumbs-item> |
16 | - | |
17 | 18 | <!-- 添加分隔符,排除最后一个 item --> |
18 | 19 | <span v-if="index < items.length - 1" class="breadcrumb-divider" |
19 | 20 | >/</span |
20 | 21 | > |
21 | 22 | </template> |
22 | - <span class="breadcrumb-divider">/</span> | |
23 | - <span style="margin-left: 5px">{{ info.name }}</span> | |
23 | + | |
24 | 24 | </v-breadcrumbs> |
25 | 25 | </div> |
26 | 26 | <v-row class="mb-16 ma-0"> |
... | ... | @@ -348,6 +348,7 @@ const routeQuery = useRouteQuery(); |
348 | 348 | const dialogStore = useDialogStore(); |
349 | 349 | const href1 = ref("/products"); |
350 | 350 | const href2 = ref("/products"); |
351 | +const idHref = ref("/products"); | |
351 | 352 | const productStore = useProductListStore(); |
352 | 353 | // 定义单个 item 的接口 |
353 | 354 | interface BreadcrumbItem { |
... | ... | @@ -378,11 +379,11 @@ const items = ref<BreadcrumbItem[]>([ |
378 | 379 | disabled: false, |
379 | 380 | href: "/products", |
380 | 381 | }, |
381 | - // { | |
382 | - // title: "TITLE", | |
383 | - // disabled: false, | |
384 | - // href: "", | |
385 | - // }, | |
382 | + { | |
383 | + title: "TITLE", | |
384 | + disabled: false, | |
385 | + href: "/products", | |
386 | + }, | |
386 | 387 | ]); |
387 | 388 | |
388 | 389 | const props = defineProps<{ |
... | ... | @@ -405,6 +406,7 @@ let { data: resData } = await useAsyncData( |
405 | 406 | } |
406 | 407 | ); |
407 | 408 | watchEffect(() => { |
409 | + console.log(info,'5656info'); | |
408 | 410 | if (info?.productCrumbsVO?.category1 && productStore.keyword) { |
409 | 411 | items.value[1].title = info.productCrumbsVO.category1; |
410 | 412 | items.value[1].href = |
... | ... | @@ -477,6 +479,8 @@ watchEffect(() => { |
477 | 479 | items.value[3].href = |
478 | 480 | href2.value + "&function=" + info.productCrumbsVO.function; |
479 | 481 | } |
482 | + items.value[4].title = info.name; | |
483 | + items.value[4].href = "https://www.canrud.com/products/detail/" + info.id; | |
480 | 484 | } |
481 | 485 | recommendList.value = resData.value.data.records; |
482 | 486 | ... | ... |
deploy/prod2.sh