feat(home-banner): 轮播支持 PC/移动两端分图与热区跳转,热区图悬浮放大;修复上传压缩压白透明 PNG
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
defaultHomeAnnouncements,
|
||||
defaultHomeBanners,
|
||||
fetchMobileHomeConfig,
|
||||
normalizeHomeBanner,
|
||||
type AWRecycleConfig,
|
||||
type CooperationFeedbackConfig,
|
||||
type HomeBannerSlide,
|
||||
@@ -60,10 +61,11 @@ const displayAnnouncements = computed(() => {
|
||||
})
|
||||
const banners = ref<HomeBannerSlide[]>(defaultHomeBanners)
|
||||
const displayBanners = computed<HomeBannerSlide[]>(() => {
|
||||
if (siteStore.isDistribution && siteStore.banners.length > 0) {
|
||||
return mapDistributionHomeBanners(siteStore.banners, siteStore.siteName)
|
||||
}
|
||||
return banners.value
|
||||
const list =
|
||||
siteStore.isDistribution && siteStore.banners.length > 0
|
||||
? mapDistributionHomeBanners(siteStore.banners, siteStore.siteName)
|
||||
: banners.value
|
||||
return list.filter(slide => slide.enabled !== false)
|
||||
})
|
||||
const awRecycle = ref<AWRecycleConfig>({ ...defaultAWRecycleConfig })
|
||||
const awRecycleDialogVisible = ref(false)
|
||||
@@ -399,7 +401,7 @@ function restoreFromCache(): boolean {
|
||||
})
|
||||
if (pcHomeCache.homeConfigLoaded) {
|
||||
announcements.value = pcHomeCache.announcements.slice()
|
||||
banners.value = pcHomeCache.banners.map(slide => ({ ...slide }))
|
||||
banners.value = pcHomeCache.banners.map(slide => normalizeHomeBanner(slide))
|
||||
awRecycle.value = { ...pcHomeCache.awRecycle }
|
||||
cooperationFeedback.value = { ...pcHomeCache.cooperationFeedback }
|
||||
publishOptions.value = pcHomeCache.publishOptions
|
||||
|
||||
Reference in New Issue
Block a user