mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-26 11:40:28 +00:00
no message
This commit is contained in:
parent
12dda85ca5
commit
403462b204
14
resources/assets/js/app.js
vendored
14
resources/assets/js/app.js
vendored
@ -75,11 +75,19 @@ if (!isElectron && !isEEUiApp) {
|
|||||||
failedColor: '#ff0000'
|
failedColor: '#ff0000'
|
||||||
});
|
});
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
ViewUI.LoadingBar.start();
|
ViewUI.LoadingBar._timer && clearTimeout(ViewUI.LoadingBar._timer)
|
||||||
|
ViewUI.LoadingBar._timer = setTimeout(_ => {
|
||||||
|
ViewUI.LoadingBar._load = true;
|
||||||
|
ViewUI.LoadingBar.start();
|
||||||
|
}, 300)
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
router.afterEach(() => {
|
router.afterEach(() => {
|
||||||
ViewUI.LoadingBar.finish();
|
ViewUI.LoadingBar._timer && clearTimeout(ViewUI.LoadingBar._timer)
|
||||||
|
if (ViewUI.LoadingBar._load === true) {
|
||||||
|
ViewUI.LoadingBar._load = false;
|
||||||
|
ViewUI.LoadingBar.finish();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,7 +107,7 @@ Vue.prototype.goBack = function (number) {
|
|||||||
if ($A.runNum(history['::count']) > 2) {
|
if ($A.runNum(history['::count']) > 2) {
|
||||||
app.$router.go(typeof number === 'number' ? number : -1);
|
app.$router.go(typeof number === 'number' ? number : -1);
|
||||||
} else {
|
} else {
|
||||||
app.$router.replace(typeof number === "object" ? number : {path: '/'}).then(() => {}).catch(() => {});
|
app.$router.replace(typeof number === "object" ? number : {path: '/'}).catch(_ => {});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -119,13 +119,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="messenger-msg" :class="{'show768':dialogId > 0}">
|
<transition :name="windowMax768 ? 'mobile-dialog' : ''">
|
||||||
<div class="msg-dialog-bg">
|
<div v-if="dialogId || !windowMax768" class="messenger-msg">
|
||||||
<div class="msg-dialog-bg-icon"><Icon type="ios-chatbubbles" /></div>
|
<div class="msg-dialog-bg">
|
||||||
<div class="msg-dialog-bg-text">{{$L('选择一个会话开始聊天')}}</div>
|
<div class="msg-dialog-bg-icon"><Icon type="ios-chatbubbles" /></div>
|
||||||
|
<div class="msg-dialog-bg-text">{{$L('选择一个会话开始聊天')}}</div>
|
||||||
|
</div>
|
||||||
|
<DialogWrapper v-if="dialogId > 0" :dialogId="dialogId" @on-active="scrollIntoActive"/>
|
||||||
</div>
|
</div>
|
||||||
<DialogWrapper v-if="dialogTmpId > 0" :dialogId="dialogTmpId" @on-active="scrollIntoActive"/>
|
</transition>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -149,7 +152,6 @@ export default {
|
|||||||
],
|
],
|
||||||
dialogActive: '',
|
dialogActive: '',
|
||||||
dialogKey: '',
|
dialogKey: '',
|
||||||
dialogTmpId: 0,
|
|
||||||
|
|
||||||
contactsKey: '',
|
contactsKey: '',
|
||||||
contactsLoad: 0,
|
contactsLoad: 0,
|
||||||
@ -173,7 +175,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['userId', 'cacheDialogs', 'loadDialogs']),
|
...mapState(['userId', 'cacheDialogs', 'loadDialogs', 'windowMax768']),
|
||||||
|
|
||||||
dialogId() {
|
dialogId() {
|
||||||
const {dialogId} = this.$route.params;
|
const {dialogId} = this.$route.params;
|
||||||
@ -302,16 +304,8 @@ export default {
|
|||||||
dialogId: {
|
dialogId: {
|
||||||
handler(id) {
|
handler(id) {
|
||||||
if (id > 0) {
|
if (id > 0) {
|
||||||
this.dialogTmpId = id;
|
|
||||||
$A.setStorage("messenger::dialogId", id);
|
$A.setStorage("messenger::dialogId", id);
|
||||||
this.scrollIntoActive()
|
this.scrollIntoActive()
|
||||||
} else {
|
|
||||||
this.timerA && clearTimeout(this.timerA);
|
|
||||||
this.timerA = setTimeout(_ => {
|
|
||||||
if (this.dialogId == 0) {
|
|
||||||
this.dialogTmpId = 0;
|
|
||||||
}
|
|
||||||
}, 300)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
|
|||||||
20
resources/assets/sass/components/mobile.scss
vendored
20
resources/assets/sass/components/mobile.scss
vendored
@ -181,6 +181,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 渐见
|
||||||
.mobile-fade-enter-active {
|
.mobile-fade-enter-active {
|
||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
}
|
}
|
||||||
@ -194,6 +195,7 @@
|
|||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 底部划上
|
||||||
.mobile-slide-enter-active {
|
.mobile-slide-enter-active {
|
||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
}
|
}
|
||||||
@ -204,10 +206,11 @@
|
|||||||
|
|
||||||
.mobile-slide-enter,
|
.mobile-slide-enter,
|
||||||
.mobile-slide-leave-to {
|
.mobile-slide-leave-to {
|
||||||
transform: translate(0, 15%) scale(0.98);
|
transform: translate(0, 15%);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 通知(顶部划入)
|
||||||
.mobile-notify-enter-active {
|
.mobile-notify-enter-active {
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
@ -222,6 +225,21 @@
|
|||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 对话框(右侧划入)
|
||||||
|
.mobile-dialog-enter-active {
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-dialog-leave-active {
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile-dialog-enter,
|
||||||
|
.mobile-dialog-leave-to {
|
||||||
|
transform: translate(100%, 0);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.mobile-tabbar {
|
.mobile-tabbar {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -454,14 +454,6 @@
|
|||||||
}
|
}
|
||||||
.messenger-msg {
|
.messenger-msg {
|
||||||
z-index: 49;
|
z-index: 49;
|
||||||
transition: transform 0.3s;
|
|
||||||
transform: translateX(120%);
|
|
||||||
.msg-dialog-bg {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
&.show768 {
|
|
||||||
transform: translateX(0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user