|
@@ -304,10 +304,11 @@ const { haveSwipedThisTime, translateLength, currentAnchorIdx, goingToAnchorIdx
|
|
initialAnchorIdx: Number(route.query.anchorIdx) || 0
|
|
initialAnchorIdx: Number(route.query.anchorIdx) || 0
|
|
})
|
|
})
|
|
|
|
|
|
-const bgInitialLeft = 0
|
|
|
|
|
|
+const bgInitialLeft = -30
|
|
const bgLeft = ref(bgInitialLeft)
|
|
const bgLeft = ref(bgInitialLeft)
|
|
|
|
+const bgSpeedFactor = 0.8 * 0.8 * 0.8 * 0.8
|
|
watch(translateLength, (v) => {
|
|
watch(translateLength, (v) => {
|
|
- bgLeft.value = bgInitialLeft - v
|
|
|
|
|
|
+ bgLeft.value = bgInitialLeft - v * bgSpeedFactor
|
|
}, {
|
|
}, {
|
|
immediate: true,
|
|
immediate: true,
|
|
})
|
|
})
|
|
@@ -349,7 +350,6 @@ watch(translateLength, (v) => {
|
|
|
|
|
|
const isShowOperationTip = ref(true)
|
|
const isShowOperationTip = ref(true)
|
|
const unwatch = watch(translateLength, (v) => {
|
|
const unwatch = watch(translateLength, (v) => {
|
|
- console.log(v)
|
|
|
|
isShowOperationTip.value = false
|
|
isShowOperationTip.value = false
|
|
unwatch()
|
|
unwatch()
|
|
// if (Math.abs(v - (scrollerEl.value.scrollHeight - scrollerEl.value.clientHeight)) <= 1) {
|
|
// if (Math.abs(v - (scrollerEl.value.scrollHeight - scrollerEl.value.clientHeight)) <= 1) {
|