diff --git a/resources/assets/js/components/UserSelect.vue b/resources/assets/js/components/UserSelect.vue index bc69e7b01..61e354d3a 100755 --- a/resources/assets/js/components/UserSelect.vue +++ b/resources/assets/js/components/UserSelect.vue @@ -334,7 +334,8 @@ export default { this.searchKey = "" } this.$emit("on-show-change", v) - $A.eeuiAppSetScrollDisabled(v) + // + $A.eeuiAppSetScrollDisabled(v && this.windowPortrait) }, searchKey() { diff --git a/resources/assets/js/pages/login.vue b/resources/assets/js/pages/login.vue index c6ec3f273..a668b8073 100644 --- a/resources/assets/js/pages/login.vue +++ b/resources/assets/js/pages/login.vue @@ -414,6 +414,9 @@ export default { } let value = $A.rightDelete(this.cacheServerUrl, "/api/"); value = $A.leftDelete(value, "http://"); + if (!value && /^https?:/.test(window.location.protocol)) { + value = window.location.host + } $A.modalInput({ title: "使用 SSO 登录", value, diff --git a/resources/assets/js/pages/manage/components/DialogModal.vue b/resources/assets/js/pages/manage/components/DialogModal.vue index 87f0dc664..5ee91c34b 100644 --- a/resources/assets/js/pages/manage/components/DialogModal.vue +++ b/resources/assets/js/pages/manage/components/DialogModal.vue @@ -89,7 +89,7 @@ export default { }, show(v) { - $A.eeuiAppSetScrollDisabled(v) + $A.eeuiAppSetScrollDisabled(v && this.windowPortrait) } }, diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue index aaf45bfe1..bc57cd30f 100644 --- a/resources/assets/js/pages/manage/components/DialogWrapper.vue +++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue @@ -722,6 +722,9 @@ export default { focusLazy: false, focusTimer: null, + keepInterval: null, + keepIntoTimer: null, + allMsgs: [], tempMsgs: [], tempId: $A.randNum(1000000000, 9999999999), @@ -833,11 +836,13 @@ export default { mounted() { emitter.on('websocketMsg', this.onWebsocketMsg); emitter.on('dialogMsgChange', this.onMsgChange); + this.keepInterval = setInterval(this.keepIntoInput, 1000) this.windowTouch && document.addEventListener('selectionchange', this.onSelectionchange); }, beforeDestroy() { this.windowTouch && document.removeEventListener('selectionchange', this.onSelectionchange); + clearInterval(this.keepInterval); emitter.off('dialogMsgChange', this.onMsgChange); emitter.off('websocketMsg', this.onWebsocketMsg); this.generateUnreadData(this.dialogId) @@ -879,7 +884,6 @@ export default { 'formOptions', 'cacheTranslationLanguage', 'longpressData', - 'viewportHeight', 'keyboardShow', 'keyboardHeight', ]), @@ -1414,22 +1418,6 @@ export default { } document.getSelection().removeAllRanges(); }, - - viewportHeight() { - if (this.location !== 'modal' || !this.$isEEUiApp) { - return - } - if (this.viewportTimer) { - this.viewportTimer() - this.viewportTimer = null - } - this.viewportTimer = $A.repeatWithCount(() => { - this.$refs.footer?.scrollIntoView({ - block: 'end', - behavior: 'smooth' - }) - }, 500, 500, 2) - } }, methods: { @@ -4391,6 +4379,25 @@ export default { } catch (e) { // console.log(e) } + }, + + keepIntoInput() { + if (!this.$isEEUiApp) { + return + } + this.keepIntoTimer && clearTimeout(this.keepIntoTimer) + this.keepIntoTimer = setTimeout(_ => { + if (!this.keyboardShow) { + return true; // 键盘未弹出 + } + if (!this.$refs.input?.isFocus) { + return true; // 输入框未聚焦 + } + this.$refs.footer?.scrollIntoView({ + block: 'end', + behavior: 'smooth' + }) + }, 500) } } } diff --git a/resources/assets/js/pages/manage/components/TaskDetail.vue b/resources/assets/js/pages/manage/components/TaskDetail.vue index 4bd28b986..9c2a40899 100755 --- a/resources/assets/js/pages/manage/components/TaskDetail.vue +++ b/resources/assets/js/pages/manage/components/TaskDetail.vue @@ -431,7 +431,11 @@ -
+