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