mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-15 21:32: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.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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
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