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
positionLoad: 0, //
positionShow: false, //
renderMsgOffset: 0, //
renderMsgLength: 0, //
msgPreparedStatus: false, //
listPreparedStatus: false, //
@ -1150,10 +1149,7 @@ export default {
dialog_id,
msg_id: this.msgId,
msg_type: this.msgType,
save_before: _ => {
const {tail} = this.scrollInfo();
this.renderMsgOffset = tail > 55 ? (this.$refs.scroller.getScrollSize() - this.$refs.scroller.getOffset()) : 0
}
save_before: _ => this.onMarkOffset(false)
}).then(_ => {
this.openId = dialog_id
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() {
const scroller = this.$refs.scroller;
if (scroller) {
@ -2234,10 +2247,7 @@ export default {
if (this.renderMsgLength > 0 && this.$refs.scroller.getSizes() >= this.renderMsgLength) {
this.renderMsgLength = 0
this.onFooterResize()
if (this.renderMsgOffset > 0) {
this.onToOffset(this.$refs.scroller.getScrollSize() - this.renderMsgOffset)
this.renderMsgOffset = 0
} else {
if (!this.onMarkOffset(true)) {
this.onToBottom()
}
}

View File

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