fix(distribution): 分站首页轮播不再叠压暗遮罩
海报已含文案,再叠标题会触发整幅渐变遮罩,把左右两侧颜色压暗。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -60,14 +60,27 @@ const displayAnnouncements = computed(() => {
|
|||||||
const banners = ref<HomeBannerSlide[]>(defaultHomeBanners)
|
const banners = ref<HomeBannerSlide[]>(defaultHomeBanners)
|
||||||
const displayBanners = computed<HomeBannerSlide[]>(() => {
|
const displayBanners = computed<HomeBannerSlide[]>(() => {
|
||||||
if (siteStore.isDistribution && siteStore.banners && siteStore.banners.length > 0) {
|
if (siteStore.isDistribution && siteStore.banners && siteStore.banners.length > 0) {
|
||||||
return siteStore.banners.map(b => ({
|
return siteStore.banners.map(b => {
|
||||||
eyebrow: siteStore.siteName,
|
const imageUrl = b.image_url?.trim() || ''
|
||||||
title: b.title || '精选游戏账号 · 随租随玩',
|
// 整张海报已含文案。再叠标题会触发整幅压暗遮罩,左右两侧颜色会被压暗。
|
||||||
badge: '本店精选',
|
if (imageUrl) {
|
||||||
pill: '官方保障',
|
return {
|
||||||
tone: 'gold',
|
eyebrow: '',
|
||||||
image_url: b.image_url,
|
title: '',
|
||||||
}))
|
badge: '本店精选',
|
||||||
|
pill: '',
|
||||||
|
tone: 'gold',
|
||||||
|
image_url: imageUrl,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
eyebrow: siteStore.siteName,
|
||||||
|
title: b.title || '精选游戏账号 · 随租随玩',
|
||||||
|
badge: '本店精选',
|
||||||
|
pill: '官方保障',
|
||||||
|
tone: 'gold',
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
return banners.value
|
return banners.value
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user