99 <div class =" brand-container" >
1010 <div class =" gold-sponsors" >
1111 <div
12- v-for =" (brand, index) in processedGoldSponsors"
13- v-show =" !isCollapsed || (isCollapsed && shouldShowSponsor(brand.expiryTime))"
14- :key =" 'gold-' + index"
12+ v-for =" brand in goldSponsors"
13+ v-show =" shouldShowSponsor(brand)"
1514 :class =" { 'collapsed-mode': isCollapsed }"
1615 class =" brand-item gold"
1716 @click =" openSponsorLink(brand.href)"
1817 >
19- <img v-if =" !isCollapsed && brand.link" :alt =" brand.alt" :src =" brand.link" class =" brand-image" />
20- <span v-if =" !isCollapsed && brand.alt.includes('成为赞助商')" class =" brand-text" >
21- {{ brand.alt }}
22- </span >
23- <span v-if =" isCollapsed" class =" brand-text collapsed-text" >
18+ <img v-if =" !isCollapsed" :alt =" brand.alt" :src =" brand.link" class =" brand-image" />
19+ <span v-else class =" brand-text collapsed-text" >
2420 {{ brand.alt }}
2521 </span >
2622 </div >
2723 </div >
2824 <div class =" general-sponsors" >
2925 <div
30- v-for =" (brand, index) in processedGeneralSponsors"
31- v-show =" !isCollapsed || (isCollapsed && shouldShowSponsor(brand.expiryTime))"
32- :key =" 'general-' + index"
26+ v-for =" brand in generalSponsors"
27+ v-show =" shouldShowSponsor(brand)"
3328 :class =" { 'collapsed-mode': isCollapsed }"
3429 class =" brand-item"
3530 @click =" openSponsorLink(brand.href)"
3631 >
37- <img v-if =" !isCollapsed && brand.link" :alt =" brand.alt" :src =" brand.link" class =" brand-image" />
38- <span v-if =" !isCollapsed && brand.alt.includes('成为赞助商')" class =" brand-text" >
39- {{ brand.alt }}
40- </span >
41- <span v-if =" isCollapsed" class =" brand-text collapsed-text" >
32+ <img v-if =" !isCollapsed" :alt =" brand.alt" :src =" brand.link" class =" brand-image" />
33+ <span v-else class =" brand-text collapsed-text" >
4234 {{ brand.alt }}
4335 </span >
4436 </div >
4537 </div >
4638 <div
47- v-if =" isCollapsed && shouldShowExtraBecomeSponsor"
39+ v-if =" shouldShowExtraBecomeSponsor"
4840 class =" brand-item become-brand"
4941 @click =" openSponsorLink(sponsorUrl)"
5042 >
5648<script setup>
5749import { computed } from " vue" ;
5850import {
59- defaultSponsor ,
6051 generalSponsors ,
6152 goldSponsors ,
6253 openSponsorLink ,
@@ -67,21 +58,9 @@ import { useStorage } from "@vueuse/core";
6758
6859const isCollapsed = useStorage (' fba-docs-sponsor-collapsed' , false );
6960
70- const processedGoldSponsors = computed (() => {
71- return goldSponsors .map (brand => {
72- return shouldShowSponsor (brand .expiryTime ) ? brand : defaultSponsor;
73- });
74- });
75-
76- const processedGeneralSponsors = computed (() => {
77- return generalSponsors .map (brand => {
78- return shouldShowSponsor (brand .expiryTime ) ? brand : defaultSponsor;
79- });
80- });
81-
8261const shouldShowExtraBecomeSponsor = computed (() => {
83- return (goldSponsors .filter (brand => brand . link && shouldShowSponsor (brand . expiryTime )).length +
84- generalSponsors .filter (brand => brand . link && shouldShowSponsor (brand . expiryTime )).length ) < 9 ;
62+ return (goldSponsors .filter (brand => shouldShowSponsor (brand)).length +
63+ generalSponsors .filter (brand => shouldShowSponsor (brand)).length ) < 9 ;
8564});
8665
8766const toggleCollapse = () => {
0 commit comments