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.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)
}
}

View File

@ -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)
}
}
}

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