|
|
@@ -149,11 +149,11 @@
|
|
|
<div style="height: 20px;"></div>
|
|
|
</el-scrollbar>
|
|
|
<!-- 加载最新消息按钮 -->
|
|
|
- <el-button
|
|
|
- v-if="showLoadLatestBtn"
|
|
|
- class="load-latest-btn"
|
|
|
- type="primary"
|
|
|
- size="small"
|
|
|
+ <el-button
|
|
|
+ v-if="showLoadLatestBtn"
|
|
|
+ class="load-latest-btn"
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
@click.stop="loadLatestMessages"
|
|
|
:disabled="isLoadingLatest"
|
|
|
:loading="isLoadingLatest"
|
|
|
@@ -474,7 +474,7 @@ export default {
|
|
|
const clientHeight = wrap.clientHeight;
|
|
|
const currentScrollTop = wrap.scrollTop;
|
|
|
const maxScrollTop = scrollHeight - clientHeight;
|
|
|
-
|
|
|
+
|
|
|
if (currentScrollTop < maxScrollTop - 50) {
|
|
|
this.showLoadLatestBtn = true;
|
|
|
}
|
|
|
@@ -487,17 +487,17 @@ export default {
|
|
|
if (!this.isAutoScrollEnabled && !forceScroll) {
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (this.$refs.manageRightRef && this.$refs.manageRightRef.wrap) {
|
|
|
this.$nextTick(() => {
|
|
|
const wrap = this.$refs.manageRightRef.wrap;
|
|
|
if (!wrap) return;
|
|
|
-
|
|
|
+
|
|
|
const scrollHeight = wrap.scrollHeight;
|
|
|
const clientHeight = wrap.clientHeight;
|
|
|
const currentScrollTop = wrap.scrollTop;
|
|
|
const maxScrollTop = scrollHeight - clientHeight;
|
|
|
-
|
|
|
+
|
|
|
// 强制滚动或启用自动滚动时,直接滚动到底部并隐藏按钮
|
|
|
if (forceScroll || this.isAutoScrollEnabled) {
|
|
|
this.showLoadLatestBtn = false;
|
|
|
@@ -811,7 +811,7 @@ export default {
|
|
|
}
|
|
|
if (res.data.liveType == 1) {
|
|
|
this.videoParam.livingUrl = res.data.flvHlsUrl
|
|
|
- this.videoParam.livingUrl = this.livingUrl.replace("flv","m3u8")
|
|
|
+ this.videoParam.livingUrl = this.videoParam.livingUrl.replace("flv","m3u8")
|
|
|
// this.$nextTick(() => {
|
|
|
// this.initPlayer()
|
|
|
// })
|
|
|
@@ -1191,7 +1191,7 @@ export default {
|
|
|
setTimeout(() => {
|
|
|
// 重置加载状态
|
|
|
this.isLoadingLatest = false;
|
|
|
-
|
|
|
+
|
|
|
if (this.isAutoScrollEnabled) {
|
|
|
// 如果启用自动滚动,强制滚动到底部并隐藏按钮
|
|
|
this.scrollToBottom(true);
|
|
|
@@ -1203,7 +1203,7 @@ export default {
|
|
|
const clientHeight = wrap.clientHeight;
|
|
|
const currentScrollTop = wrap.scrollTop;
|
|
|
const maxScrollTop = scrollHeight - clientHeight;
|
|
|
-
|
|
|
+
|
|
|
if (currentScrollTop < maxScrollTop - 50) {
|
|
|
this.showLoadLatestBtn = true;
|
|
|
} else {
|
|
|
@@ -1229,11 +1229,11 @@ export default {
|
|
|
if (this.scrollDebounceTimer) {
|
|
|
clearTimeout(this.scrollDebounceTimer);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 设置防抖,300ms内只执行一次
|
|
|
this.scrollDebounceTimer = setTimeout(() => {
|
|
|
this.saveChatScrollPosition();
|
|
|
-
|
|
|
+
|
|
|
// 检查是否滚动到底部
|
|
|
if (this.$refs.manageRightRef && this.$refs.manageRightRef.wrap) {
|
|
|
const wrap = this.$refs.manageRightRef.wrap;
|
|
|
@@ -1241,7 +1241,7 @@ export default {
|
|
|
const clientHeight = wrap.clientHeight;
|
|
|
const currentScrollTop = wrap.scrollTop;
|
|
|
const maxScrollTop = scrollHeight - clientHeight;
|
|
|
-
|
|
|
+
|
|
|
// 如果滚动到底部(距离底部小于50px),隐藏按钮并恢复自动滚动
|
|
|
if (currentScrollTop >= maxScrollTop - 50) {
|
|
|
this.showLoadLatestBtn = false;
|