|
@@ -143,16 +143,16 @@ export default defineComponent({
|
|
|
const len = BgImgMapper.length - 1
|
|
|
if (state.bgImgIndex === len) {
|
|
|
state.bgImgIndex = 0
|
|
|
- ref_screenBg.value.children[Math.abs(state.bgImgIndex - len)].classList.add('animate__fadeIn')
|
|
|
- ref_screenBg.value.children[Math.abs(state.bgImgIndex - len)].classList.remove('animate__fadeOut')
|
|
|
- ref_screenBg.value.children[Math.abs(len - len)].classList.add('animate__fadeOut')
|
|
|
- ref_screenBg.value.children[Math.abs(len - len)].classList.remove('animate__fadeIn')
|
|
|
+ ref_screenBg.value?.children[Math.abs(state.bgImgIndex - len)].classList.add('animate__fadeIn')
|
|
|
+ ref_screenBg.value?.children[Math.abs(state.bgImgIndex - len)].classList.remove('animate__fadeOut')
|
|
|
+ ref_screenBg.value?.children[Math.abs(len - len)].classList.add('animate__fadeOut')
|
|
|
+ ref_screenBg.value?.children[Math.abs(len - len)].classList.remove('animate__fadeIn')
|
|
|
} else {
|
|
|
state.bgImgIndex++
|
|
|
- ref_screenBg.value.children[Math.abs(state.bgImgIndex - len)].classList.add('animate__fadeIn')
|
|
|
- ref_screenBg.value.children[Math.abs(state.bgImgIndex - len)].classList.remove('animate__fadeOut')
|
|
|
- ref_screenBg.value.children[Math.abs(state.bgImgIndex - 1 - len)].classList.add('animate__fadeOut')
|
|
|
- ref_screenBg.value.children[Math.abs(state.bgImgIndex - 1 - len)].classList.remove('animate__fadeIn')
|
|
|
+ ref_screenBg.value?.children[Math.abs(state.bgImgIndex - len)].classList.add('animate__fadeIn')
|
|
|
+ ref_screenBg.value?.children[Math.abs(state.bgImgIndex - len)].classList.remove('animate__fadeOut')
|
|
|
+ ref_screenBg.value?.children[Math.abs(state.bgImgIndex - 1 - len)].classList.add('animate__fadeOut')
|
|
|
+ ref_screenBg.value?.children[Math.abs(state.bgImgIndex - 1 - len)].classList.remove('animate__fadeIn')
|
|
|
}
|
|
|
}, 5000)
|
|
|
})
|