no message

This commit is contained in:
Pang 2024-01-05 06:55:15 +08:00
parent 4b39f13fa9
commit b4b268a4d7
3 changed files with 25 additions and 11 deletions

View File

@ -1502,3 +1502,7 @@ License Key
你确定取消置顶吗? 你确定取消置顶吗?
打包下载(*) 打包下载(*)
数据已超过(*)条,是否继续加载?
版本过低
服务器接口版本过低,部分功能可能无法正常使用。

View File

@ -757,7 +757,6 @@ export default {
unreadMsgId: 0, // id unreadMsgId: 0, // id
positionLoad: 0, // positionLoad: 0, //
positionShow: false, // positionShow: false, //
renderMsgOffset: 0, //
renderMsgLength: 0, // renderMsgLength: 0, //
msgPreparedStatus: false, // msgPreparedStatus: false, //
listPreparedStatus: false, // listPreparedStatus: false, //
@ -1150,10 +1149,7 @@ export default {
dialog_id, dialog_id,
msg_id: this.msgId, msg_id: this.msgId,
msg_type: this.msgType, msg_type: this.msgType,
save_before: _ => { save_before: _ => this.onMarkOffset(false)
const {tail} = this.scrollInfo();
this.renderMsgOffset = tail > 55 ? (this.$refs.scroller.getScrollSize() - this.$refs.scroller.getOffset()) : 0
}
}).then(_ => { }).then(_ => {
this.openId = dialog_id this.openId = dialog_id
this.listPreparedStatus = true this.listPreparedStatus = true
@ -2144,6 +2140,23 @@ export default {
} }
}, },
onMarkOffset(recovery = false) {
const scroller = this.$refs.scroller
if (!scroller) {
return false
}
if (recovery) {
if (this.__markOffset === undefined) {
return false
}
this.onToOffset(scroller.getScrollSize() - this.__markOffset)
this.__markOffset = undefined
} else {
this.__markOffset = scroller.getScrollSize() - scroller.getOffset()
}
return true
},
scrollInfo() { scrollInfo() {
const scroller = this.$refs.scroller; const scroller = this.$refs.scroller;
if (scroller) { if (scroller) {
@ -2234,10 +2247,7 @@ export default {
if (this.renderMsgLength > 0 && this.$refs.scroller.getSizes() >= this.renderMsgLength) { if (this.renderMsgLength > 0 && this.$refs.scroller.getSizes() >= this.renderMsgLength) {
this.renderMsgLength = 0 this.renderMsgLength = 0
this.onFooterResize() this.onFooterResize()
if (this.renderMsgOffset > 0) { if (!this.onMarkOffset(true)) {
this.onToOffset(this.$refs.scroller.getScrollSize() - this.renderMsgOffset)
this.renderMsgOffset = 0
} else {
this.onToBottom() this.onToBottom()
} }
} }

View File

@ -1586,8 +1586,8 @@ export default {
// //
if (data.next_page_url) { if (data.next_page_url) {
requestData.page = data.current_page + 1 requestData.page = data.current_page + 1
if (data.current_page % 20 === 0) { if (data.current_page % 30 === 0) {
$A.modalWarning({ $A.modalConfirm({
content: "数据已超过" + data.to + "条,是否继续加载?", content: "数据已超过" + data.to + "条,是否继续加载?",
onOk: () => { onOk: () => {
dispatch("getTasks", requestData).then(resolve).catch(reject) dispatch("getTasks", requestData).then(resolve).catch(reject)