fix: 部分机型首次打开聊天窗口不显示聊天记录的问题

This commit is contained in:
kuaifan 2024-01-15 21:05:40 +08:00
parent c676a3037c
commit d4ee87f324

View File

@ -482,7 +482,6 @@
</template> </template>
</Modal> </Modal>
<!-- 设置待办 --> <!-- 设置待办 -->
<Modal <Modal
v-model="todoSettingShow" v-model="todoSettingShow"
@ -673,7 +672,6 @@ export default {
msgActivity: false, // msgActivity: false, //
msgPrepared: false, // msgPrepared: false, //
focusLazy: false, focusLazy: false,
focusTimer: null, focusTimer: null,
@ -1338,7 +1336,7 @@ export default {
} }
const historyLength = this.allMsgs.length const historyLength = this.allMsgs.length
const historyLastId = historyLength > 0 ? this.allMsgs[historyLength - 1].id : 0 const historyLastId = historyLength > 0 ? this.allMsgs[historyLength - 1].id : 0
if ($A.isIos() && list.length !== historyLength) { if ($A.isIos() && list.length !== historyLength && this.$refs.scroller) {
// iOS // iOS
const scrollEl = this.$refs.scroller.$el const scrollEl = this.$refs.scroller.$el
scrollEl.style.visibility = 'hidden' scrollEl.style.visibility = 'hidden'
@ -1355,7 +1353,6 @@ export default {
} }
}, },
'allMsgs.length' () { 'allMsgs.length' () {
if (this.stickToBottom) { if (this.stickToBottom) {
this.onToBottom() this.onToBottom()