Commit c2e4dbdde16b7f08c7ebc8fd9f89cff7bd2af922
Merge branch 'by'
Showing
1 changed file
with
51 additions
and
24 deletions
components/MobileProductDetail.vue
... | ... | @@ -206,8 +206,10 @@ |
206 | 206 | <v-tabs |
207 | 207 | class="tabs" |
208 | 208 | v-model="tab" |
209 | - bg-color="#fff" | |
210 | - slider-color="#1d89e4" | |
209 | + style="margin-top: 25px; margin-bottom: 20px" | |
210 | + color="white" | |
211 | + bg-color="#eeeeee" | |
212 | + slider-color="blue-lighten-1" | |
211 | 213 | selected-class="active" |
212 | 214 | > |
213 | 215 | <v-tab :value="1">Product Details</v-tab> |
... | ... | @@ -263,8 +265,9 @@ |
263 | 265 | <v-tabs |
264 | 266 | class="tabs" |
265 | 267 | v-model="tabProduct" |
266 | - bg-color="#fff" | |
267 | - slider-color="#1d89e4" | |
268 | + color="white" | |
269 | + bg-color="#eeeeee" | |
270 | + slider-color="blue-lighten-1" | |
268 | 271 | selected-class="active" |
269 | 272 | style="margin-bottom: 20px" |
270 | 273 | > |
... | ... | @@ -397,20 +400,39 @@ |
397 | 400 | <!-- <v-window-item key="3" :value="3"> 2 </v-window-item> --> |
398 | 401 | </v-window> |
399 | 402 | </div> |
400 | - <!-- <div class="tw-pb-[64px] ma-4 rounded-lg"> | |
403 | + <div class="tw-pb-[64px] ma-4 rounded-lg"> | |
401 | 404 | <v-tabs |
402 | 405 | class="tabs" |
403 | 406 | v-model="tabJournal" |
404 | - bg-color="#fff" | |
405 | - slider-color="#1d89e4" | |
407 | + color="white" | |
408 | + bg-color="#eeeeee" | |
409 | + slider-color="blue-lighten-1" | |
406 | 410 | selected-class="active" |
407 | 411 | > |
408 | 412 | <v-tab :value="1">JOURNAL RECOMMENDATION</v-tab> |
409 | 413 | </v-tabs> |
410 | - <v-window v-model="tab"> | |
411 | - <v-window-item key="1" :value="1"> </v-window-item> | |
414 | + <v-window v-model="tabJournal"> | |
415 | + <v-window-item key="1" :value="1"> | |
416 | + <v-list> | |
417 | + <v-list-item | |
418 | + v-for="item in info.journals" | |
419 | + :key="item.id" | |
420 | + @click="navigateToUrl(item.link)" | |
421 | + @mouseenter="hoveredItem = item.id" | |
422 | + @mouseleave="hoveredItem = null" | |
423 | + > | |
424 | + <v-list-item-title> | |
425 | + <span | |
426 | + :class="['title', { 'full-title': hoveredItem === item.id }]" | |
427 | + > | |
428 | + {{ item.title }} | |
429 | + </span> | |
430 | + </v-list-item-title> | |
431 | + </v-list-item> | |
432 | + </v-list> | |
433 | + </v-window-item> | |
412 | 434 | </v-window> |
413 | - </div> --> | |
435 | + </div> | |
414 | 436 | <!-- Basic use --> |
415 | 437 | <div class="social-share-container"> |
416 | 438 | <SocialShare |
... | ... | @@ -457,9 +479,9 @@ const info = props.info; |
457 | 479 | // onMounted(() => { |
458 | 480 | // dialogStore.updateDialog(true) |
459 | 481 | // }) |
460 | -const tab = ref(0); | |
461 | -const tabProduct = ref(0); | |
462 | -const tabJournal = ref(0); | |
482 | +const tab = ref(); | |
483 | +const tabProduct = ref(); | |
484 | +const tabJournal = ref(); | |
463 | 485 | const slide = ref(0); |
464 | 486 | const router = useRouter(); |
465 | 487 | const href1 = ref("/products"); |
... | ... | @@ -481,7 +503,11 @@ const currentIndexHot = ref(1); |
481 | 503 | const total = ref(3); |
482 | 504 | const hotTotal = ref(10); |
483 | 505 | const isOrNotMobile = isMobile(); |
506 | +const hoveredItem = ref(null); | |
484 | 507 | |
508 | +const navigateToUrl = (url) => { | |
509 | + window.open(url); // 在新标签页中打开链接 | |
510 | +}; | |
485 | 511 | const loadProducts = async () => { |
486 | 512 | const pageSize = 4; |
487 | 513 | loading.value = true; |
... | ... | @@ -502,8 +528,8 @@ const loadProducts = async () => { |
502 | 528 | } |
503 | 529 | ); |
504 | 530 | total.value = resData.value.data.total; |
505 | - if (total.value > 30) { | |
506 | - total.value = 30; | |
531 | + if (total.value > 50) { | |
532 | + total.value = 50; | |
507 | 533 | } |
508 | 534 | recommendList.value = resData.value.data.records; |
509 | 535 | maxPageRe.value = resData.value.data.pages; |
... | ... | @@ -724,21 +750,22 @@ const hotLength = computed(() => |
724 | 750 | </script> |
725 | 751 | |
726 | 752 | <style lang="scss" scoped> |
727 | -.tabs { | |
728 | - border-bottom: 2px solid #cbd9e4; | |
729 | -} | |
730 | - | |
731 | -.active { | |
732 | - background-color: #fff; | |
733 | -} | |
734 | 753 | // .tabs { |
735 | -// border-bottom: 2px solid #1f88e5; | |
754 | +// border-bottom: 2px solid #cbd9e4; | |
736 | 755 | // } |
737 | 756 | |
738 | 757 | // .active { |
739 | -// background-color: #1086e8; | |
758 | +// background-color: #fff; | |
740 | 759 | // } |
741 | 760 | |
761 | +.tabs { | |
762 | + border-bottom: 2px solid #1f88e5; | |
763 | +} | |
764 | + | |
765 | +.active { | |
766 | + background-color: #1086e8; | |
767 | +} | |
768 | + | |
742 | 769 | .tw-sticky { |
743 | 770 | position: sticky; |
744 | 771 | } | ... | ... |