mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-12 08:58:11 +00:00
no message
This commit is contained in:
parent
902c0262f2
commit
4bc05e258d
@ -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() {
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
20
resources/assets/js/components/PageLoading.vue
Normal file
20
resources/assets/js/components/PageLoading.vue
Normal file
@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<div class="app-view-loading">
|
||||
<div>
|
||||
<div>PAGE LOADING</div>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'PageLoading',
|
||||
}
|
||||
</script>
|
||||
@ -236,20 +236,7 @@
|
||||
</div>
|
||||
|
||||
<!--等待覆盖层-->
|
||||
<div v-if="userLoad" class="manage-box-load">
|
||||
<div class="app-view-loading">
|
||||
<div>
|
||||
<div>PAGE LOADING</div>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<PageLoading v-if="userLoad" class="manage-box-load"/>
|
||||
|
||||
<!--新建项目-->
|
||||
<Modal
|
||||
@ -391,9 +378,11 @@ import DialogModal from "./manage/components/DialogModal";
|
||||
import TaskModal from "./manage/components/TaskModal";
|
||||
import notificationKoro from "notification-koro1";
|
||||
import {Store} from "le5le-store";
|
||||
import PageLoading from "../components/PageLoading";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
PageLoading,
|
||||
TaskModal,
|
||||
DialogModal,
|
||||
MeetingManager,
|
||||
|
||||
@ -90,6 +90,9 @@
|
||||
<div ref="recwave"></div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- 覆盖层 -->
|
||||
<div class="chat-cover" @click.stop="onClickCover"></div>
|
||||
</div>
|
||||
|
||||
<!-- 移动端表情(底部) -->
|
||||
@ -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;
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -68,11 +68,11 @@
|
||||
@dragover.prevent="fileDragOver(true, $event)"
|
||||
@dragleave.prevent="fileDragOver(false, $event)">
|
||||
<template v-if="tableMode === 'block'">
|
||||
<div v-if="fileList.length == 0 && loadIng == 0" class="file-no" @contextmenu.prevent="handleRightClick">
|
||||
<div v-if="fileList.length == 0 && loadIng == 0" class="file-no" @contextmenu.prevent="handleContextmenu">
|
||||
<i class="taskfont"></i>
|
||||
<p>{{$L('没有任何文件')}}</p>
|
||||
</div>
|
||||
<div v-else class="file-list" @contextmenu.prevent="handleRightClick">
|
||||
<div v-else class="file-list" @contextmenu.prevent="handleContextmenu">
|
||||
<ul>
|
||||
<li
|
||||
v-for="item in fileList"
|
||||
@ -120,7 +120,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
<div v-else class="file-table" @contextmenu.prevent="handleRightClick">
|
||||
<div v-else class="file-table" @contextmenu.prevent="handleContextmenu">
|
||||
<Table
|
||||
:columns="columns"
|
||||
:data="fileList"
|
||||
@ -910,6 +910,12 @@ export default {
|
||||
this.handleRightClick(event, fileItem)
|
||||
},
|
||||
|
||||
handleContextmenu(event) {
|
||||
if (this.windowLarge) {
|
||||
this.handleRightClick(event)
|
||||
}
|
||||
},
|
||||
|
||||
handleRightClick(event, item, isAddButton) {
|
||||
this.contextMenuItem = $A.isJson(item) ? item : {};
|
||||
if (this.contextMenuVisible) {
|
||||
|
||||
8
resources/assets/js/store/state.js
vendored
8
resources/assets/js/store/state.js
vendored
@ -1,12 +1,12 @@
|
||||
const stateData = {
|
||||
// 浏览器尺寸信息
|
||||
windowWidth: window.innerWidth,
|
||||
windowHeight: window.innerHeight,
|
||||
windowWidth: window.outerWidth,
|
||||
windowHeight: window.outerHeight,
|
||||
windowScrollY: 0,
|
||||
|
||||
// 浏览器窗口类型
|
||||
windowLarge: window.innerWidth > 768, // 大窗口
|
||||
windowSmall: window.innerWidth <= 768, // 小窗口
|
||||
windowLarge: window.outerWidth > 768, // 大窗口
|
||||
windowSmall: window.outerWidth <= 768, // 小窗口
|
||||
|
||||
// 播放中的音频地址
|
||||
audioPlaying: null,
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user