mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-15 05:12:49 +00:00
no message
This commit is contained in:
parent
add23934ca
commit
7c501cec45
@ -2365,6 +2365,10 @@ export default {
|
||||
this.focusTimer && clearTimeout(this.focusTimer)
|
||||
this.focusLazy = true
|
||||
this.$emit("on-focus")
|
||||
//
|
||||
this.$refs.footer?.scrollIntoView({
|
||||
block: "end"
|
||||
})
|
||||
},
|
||||
|
||||
onEventBlur() {
|
||||
@ -4398,10 +4402,7 @@ export default {
|
||||
if (!this.$refs.input?.isFocus) {
|
||||
return true; // 输入框未聚焦
|
||||
}
|
||||
this.$refs.footer?.scrollIntoView({
|
||||
block: 'end',
|
||||
behavior: 'smooth'
|
||||
})
|
||||
this.$store.dispatch("scrollBottom", this.$refs.footer)
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
|
||||
@ -510,6 +510,7 @@
|
||||
:maxlength="200000"
|
||||
:placeholder="$L('输入消息...')"
|
||||
:send-menu="false"
|
||||
@on-focus="onFocus"
|
||||
@on-more="onEventMore"
|
||||
@on-file="onSelectFile"
|
||||
@on-record="onRecord"
|
||||
@ -746,7 +747,7 @@ export default {
|
||||
mounted() {
|
||||
this.keepInterval = setInterval(() => {
|
||||
this.keepUnix = $A.dayjs().unix();
|
||||
this.keepIntoInput(500);
|
||||
this.keepIntoInput();
|
||||
}, 1000);
|
||||
//
|
||||
emitter.on('receiveTask', this.onReceiveShow);
|
||||
@ -1130,10 +1131,6 @@ export default {
|
||||
return;
|
||||
}
|
||||
$A.setStorage('task.dialogWidth', w);
|
||||
},
|
||||
|
||||
taskContent(v) {
|
||||
v && this.keepIntoInput(10)
|
||||
}
|
||||
},
|
||||
|
||||
@ -1655,6 +1652,12 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
onFocus() {
|
||||
this.$refs.taskDialog?.scrollIntoView({
|
||||
block: "end"
|
||||
})
|
||||
},
|
||||
|
||||
onEventMore(e) {
|
||||
if (['image', 'file'].includes(e)) {
|
||||
this.onUploadClick(false)
|
||||
@ -2147,7 +2150,7 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
keepIntoInput(delay) {
|
||||
keepIntoInput() {
|
||||
if (!this.$isEEUiApp) {
|
||||
return
|
||||
}
|
||||
@ -2156,11 +2159,8 @@ export default {
|
||||
if (!this.$refs.chatInput?.isFocus) {
|
||||
return true; // 输入框未聚焦
|
||||
}
|
||||
this.$refs.taskDialog?.scrollIntoView({
|
||||
block: 'end',
|
||||
behavior: 'smooth'
|
||||
})
|
||||
}, delay)
|
||||
this.$store.dispatch("scrollBottom", this.$refs.taskDialog)
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
19
resources/assets/js/store/actions.js
vendored
19
resources/assets/js/store/actions.js
vendored
@ -1163,6 +1163,25 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 滚动到底部(将 el 底部对齐到网页底部)
|
||||
* @param state
|
||||
* @param el
|
||||
*/
|
||||
scrollBottom({state}, el) {
|
||||
if (!el) {
|
||||
return
|
||||
}
|
||||
const rect = el.getBoundingClientRect();
|
||||
if (!rect) {
|
||||
return;
|
||||
}
|
||||
window.scrollTo({
|
||||
top: rect.bottom + state.safeAreaSize.bottom,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
},
|
||||
|
||||
/** *****************************************************************************************/
|
||||
/** *************************************** 新窗口打开 ****************************************/
|
||||
/** *****************************************************************************************/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user