diff --git a/resources/assets/js/App.vue b/resources/assets/js/App.vue index e89f8bef2..bc441dcc0 100755 --- a/resources/assets/js/App.vue +++ b/resources/assets/js/App.vue @@ -151,10 +151,10 @@ export default { }, windowSizeListener() { - this.$store.state.windowWidth = window.innerWidth - this.$store.state.windowHeight = window.innerHeight - this.$store.state.windowLarge = window.innerWidth > 768 - this.$store.state.windowSmall = window.innerWidth <= 768 + this.$store.state.windowWidth = window.outerWidth + this.$store.state.windowHeight = window.outerHeight + this.$store.state.windowLarge = window.outerWidth > 768 + this.$store.state.windowSmall = window.outerWidth <= 768 }, windowScrollListener() { diff --git a/resources/assets/js/components/DragBallComponent.vue b/resources/assets/js/components/DragBallComponent.vue index fe4aab72f..796fc5c61 100644 --- a/resources/assets/js/components/DragBallComponent.vue +++ b/resources/assets/js/components/DragBallComponent.vue @@ -182,13 +182,13 @@ export default { let top = e.clientY - this.record.y; if (left < 0) { left = 0 - } else if (left > (window.innerWidth - this.floatDrag.offsetWidth)) { - left = window.innerWidth - this.floatDrag.offsetWidth + } else if (left > (window.outerWidth - this.floatDrag.offsetWidth)) { + left = window.outerWidth - this.floatDrag.offsetWidth } if (top < 0) { top = 0 - } else if (top > (window.innerHeight - this.floatDrag.offsetHeight)) { - top = window.innerHeight - this.floatDrag.offsetHeight + } else if (top > (window.outerHeight - this.floatDrag.offsetHeight)) { + top = window.outerHeight - this.floatDrag.offsetHeight } this.left = left; this.top = top; @@ -219,13 +219,13 @@ export default { let top = touch.clientY - this.floatDrag.offsetHeight / 2; if (left < 0) { left = 0 - } else if (left > (window.innerWidth - this.floatDrag.offsetWidth)) { - left = window.innerWidth - this.floatDrag.offsetWidth + } else if (left > (window.outerWidth - this.floatDrag.offsetWidth)) { + left = window.outerWidth - this.floatDrag.offsetWidth } if (top < 0) { top = 0 - } else if (top > (window.innerHeight - this.floatDrag.offsetHeight)) { - top = window.innerHeight - this.floatDrag.offsetHeight + } else if (top > (window.outerHeight - this.floatDrag.offsetHeight)) { + top = window.outerHeight - this.floatDrag.offsetHeight } this.left = left; this.top = top; diff --git a/resources/assets/js/components/MDEditor/assets/js/codemirror/index.js b/resources/assets/js/components/MDEditor/assets/js/codemirror/index.js index 0d5ec3ce4..65a5d08a3 100644 --- a/resources/assets/js/components/MDEditor/assets/js/codemirror/index.js +++ b/resources/assets/js/components/MDEditor/assets/js/codemirror/index.js @@ -4317,7 +4317,7 @@ function maybeScrollWindow(cm, rect) { var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null; if (rect.top + box.top < 0) { doScroll = true; - } else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { + } else if (rect.bottom + box.top > (window.outerHeight || document.documentElement.clientHeight)) { doScroll = false; } if (doScroll != null && !phantom) { @@ -11172,7 +11172,7 @@ function findPosH(doc, pos, dir, unit, visually) { function findPosV(cm, pos, dir, unit) { var doc = cm.doc, x = pos.left, y; if (unit == "page") { - var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight); + var pageSize = Math.min(cm.display.wrapper.clientHeight, window.outerHeight || document.documentElement.clientHeight); var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3); y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount; diff --git a/resources/assets/js/components/PageLoading.vue b/resources/assets/js/components/PageLoading.vue new file mode 100644 index 000000000..bf7ea7c69 --- /dev/null +++ b/resources/assets/js/components/PageLoading.vue @@ -0,0 +1,20 @@ + + + diff --git a/resources/assets/js/pages/manage.vue b/resources/assets/js/pages/manage.vue index d078a841a..cf0bf31c8 100644 --- a/resources/assets/js/pages/manage.vue +++ b/resources/assets/js/pages/manage.vue @@ -236,20 +236,7 @@ -
-
-
-
PAGE LOADING
- - - - - - - -
-
-
+ + + +
@@ -301,6 +304,12 @@ export default { array.push('record-progress'); } } + if (this.showMore) { + array.push('show-more'); + } + if (this.showEmoji) { + array.push('show-emoji'); + } if (this.mentionMode) { array.push(this.mentionMode); } @@ -396,7 +405,7 @@ export default { } else if (this.windowSmall) { this.timerScroll = setInterval(() => { if (this.quill?.hasFocus()) { - $A.scrollIntoViewIfNeeded(this.$refs.editor); + this.windowScrollY > 0 && $A.scrollIntoViewIfNeeded(this.$refs.editor); } else { clearInterval(this.timerScroll); } @@ -759,6 +768,13 @@ export default { this.showMore = false; }, + onClickCover() { + this.hidePopover(); + this.$nextTick(_ => { + this.quill?.focus() + }) + }, + uploadRecord(duration) { if (this.recordBlob === null) { return; diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue index a92bc5d0b..42a39ad53 100644 --- a/resources/assets/js/pages/manage/components/DialogWrapper.vue +++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue @@ -674,12 +674,17 @@ export default { onTouchstart(e) { this.wrapperStart = Object.assign(this.scrollInfo(), { - clientY: e.touches[0].clientY + clientY: e.touches[0].clientY, + exclud: !this.$refs.scroller.$el.contains(e.target), }); }, onTouchmove(e) { if (this.windowSmall && this.windowScrollY > 0) { + if (this.wrapperStart.exclud) { + e.preventDefault(); + return; + } if (this.wrapperStart.clientY > e.touches[0].clientY) { // 向上滑动 if (this.wrapperStart.scrollE === 0) { diff --git a/resources/assets/js/pages/manage/components/TaskDetail.vue b/resources/assets/js/pages/manage/components/TaskDetail.vue index be4d0f89b..f47385dd9 100644 --- a/resources/assets/js/pages/manage/components/TaskDetail.vue +++ b/resources/assets/js/pages/manage/components/TaskDetail.vue @@ -1234,8 +1234,8 @@ export default { resizeDialog() { return new Promise(resolve => { this.$Electron.sendSyncMessage('windowSize', { - width: Math.max(1100, window.innerWidth), - height: Math.max(720, window.innerHeight), + width: Math.max(1100, window.outerWidth), + height: Math.max(720, window.outerHeight), minWidth: 800, minHeight: 600, autoZoom: true, diff --git a/resources/assets/js/pages/manage/file.vue b/resources/assets/js/pages/manage/file.vue index 49f0b7994..6a76a90b7 100644 --- a/resources/assets/js/pages/manage/file.vue +++ b/resources/assets/js/pages/manage/file.vue @@ -68,11 +68,11 @@ @dragover.prevent="fileDragOver(true, $event)" @dragleave.prevent="fileDragOver(false, $event)"> -
+
768, // 大窗口 - windowSmall: window.innerWidth <= 768, // 小窗口 + windowLarge: window.outerWidth > 768, // 大窗口 + windowSmall: window.outerWidth <= 768, // 小窗口 // 播放中的音频地址 audioPlaying: null, diff --git a/resources/assets/sass/pages/components/chat-input.scss b/resources/assets/sass/pages/components/chat-input.scss index 5fa399d4e..5c5035a44 100755 --- a/resources/assets/sass/pages/components/chat-input.scss +++ b/resources/assets/sass/pages/components/chat-input.scss @@ -42,6 +42,15 @@ } } + &.show-more, + &.show-emoji { + .chat-input-wrapper { + .chat-cover { + display: block; + } + } + } + .chat-input-wrapper { position: relative; display: inline-block; @@ -201,6 +210,16 @@ } } } + + .chat-cover { + display: none; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 4; + } } .chat-emoji-wrapper {