mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-12 17:08:11 +00:00
no message
This commit is contained in:
parent
c5c9e19f76
commit
62b8b623ec
14
resources/assets/js/functions/common.js
vendored
14
resources/assets/js/functions/common.js
vendored
@ -1110,6 +1110,20 @@
|
||||
*/
|
||||
getAttr(el, attrName, def = "") {
|
||||
return el ? el.getAttribute(attrName) : def;
|
||||
},
|
||||
|
||||
/**
|
||||
* 主动失去焦点
|
||||
* @param el
|
||||
*/
|
||||
onBlur(el = null) {
|
||||
if (el) {
|
||||
el.blur();
|
||||
} else {
|
||||
if (document.activeElement && typeof document.activeElement.blur === "function") {
|
||||
document.activeElement.blur();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -340,33 +340,18 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
if (this.$store.state.dialogMsgTransfer.time > $A.Time()) {
|
||||
this.$store.state.dialogMsgTransfer.time = 0;
|
||||
const {msgFile, msgRecord, msgText} = this.$store.state.dialogMsgTransfer;
|
||||
this.$nextTick(() => {
|
||||
if ($A.isArray(msgFile) && msgFile.length > 0) {
|
||||
this.sendFileMsg(msgFile);
|
||||
} else if ($A.isJson(msgRecord) && msgRecord.duration > 0) {
|
||||
this.sendRecord(msgRecord);
|
||||
} else if (msgText) {
|
||||
this.sendMsg(msgText);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
this.$store.dispatch('forgetInDialog', this._uid)
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState([
|
||||
'cacheDialogs',
|
||||
'taskId',
|
||||
'dialogMsgs',
|
||||
'dialogMsgTransfer',
|
||||
'cacheDialogs',
|
||||
'wsOpenNum',
|
||||
'touchBackInProgress',
|
||||
'taskId',
|
||||
]),
|
||||
|
||||
isReady() {
|
||||
@ -490,6 +475,24 @@ export default {
|
||||
immediate: true
|
||||
},
|
||||
|
||||
dialogMsgTransfer: {
|
||||
handler({time, msgFile, msgRecord, msgText}) {
|
||||
if (time > $A.Time()) {
|
||||
this.$store.state.dialogMsgTransfer.time = 0;
|
||||
this.$nextTick(() => {
|
||||
if ($A.isArray(msgFile) && msgFile.length > 0) {
|
||||
this.sendFileMsg(msgFile);
|
||||
} else if ($A.isJson(msgRecord) && msgRecord.duration > 0) {
|
||||
this.sendRecord(msgRecord);
|
||||
} else if (msgText) {
|
||||
this.sendMsg(msgText);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
|
||||
wsOpenNum(num) {
|
||||
if (num <= 1) return
|
||||
this.$store.dispatch("getDialogMsgs", this.dialogId).catch(_ => {});
|
||||
|
||||
@ -734,6 +734,9 @@ export default {
|
||||
if (id > 0) {
|
||||
this.ready = true;
|
||||
} else {
|
||||
if (this.windowSmall) {
|
||||
$A.onBlur();
|
||||
}
|
||||
this.timeOpen = false;
|
||||
this.timeForce = false;
|
||||
this.assistForce = false;
|
||||
@ -742,9 +745,6 @@ export default {
|
||||
this.$refs.owner && this.$refs.owner.handleClose();
|
||||
this.$refs.assist && this.$refs.assist.handleClose();
|
||||
this.$refs.chatInput && this.$refs.chatInput.hidePopover();
|
||||
if (this.windowSmall) {
|
||||
document.activeElement.blur();
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
@ -1103,6 +1103,7 @@ export default {
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
if (this.windowSmall) {
|
||||
$A.onBlur();
|
||||
this.$store.state.dialogMsgTransfer = {
|
||||
time: $A.Time() + 10,
|
||||
msgText: this.msgText,
|
||||
|
||||
@ -611,7 +611,11 @@ export default {
|
||||
},
|
||||
|
||||
tableHeight() {
|
||||
return Math.max(300, this.windowHeight - 160)
|
||||
if (this.windowLarge) {
|
||||
return Math.max(300, this.windowHeight - 160)
|
||||
} else {
|
||||
return Math.max(300, this.windowHeight - 200)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -589,7 +589,7 @@
|
||||
position: absolute;
|
||||
transform: scale(0.8) translateX(100%);
|
||||
transform-origin: right center;
|
||||
top: 2px;
|
||||
bottom: 28px;
|
||||
right: 22px;
|
||||
z-index: 2;
|
||||
height: 20px;
|
||||
|
||||
10
resources/assets/sass/pages/page-file.scss
vendored
10
resources/assets/sass/pages/page-file.scss
vendored
@ -286,6 +286,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.ivu-table-overflowY,
|
||||
.ivu-table-overflowX {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
}
|
||||
.file-nbox {
|
||||
display: flex;
|
||||
@ -669,11 +673,15 @@
|
||||
grid-gap: 4px;
|
||||
> li {
|
||||
width: 80px;
|
||||
.file-check,
|
||||
.file-menu {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.file-table {
|
||||
margin: 16px 24px 24px;
|
||||
margin: 16px 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user