no message

This commit is contained in:
kuaifan 2025-04-13 14:59:37 +08:00
parent add23934ca
commit 7c501cec45
3 changed files with 35 additions and 15 deletions

View File

@ -2365,6 +2365,10 @@ export default {
this.focusTimer && clearTimeout(this.focusTimer) this.focusTimer && clearTimeout(this.focusTimer)
this.focusLazy = true this.focusLazy = true
this.$emit("on-focus") this.$emit("on-focus")
//
this.$refs.footer?.scrollIntoView({
block: "end"
})
}, },
onEventBlur() { onEventBlur() {
@ -4398,10 +4402,7 @@ export default {
if (!this.$refs.input?.isFocus) { if (!this.$refs.input?.isFocus) {
return true; // return true; //
} }
this.$refs.footer?.scrollIntoView({ this.$store.dispatch("scrollBottom", this.$refs.footer)
block: 'end',
behavior: 'smooth'
})
}, 500) }, 500)
} }
} }

View File

@ -510,6 +510,7 @@
:maxlength="200000" :maxlength="200000"
:placeholder="$L('输入消息...')" :placeholder="$L('输入消息...')"
:send-menu="false" :send-menu="false"
@on-focus="onFocus"
@on-more="onEventMore" @on-more="onEventMore"
@on-file="onSelectFile" @on-file="onSelectFile"
@on-record="onRecord" @on-record="onRecord"
@ -746,7 +747,7 @@ export default {
mounted() { mounted() {
this.keepInterval = setInterval(() => { this.keepInterval = setInterval(() => {
this.keepUnix = $A.dayjs().unix(); this.keepUnix = $A.dayjs().unix();
this.keepIntoInput(500); this.keepIntoInput();
}, 1000); }, 1000);
// //
emitter.on('receiveTask', this.onReceiveShow); emitter.on('receiveTask', this.onReceiveShow);
@ -1130,10 +1131,6 @@ export default {
return; return;
} }
$A.setStorage('task.dialogWidth', w); $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) { onEventMore(e) {
if (['image', 'file'].includes(e)) { if (['image', 'file'].includes(e)) {
this.onUploadClick(false) this.onUploadClick(false)
@ -2147,7 +2150,7 @@ export default {
} }
}, },
keepIntoInput(delay) { keepIntoInput() {
if (!this.$isEEUiApp) { if (!this.$isEEUiApp) {
return return
} }
@ -2156,11 +2159,8 @@ export default {
if (!this.$refs.chatInput?.isFocus) { if (!this.$refs.chatInput?.isFocus) {
return true; // return true; //
} }
this.$refs.taskDialog?.scrollIntoView({ this.$store.dispatch("scrollBottom", this.$refs.taskDialog)
block: 'end', }, 500)
behavior: 'smooth'
})
}, delay)
} }
} }
} }

View File

@ -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'
});
},
/** *****************************************************************************************/ /** *****************************************************************************************/
/** *************************************** 新窗口打开 ****************************************/ /** *************************************** 新窗口打开 ****************************************/
/** *****************************************************************************************/ /** *****************************************************************************************/