mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 19:23:26 +00:00
no message
This commit is contained in:
parent
fb3bf48bbc
commit
38b6a74e3d
@ -48,10 +48,12 @@ export default {
|
|||||||
setInterval(this.searchEnter, 1000);
|
setInterval(this.searchEnter, 1000);
|
||||||
//
|
//
|
||||||
window.addEventListener('resize', this.windowSizeListener);
|
window.addEventListener('resize', this.windowSizeListener);
|
||||||
|
window.addEventListener('scroll', this.windowScrollListener);
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
window.removeEventListener('resize', this.windowSizeListener);
|
window.removeEventListener('resize', this.windowSizeListener);
|
||||||
|
window.removeEventListener('scroll', this.windowScrollListener);
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
@ -225,6 +227,10 @@ export default {
|
|||||||
this.$store.state.windowMax768 = window.innerWidth <= 768
|
this.$store.state.windowMax768 = window.innerWidth <= 768
|
||||||
},
|
},
|
||||||
|
|
||||||
|
windowScrollListener() {
|
||||||
|
this.$store.state.windowScrollY = window.scrollY
|
||||||
|
},
|
||||||
|
|
||||||
electronEvents() {
|
electronEvents() {
|
||||||
if (!this.$Electron) {
|
if (!this.$Electron) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -94,6 +94,7 @@
|
|||||||
:data-transfer="true"
|
:data-transfer="true"
|
||||||
class="chat-input-record-transfer"
|
class="chat-input-record-transfer"
|
||||||
:class="{cancel: touchLimitY}"
|
:class="{cancel: touchLimitY}"
|
||||||
|
:style="recordTransferStyle"
|
||||||
@click="stopRecord">
|
@click="stopRecord">
|
||||||
<div v-if="recordDuration > 0" class="record-duration">{{recordFormatDuration}}</div>
|
<div v-if="recordDuration > 0" class="record-duration">{{recordFormatDuration}}</div>
|
||||||
<div v-else class="record-loading"><Loading/></div>
|
<div v-else class="record-loading"><Loading/></div>
|
||||||
@ -238,7 +239,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['dialogInputCache', 'cacheProjects', 'cacheTasks', 'cacheUserBasic', 'userId']),
|
...mapState(['dialogInputCache', 'cacheProjects', 'cacheTasks', 'cacheUserBasic', 'userId', 'windowScrollY']),
|
||||||
|
|
||||||
editorStyle() {
|
editorStyle() {
|
||||||
const {wrapperWidth, editorHeight} = this;
|
const {wrapperWidth, editorHeight} = this;
|
||||||
@ -253,6 +254,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
recordTransferStyle() {
|
||||||
|
const {windowScrollY} = this;
|
||||||
|
return windowScrollY > 0 ? {
|
||||||
|
marginTop: (windowScrollY / 2) + 'px'
|
||||||
|
} : null
|
||||||
|
},
|
||||||
|
|
||||||
boxClass() {
|
boxClass() {
|
||||||
const array = [];
|
const array = [];
|
||||||
if (this.recordState === 'ing') {
|
if (this.recordState === 'ing') {
|
||||||
|
|||||||
@ -226,15 +226,11 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
if ($A.isIos()) {
|
|
||||||
window.addEventListener('scroll', this.onWindowScroll);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if ($A.isIos()) {
|
|
||||||
window.removeEventListener('scroll', this.onWindowScroll);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
@ -243,6 +239,7 @@ export default {
|
|||||||
'cacheDialogs',
|
'cacheDialogs',
|
||||||
'dialogMsgs',
|
'dialogMsgs',
|
||||||
'wsOpenNum',
|
'wsOpenNum',
|
||||||
|
'windowScrollY'
|
||||||
]),
|
]),
|
||||||
|
|
||||||
isReady() {
|
isReady() {
|
||||||
@ -387,6 +384,20 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
windowScrollY(val) {
|
||||||
|
if ($A.isIos()) {
|
||||||
|
const {scrollE} = this.scrollInfo();
|
||||||
|
this.wrapperStyle = {
|
||||||
|
top: val + 'px'
|
||||||
|
}
|
||||||
|
if (scrollE <= 10) {
|
||||||
|
this.$nextTick(_ => {
|
||||||
|
this.onToBottom();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@ -686,18 +697,6 @@ export default {
|
|||||||
this.msgNew = 0;
|
this.msgNew = 0;
|
||||||
}
|
}
|
||||||
}, 100)
|
}, 100)
|
||||||
},
|
|
||||||
|
|
||||||
onWindowScroll() {
|
|
||||||
const {scrollE} = this.scrollInfo();
|
|
||||||
this.wrapperStyle = {
|
|
||||||
top: window.scrollY + 'px'
|
|
||||||
}
|
|
||||||
if (scrollE <= 10) {
|
|
||||||
this.$nextTick(_ => {
|
|
||||||
this.onToBottom();
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3
resources/assets/js/store/state.js
vendored
3
resources/assets/js/store/state.js
vendored
@ -1,7 +1,8 @@
|
|||||||
const stateData = {
|
const stateData = {
|
||||||
// 浏览器宽高
|
// 浏览器尺寸信息
|
||||||
windowWidth: window.innerWidth,
|
windowWidth: window.innerWidth,
|
||||||
windowHeight: window.innerHeight,
|
windowHeight: window.innerHeight,
|
||||||
|
windowScrollY: 0,
|
||||||
|
|
||||||
// 浏览器宽度≤768返回true
|
// 浏览器宽度≤768返回true
|
||||||
windowMax768: window.innerWidth <= 768,
|
windowMax768: window.innerWidth <= 768,
|
||||||
|
|||||||
@ -335,7 +335,7 @@
|
|||||||
color: $primary-title-color;
|
color: $primary-title-color;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
box-shadow: 0 0 12px 0 #c8c8c8;
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user