mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-11 18:42:54 +00:00
no message
This commit is contained in:
parent
3cb9fff07f
commit
1175b330f5
@ -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>
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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>
|
||||
|
||||
|
||||
4
resources/assets/js/store/actions.js
vendored
4
resources/assets/js/store/actions.js
vendored
@ -59,6 +59,10 @@ export default {
|
||||
$A("body").removeClass("fullscreen-mode")
|
||||
}
|
||||
});
|
||||
|
||||
window.visualViewport?.addEventListener('resize', () => {
|
||||
state.viewportHeight = window.visualViewport?.height || 0;
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
3
resources/assets/js/store/state.js
vendored
3
resources/assets/js/store/state.js
vendored
@ -18,6 +18,9 @@ export default {
|
||||
// 安全区域尺寸(顶部状态栏、底部导航栏)
|
||||
safeAreaSize: {top: 0, bottom: 0, data: null},
|
||||
|
||||
// 浏览器可视区域高度
|
||||
viewportHeight: 0,
|
||||
|
||||
// 浏览器支持触摸事件
|
||||
windowTouch: "ontouchend" in document,
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user