|
@@ -24,7 +24,7 @@
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<!-- 内容头图区域 -->
|
|
<!-- 内容头图区域 -->
|
|
- <view class="topUser">
|
|
|
|
|
|
+ <view class="topUser" ref="ImageBox">
|
|
<image :src="home_image" class="home_image" mode="aspectFill"></image>
|
|
<image :src="home_image" class="home_image" mode="aspectFill"></image>
|
|
|
|
|
|
<!-- 图片指示器 -->
|
|
<!-- 图片指示器 -->
|
|
@@ -239,6 +239,9 @@
|
|
this.audioPlayer.stop();
|
|
this.audioPlayer.stop();
|
|
this.audioPlayer.destroy();
|
|
this.audioPlayer.destroy();
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 返回上一页
|
|
// 返回上一页
|
|
@@ -655,12 +658,13 @@
|
|
const newOffsetY = this.initialOffsetY + deltaY;
|
|
const newOffsetY = this.initialOffsetY + deltaY;
|
|
|
|
|
|
// Get the height of the lyrics text
|
|
// Get the height of the lyrics text
|
|
- const lyricsTextHeight = this.$refs.lyricsText ? this.$refs.lyricsText.clientHeight : 0;
|
|
|
|
|
|
+ const lyricsTextHeight = this.$refs.lyricsText ? this.$refs.lyricsText.$el.clientHeight : 0;
|
|
|
|
+ const imageBoxHeight = this.$refs.ImageBox ? this.$refs.ImageBox.$el.clientHeight : 0;
|
|
|
|
|
|
|
|
|
|
// Define the threshold limits based on the height of the lyrics text
|
|
// Define the threshold limits based on the height of the lyrics text
|
|
- const minY = -lyricsTextHeight + 20; // Allow some space above
|
|
|
|
- const maxY = 20; // Allow some space below
|
|
|
|
|
|
+ const minY = -lyricsTextHeight + 50 + imageBoxHeight; // Allow some space above
|
|
|
|
+ const maxY = lyricsTextHeight/2; // Allow some space below
|
|
|
|
|
|
// Apply the limits
|
|
// Apply the limits
|
|
this.offsetY = Math.min(Math.max(newOffsetY, minY), maxY);
|
|
this.offsetY = Math.min(Math.max(newOffsetY, minY), maxY);
|
|
@@ -668,6 +672,7 @@
|
|
// Log the height and current offset
|
|
// Log the height and current offset
|
|
console.log('Lyrics Text Height:', lyricsTextHeight);
|
|
console.log('Lyrics Text Height:', lyricsTextHeight);
|
|
console.log('Current Offset Y:', this.offsetY);
|
|
console.log('Current Offset Y:', this.offsetY);
|
|
|
|
+ console.log(this);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|