mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 19:35:50 +00:00
no message
This commit is contained in:
parent
4b39f13fa9
commit
b4b268a4d7
@ -1502,3 +1502,7 @@ License Key
|
|||||||
你确定取消置顶吗?
|
你确定取消置顶吗?
|
||||||
|
|
||||||
打包下载(*)
|
打包下载(*)
|
||||||
|
|
||||||
|
数据已超过(*)条,是否继续加载?
|
||||||
|
版本过低
|
||||||
|
服务器接口版本过低,部分功能可能无法正常使用。
|
||||||
|
|||||||
@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
4
resources/assets/js/store/actions.js
vendored
4
resources/assets/js/store/actions.js
vendored
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user