no message

This commit is contained in:
kuaifan 2025-04-11 14:22:20 +08:00
parent 3cb9fff07f
commit 1175b330f5
6 changed files with 27 additions and 27 deletions

View File

@ -491,7 +491,6 @@ export default {
},
],
viewportHeight: 0,
iOSDevices: $A.isIos(),
};
},
@ -501,10 +500,6 @@ export default {
mounted() {
this.init();
//
if (window.visualViewport) {
window.visualViewport.addEventListener('resize', this.visualViewportResize);
}
//
this.recordInter = setInterval(_ => {
if (this.recordState === 'ing') {
//
@ -544,9 +539,6 @@ export default {
if (this.recordInter) {
clearInterval(this.recordInter)
}
if (window.visualViewport) {
window.visualViewport.removeEventListener('resize', this.visualViewportResize);
}
},
computed: {
...mapState([
@ -563,6 +555,7 @@ export default {
'keyboardHeight',
'isModKey',
'safeAreaSize',
'viewportHeight',
]),
...mapGetters(['getDialogDraft', 'getDialogQuote']),
@ -2317,10 +2310,6 @@ export default {
mention.setMentionContainerPosition()
}
},
visualViewportResize() {
this.viewportHeight = window.visualViewport?.height || 0;
},
}
}
</script>

View File

@ -695,6 +695,7 @@ export default {
type: Boolean,
default: false
},
// 使
location: {
type: String,
default: ""
@ -877,8 +878,9 @@ export default {
'readLoadNum',
'readTimeout',
'formOptions',
'cacheTranslationLanguage',
'longpressData',
'cacheTranslationLanguage'
'viewportHeight',
]),
...mapGetters(['isLoad', 'isMessengerPage', 'getDialogQuote']),
@ -1411,6 +1413,19 @@ export default {
return
}
document.getSelection().removeAllRanges();
},
viewportHeight() {
if (this.location !== 'modal' || !this.$isEEUiApp) {
return
}
this.tempRepeat && this.tempRepeat()
this.tempRepeat = $A.repeatWithCount(() => {
this.$refs.footer?.scrollIntoView({
block: 'end',
behavior: 'smooth'
})
}, 500, 500, 3)
}
},
@ -2359,23 +2374,11 @@ export default {
this.focusTimer && clearTimeout(this.focusTimer)
this.focusLazy = true
this.$emit("on-focus")
//
if ($A.isIos()) {
this.tempRepeat && this.tempRepeat()
this.tempRepeat = $A.repeatWithCount(() => {
this.$refs.footer?.scrollIntoView({
block: 'end',
behavior: 'smooth'
})
}, 500, 500, 3)
}
},
onEventBlur() {
this.focusTimer = setTimeout(_ => this.focusLazy = false, 10)
this.$emit("on-blur")
//
this.tempRepeat && this.tempRepeat()
},
onEventMore(e) {

View File

@ -1,7 +1,7 @@
<template>
<div class="electron-dialog">
<PageTitle :title="dialogData.name"/>
<DialogWrapper v-if="dialogId > 0" :dialogId="dialogId" location="modal"/>
<DialogWrapper v-if="dialogId > 0" :dialogId="dialogId"/>
</div>
</template>

View File

@ -59,6 +59,10 @@ export default {
$A("body").removeClass("fullscreen-mode")
}
});
window.visualViewport?.addEventListener('resize', () => {
state.viewportHeight = window.visualViewport?.height || 0;
});
},
/**

View File

@ -18,6 +18,9 @@ export default {
// 安全区域尺寸(顶部状态栏、底部导航栏)
safeAreaSize: {top: 0, bottom: 0, data: null},
// 浏览器可视区域高度
viewportHeight: 0,
// 浏览器支持触摸事件
windowTouch: "ontouchend" in document,

View File

@ -911,6 +911,7 @@
cursor: pointer;
max-width: 100%;
max-height: 220px;
border-radius: 6px;
vertical-align: bottom;
&.emoticon {
@ -1035,12 +1036,12 @@
display: flex;
max-width: 220px;
max-height: 220px;
border-radius: 6px;
overflow: hidden;
.file-img {
display: flex;
cursor: pointer;
border-radius: 6px;
}
}
}