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
484bc6ea39
commit
d8872f215b
@ -334,7 +334,8 @@ export default {
|
||||
this.searchKey = ""
|
||||
}
|
||||
this.$emit("on-show-change", v)
|
||||
$A.eeuiAppSetScrollDisabled(v)
|
||||
//
|
||||
$A.eeuiAppSetScrollDisabled(v && this.windowPortrait)
|
||||
},
|
||||
|
||||
searchKey() {
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -89,7 +89,7 @@ export default {
|
||||
},
|
||||
|
||||
show(v) {
|
||||
$A.eeuiAppSetScrollDisabled(v)
|
||||
$A.eeuiAppSetScrollDisabled(v && this.windowPortrait)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -431,7 +431,11 @@
|
||||
</Scrollbar>
|
||||
<TaskUpload ref="upload" class="upload" @on-select-file="onSelectFile"/>
|
||||
</div>
|
||||
<div v-show="taskDetail.id > 0" class="task-dialog" :style="dialogStyle">
|
||||
<div
|
||||
v-show="taskDetail.id > 0"
|
||||
ref="taskDialog"
|
||||
class="task-dialog"
|
||||
:style="dialogStyle">
|
||||
<template v-if="hasOpenDialog">
|
||||
<ResizeLine
|
||||
class="task-resize"
|
||||
@ -485,11 +489,18 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ProjectLog v-if="navActive=='log' && taskId > 0" ref="log" :task-id="taskDetail.id" :show-load="false" @on-load-change="logLoadChange"/>
|
||||
<div v-else class="no-dialog"
|
||||
@drop.prevent="taskPasteDrag($event, 'drag')"
|
||||
@dragover.prevent="taskDragOver(true, $event)"
|
||||
@dragleave.prevent="taskDragOver(false, $event)">
|
||||
<ProjectLog
|
||||
v-if="navActive=='log' && taskId > 0"
|
||||
ref="log"
|
||||
:task-id="taskDetail.id"
|
||||
:show-load="false"
|
||||
@on-load-change="logLoadChange"/>
|
||||
<div
|
||||
v-else
|
||||
class="no-dialog"
|
||||
@drop.prevent="taskPasteDrag($event, 'drag')"
|
||||
@dragover.prevent="taskDragOver(true, $event)"
|
||||
@dragleave.prevent="taskDragOver(false, $event)">
|
||||
<div class="no-input">
|
||||
<ChatInput
|
||||
ref="chatInput"
|
||||
@ -668,8 +679,9 @@ export default {
|
||||
|
||||
loopForce: false,
|
||||
|
||||
nowTime: $A.dayjs().unix(),
|
||||
nowInterval: null,
|
||||
keepInterval: null,
|
||||
keepIntoTimer: null,
|
||||
keepUnix: $A.dayjs().unix(),
|
||||
|
||||
msgText: '',
|
||||
msgFile: [],
|
||||
@ -732,15 +744,16 @@ export default {
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.nowInterval = setInterval(() => {
|
||||
this.nowTime = $A.dayjs().unix();
|
||||
this.keepInterval = setInterval(() => {
|
||||
this.keepUnix = $A.dayjs().unix();
|
||||
this.keepIntoInput();
|
||||
}, 1000);
|
||||
//
|
||||
emitter.on('receiveTask', this.onReceiveShow);
|
||||
},
|
||||
|
||||
destroyed() {
|
||||
clearInterval(this.nowInterval);
|
||||
clearInterval(this.keepInterval);
|
||||
//
|
||||
emitter.off('receiveTask', this.onReceiveShow);
|
||||
},
|
||||
@ -1046,7 +1059,7 @@ export default {
|
||||
this.visibleForce = false;
|
||||
this.addsubForce = false;
|
||||
this.receiveShow = false;
|
||||
this.$refs.chatInput && this.$refs.chatInput.hidePopover();
|
||||
this.$refs.chatInput?.hidePopover();
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
@ -1126,11 +1139,11 @@ export default {
|
||||
},
|
||||
|
||||
within24Hours(date) {
|
||||
return ($A.dayjs(date).unix() - this.nowTime) < 86400
|
||||
return ($A.dayjs(date).unix() - this.keepUnix) < 86400
|
||||
},
|
||||
|
||||
expiresFormat(date) {
|
||||
return $A.countDownFormat(this.nowTime, date)
|
||||
return $A.countDownFormat(this.keepUnix, date)
|
||||
},
|
||||
|
||||
tagColor(taskDetail) {
|
||||
@ -1784,7 +1797,7 @@ export default {
|
||||
},
|
||||
|
||||
onSend(msgText) {
|
||||
this.$refs.chatInput && this.$refs.chatInput.hidePopover();
|
||||
this.$refs.chatInput?.hidePopover();
|
||||
if (msgText === 'open') {
|
||||
this.msgDialog(null, true);
|
||||
} else {
|
||||
@ -2127,6 +2140,25 @@ export default {
|
||||
this.$refs.dialog?.onMsgType(type)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
keepIntoInput() {
|
||||
if (!this.$isEEUiApp) {
|
||||
return
|
||||
}
|
||||
this.keepIntoTimer && clearTimeout(this.keepIntoTimer)
|
||||
this.keepIntoTimer = setTimeout(_ => {
|
||||
if (!this.keyboardShow) {
|
||||
return true; // 键盘未弹出
|
||||
}
|
||||
if (!this.$refs.chatInput?.isFocus) {
|
||||
return true; // 输入框未聚焦
|
||||
}
|
||||
this.$refs.taskDialog?.scrollIntoView({
|
||||
block: 'end',
|
||||
behavior: 'smooth'
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,6 +39,12 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
show(v) {
|
||||
$A.eeuiAppSetScrollDisabled(v && this.windowPortrait)
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
emitter.on('handleMoveTop', this.handleMoveTop);
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user