Selaa lähdekoodia

优化一些有的没的

任一存 1 vuosi sitten
vanhempi
commit
47dae6995f

BIN
src/assets/images/fade-chapter-wood/bg-more-content.jpg


+ 3 - 3
src/views/MoreContent.vue

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