no message

This commit is contained in:
Pang 2024-01-09 07:54:12 +08:00
parent 8080d0bb4e
commit 2860c4cbe6
2 changed files with 24 additions and 25 deletions

View File

@ -160,7 +160,9 @@
</div> </div>
</div> </div>
<!--跳转提示--> <!--消息部分-->
<div ref="msgs" class="dialog-msgs">
<!--定位提示-->
<div v-if="positionShow && positionMsg" class="dialog-position"> <div v-if="positionShow && positionMsg" class="dialog-position">
<div class="position-label" @click="onPositionMark(positionMsg.msg_id)"> <div class="position-label" @click="onPositionMark(positionMsg.msg_id)">
<Icon v-if="positionLoad > 0" type="ios-loading" class="icon-loading"></Icon> <Icon v-if="positionLoad > 0" type="ios-loading" class="icon-loading"></Icon>
@ -170,7 +172,6 @@
</div> </div>
<!--消息列表--> <!--消息列表-->
<div ref="msgs" class="dialog-msgs">
<VirtualList <VirtualList
ref="scroller" ref="scroller"
class="dialog-scroller scrollbar-virtual" class="dialog-scroller scrollbar-virtual"
@ -765,7 +766,7 @@ export default {
observers: [], observers: [],
unreadMsgId: 0, // id unreadMsgId: 0, // id
topPosLoad: false, // topPosLoad: false, //
positionLoad: 0, // positionLoad: 0, //
positionShow: false, // positionShow: false, //
renderMsgNum: 0, // renderMsgNum: 0, //
@ -2124,7 +2125,10 @@ export default {
if (scroller) { if (scroller) {
scroller.stopToBottom(); scroller.stopToBottom();
scroller.scrollToOffset(offset); scroller.scrollToOffset(offset);
setTimeout(_ => scroller.scrollToOffset(offset), 10) // setTimeout(_ => {
scroller.scrollToOffset(offset)
scroller.virtual.handleFront()
}, 10) //
} }
}, },
@ -2223,7 +2227,6 @@ export default {
offset -= 36 offset -= 36
} }
this.onToOffset(offset) this.onToOffset(offset)
setTimeout(_ => scroller.virtual.handleFront(), 10)
}); });
}).catch(() => {}) }).catch(() => {})
}, },

View File

@ -518,12 +518,16 @@
} }
} }
.dialog-position { .dialog-msgs {
flex: 1;
position: relative; position: relative;
}
.dialog-position {
position: absolute;
top: 24px;
right: 0;
z-index: 2; z-index: 2;
height: 1px; // 不加高度iOS动画无效果
margin-bottom: -1px;
width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
@ -533,9 +537,6 @@
animation-delay: 300ms; animation-delay: 300ms;
.position-label { .position-label {
position: absolute;
top: 24px;
right: 0;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -554,11 +555,6 @@
} }
} }
.dialog-msgs {
flex: 1;
position: relative;
}
.dialog-scroller { .dialog-scroller {
position: absolute; position: absolute;
top: 0; top: 0;