This commit is contained in:
scout 2025-02-22 13:45:59 +08:00
parent bce6823c18
commit b3ae5b35ad
3 changed files with 7 additions and 11 deletions

View File

@ -23,7 +23,7 @@ function getBrowserLanguage() {
} }
// 获取存储的语言或浏览器语言 // 获取存储的语言或浏览器语言
const savedLanguage = 'en' const savedLanguage = localStorage.getItem('language') || getBrowserLanguage()
const i18n = createI18n({ const i18n = createI18n({
legacy: false, // 使用 Composition API legacy: false, // 使用 Composition API

View File

@ -100,7 +100,6 @@ const handlePrev = () => {
carouselTrack.value.style.transition = "transform 0.5s ease-in-out"; carouselTrack.value.style.transition = "transform 0.5s ease-in-out";
currentIndex.value--; currentIndex.value--;
//
if (currentIndex.value < 0) { if (currentIndex.value < 0) {
currentIndex.value = state.marqueeArr.length - 1; currentIndex.value = state.marqueeArr.length - 1;
} }
@ -113,7 +112,6 @@ const handleNext = () => {
carouselTrack.value.style.transition = "transform 0.5s ease-in-out"; carouselTrack.value.style.transition = "transform 0.5s ease-in-out";
currentIndex.value++; currentIndex.value++;
//
if (currentIndex.value >= state.marqueeArr.length) { if (currentIndex.value >= state.marqueeArr.length) {
currentIndex.value = 0; currentIndex.value = 0;
} }
@ -225,9 +223,7 @@ const carouselTrack = ref(null);
const currentIndex = ref(0); const currentIndex = ref(0);
const getVisibleItems = () => { const getVisibleItems = () => {
const items = state.marqueeArr; return state.marqueeArr;
//
return [...items, ...items];
}; };
// //

View File

@ -650,11 +650,11 @@ watch(
</section> </section>
<section className="panel" style="background-color: #F8F9FF;"> <section className="panel" style="background-color: #F8F9FF;">
<n-divider class="divider1" vertical /> <n-divider class="divider1" vertical style="height: 100%;" />
<div class="divider2" style=""></div> <div class="divider2" style="height: 100%;"></div>
<div class="divider3" style=""></div> <div class="divider3" style="height: 100%;"></div>
<div class="divider4" style=""></div> <div class="divider4" style="height: 100%;"></div>
<n-divider class="divider5" vertical /> <n-divider class="divider5" vertical style="height: 100%;" />
<div class="parallax-bg"></div> <div class="parallax-bg"></div>
<div class="content4 mt-[103px]"> <div class="content4 mt-[103px]">
<div class="text-[#8B59F7] text-[16px]">{{ t('home.section4.label') }}</div> <div class="text-[#8B59F7] text-[16px]">{{ t('home.section4.label') }}</div>