|
@@ -49,7 +49,6 @@ export const smoothAnimationState = {
|
|
watch(smoothAnimationState.isShow, () => {
|
|
watch(smoothAnimationState.isShow, () => {
|
|
if (smoothAnimationState.isShow.value) {
|
|
if (smoothAnimationState.isShow.value) {
|
|
smoothAnimationState.smoothAnimationBoxDom?.classList.remove("smoothAnimationBoxHide")
|
|
smoothAnimationState.smoothAnimationBoxDom?.classList.remove("smoothAnimationBoxHide")
|
|
- //moveSmoothAnimation(moveState.progress, moveState.activeIndex)
|
|
|
|
} else {
|
|
} else {
|
|
smoothAnimationState.smoothAnimationBoxDom?.classList.add("smoothAnimationBoxHide")
|
|
smoothAnimationState.smoothAnimationBoxDom?.classList.add("smoothAnimationBoxHide")
|
|
}
|
|
}
|
|
@@ -86,6 +85,7 @@ export function initSmoothAnimation() {
|
|
* 销毁
|
|
* 销毁
|
|
*/
|
|
*/
|
|
export function destroySmoothAnimation() {
|
|
export function destroySmoothAnimation() {
|
|
|
|
+ smoothAnimationState.isShow.value = false
|
|
document.removeEventListener("resize", calcClientWidth)
|
|
document.removeEventListener("resize", calcClientWidth)
|
|
smoothAnimationState.smoothAnimationBoxDom?.remove()
|
|
smoothAnimationState.smoothAnimationBoxDom?.remove()
|
|
Object.assign(smoothAnimationState, {
|
|
Object.assign(smoothAnimationState, {
|
|
@@ -102,6 +102,11 @@ export function destroySmoothAnimation() {
|
|
aveSpeed: 0,
|
|
aveSpeed: 0,
|
|
clientWidth: 0
|
|
clientWidth: 0
|
|
})
|
|
})
|
|
|
|
+ Object.assign(moveState, {
|
|
|
|
+ oldIndex: -1,
|
|
|
|
+ progress: 0,
|
|
|
|
+ activeIndex: 0
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|