no message

This commit is contained in:
kuaifan 2022-05-16 19:30:51 +08:00
parent 4d6fb6f2ca
commit bc4477cd86
9 changed files with 113 additions and 55 deletions

View File

@ -5,7 +5,7 @@
:closable="escClosable" :closable="escClosable"
:mask-closable="maskClosable" :mask-closable="maskClosable"
:footer-hide="true" :footer-hide="true"
:transition-names="[`drawer-fade-${placement}`, '']" :transition-names="[`drawer-slide-${placement}`, '']"
:beforeClose="beforeClose" :beforeClose="beforeClose"
fullscreen fullscreen
:class-name="`common-drawer-overlay ${placement}`"> :class-name="`common-drawer-overlay ${placement}`">

View File

@ -1,17 +1,22 @@
<template> <template>
<div class="mobile-tabbar" :class="{'more-show': isMore}" @click="toggleRoute('more')"> <div class="mobile-tabbar">
<div @click.stop="" class="more-box"> <transition name="mobile-fade">
<div class="tabbar-more-title">{{$L('更多')}}</div> <div v-if="isMore" class="more-mask" @click="toggleRoute('more')"></div>
<ul> </transition>
<li v-for="item in navMore" @click="toggleRoute(item.name)" :class="{active: activeName === item.name}"> <transition name="mobile-slide">
<div class="more-item"> <div v-if="isMore" class="more-box">
<i class="taskfont" v-html="item.icon"></i> <div class="tabbar-more-title">{{$L('更多')}}</div>
<div class="tabbar-title">{{$L(item.label)}}</div> <ul v-for="list in navMore">
</div> <li v-for="item in list" @click="toggleRoute(item.name)" :class="{active: activeName === item.name}">
</li> <div class="more-item">
</ul> <i class="taskfont" v-html="item.icon"></i>
</div> <div class="tabbar-title">{{$L(item.label)}}</div>
<ul @click.stop=""> </div>
</li>
</ul>
</div>
</transition>
<ul class="tabbar-box">
<li v-for="item in navList" @click="toggleRoute(item.name)" :class="{active: activeName === item.name}"> <li v-for="item in navList" @click="toggleRoute(item.name)" :class="{active: activeName === item.name}">
<i class="taskfont" v-html="item.icon"></i> <i class="taskfont" v-html="item.icon"></i>
<div class="tabbar-title">{{$L(item.label)}}</div> <div class="tabbar-title">{{$L(item.label)}}</div>
@ -40,17 +45,23 @@ export default {
isMore: false, isMore: false,
navList: [ navList: [
{icon: '&#xe736;', name: 'dashboard', label: '仪表盘'}, {icon: '&#xe6fb;', name: 'dashboard', label: '仪表盘'},
{icon: '&#xe732;', name: 'project', label: '项目'}, {icon: '&#xe6fa;', name: 'project', label: '项目'},
{icon: '&#xe71e;', name: 'dialog', label: '消息'}, {icon: '&#xe6eb;', name: 'dialog', label: '消息'},
{icon: '&#xe6b2;', name: 'contacts', label: '通讯录'}, {icon: '&#xe6b2;', name: 'contacts', label: '通讯录'},
{icon: '&#xe6e9;', name: 'more', label: '更多'}, {icon: '&#xe6e9;', name: 'more', label: '更多'},
], ],
navMore: [ navMore: [
{icon: '&#xe6f5;', name: 'calendar', label: '日历'}, [
{icon: '&#xe6f3;', name: 'file', label: '文件'}, {icon: '&#xe6f5;', name: 'calendar', label: '日历'},
{icon: '&#xe67b;', name: 'setting', label: '设置'}, {icon: '&#xe6f3;', name: 'file', label: '文件'},
] {icon: '&#xe67b;', name: 'setting', label: '设置'},
],
[
{icon: '&#xe7b8;', name: 'addTask', label: '添加任务'},
{icon: '&#xe7b9;', name: 'addProject', label: '添加项目'},
]
],
}; };
}, },
@ -123,12 +134,21 @@ export default {
methods: { methods: {
toggleRoute(path) { toggleRoute(path) {
this.$emit("on-click", path)
if (path != 'more') {
this.isMore = false
}
//
let location; let location;
switch (path) { switch (path) {
case 'more': case 'more':
this.isMore = !this.isMore; this.isMore = !this.isMore;
return; return;
case 'addTask':
case 'addProject':
return;
case 'project': case 'project':
location = {name: 'manage-project', params: {projectId: 'all'}}; location = {name: 'manage-project', params: {projectId: 'all'}};
break; break;
@ -145,7 +165,6 @@ export default {
location = {name: 'manage-' + path}; location = {name: 'manage-' + path};
break; break;
} }
this.isMore = false;
this.goForward(location); this.goForward(location);
}, },
}, },

View File

@ -354,7 +354,7 @@
</DragBallComponent> </DragBallComponent>
<!--移动端选项卡--> <!--移动端选项卡-->
<MobileTabbar v-if="showMobileTabbar"/> <MobileTabbar v-if="showMobileTabbar" @on-click="onTabbarClick"/>
<MobileBack :showTabbar="showMobileTabbar"/> <MobileBack :showTabbar="showMobileTabbar"/>
</div> </div>
</template> </template>
@ -1017,6 +1017,17 @@ export default {
}); });
}, },
onTabbarClick(act) {
switch (act) {
case 'addTask':
this.onAddTask(0)
break;
case 'addProject':
this.onAddShow()
break;
}
},
notificationInit() { notificationInit() {
this.notificationManage = new notificationKoro(this.$L("打开通知成功")); this.notificationManage = new notificationKoro(this.$L("打开通知成功"));
if (this.notificationManage.support) { if (this.notificationManage.support) {

View File

@ -109,30 +109,30 @@
} }
} }
.drawer-fade-bottom-enter-active { .drawer-slide-bottom-enter-active {
transition: all .2s ease; transition: all .2s ease;
} }
.drawer-fade-bottom-leave-active { .drawer-slide-bottom-leave-active {
transition: all .2s ease; transition: all .2s ease;
} }
.drawer-fade-bottom-enter, .drawer-slide-bottom-enter,
.drawer-fade-bottom-leave-to { .drawer-slide-bottom-leave-to {
transform: translate(0, 15%) scale(0.98); transform: translate(0, 15%) scale(0.98);
opacity: 0; opacity: 0;
} }
.drawer-fade-right-enter-active { .drawer-slide-right-enter-active {
transition: all .2s ease; transition: all .2s ease;
} }
.drawer-fade-right-leave-active { .drawer-slide-right-leave-active {
transition: all .2s ease; transition: all .2s ease;
} }
.drawer-fade-right-enter, .drawer-slide-right-enter,
.drawer-fade-right-leave-to { .drawer-slide-right-leave-to {
transform: translate(15%, 0) scale(0.98); transform: translate(15%, 0) scale(0.98);
opacity: 0; opacity: 0;
} }

View File

@ -8,7 +8,9 @@
right: 0; right: 0;
z-index: 99; z-index: 99;
> ul { .tabbar-box {
position: relative;
z-index: 3;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -16,7 +18,7 @@
margin: 0; margin: 0;
height: 60px; height: 60px;
background-color: #f8f8f8; background-color: #f8f8f8;
box-shadow: 0 0 2px rgba(28, 34, 43, 0.15); box-shadow: 0 0 1px rgba(28, 34, 43, 0.15);
> li { > li {
flex: 1; flex: 1;
@ -58,27 +60,40 @@
} }
} }
.more-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
background-color: rgba(0, 0, 0, 0.15);
}
.more-box { .more-box {
display: none; position: relative;
z-index: 2;
display: block;
margin-bottom: -2px; margin-bottom: -2px;
border-radius: 16px 16px 0 0; border-radius: 16px 16px 0 0;
background-color: rgba(250, 250, 250, 0.98); padding-bottom: 16px;
background-color: #ffffff;
border-top: 1px solid #f1f1f1; border-top: 1px solid #f1f1f1;
.tabbar-more-title { .tabbar-more-title {
font-size: 18px; font-size: 18px;
font-weight: 500; font-weight: 500;
padding: 14px 14px 0; padding: 16px 16px 36px;
} }
> ul { > ul {
padding: 36px 12px 16px; padding: 0 12px;
> li { > li {
list-style: none; list-style: none;
display: inline-block; display: inline-block;
width: 25%; width: 25%;
margin-bottom: 20px; margin-bottom: 28px;
.more-item { .more-item {
display: flex; display: flex;
@ -92,9 +107,9 @@
justify-content: center; justify-content: center;
width: 56px; width: 56px;
height: 56px; height: 56px;
font-size: 26px; font-size: 25px;
color: #0bc037; color: $primary-color;
background-color: #f1f1f1; background-color: rgba($primary-color, 0.08);
border-radius: 12px; border-radius: 12px;
} }
@ -109,19 +124,6 @@
} }
} }
} }
&.more-show {
top: 0;
background-color: rgba(0, 0, 0, 0.15);
> ul {
box-shadow: 0 0 1px rgba(28, 34, 43, 0.15);
}
.more-box {
display: block;
}
}
} }
.mobile-back { .mobile-back {
@ -142,6 +144,33 @@
} }
} }
.mobile-fade-enter-active {
transition: all 0.2s ease;
}
.mobile-fade-leave-active {
transition: all 0.2s ease;
}
.mobile-fade-enter,
.mobile-fade-leave-to {
opacity: 0;
}
.mobile-slide-enter-active {
transition: all 0.2s ease;
}
.mobile-slide-leave-active {
transition: all 0.2s ease;
}
.mobile-slide-enter,
.mobile-slide-leave-to {
transform: translate(0, 15%) scale(0.98);
opacity: 0;
}
@media (max-width: 640px) { @media (max-width: 640px) {
.mobile-tabbar { .mobile-tabbar {
display: flex; display: flex;

View File

@ -10,6 +10,5 @@
font-size: 16px; font-size: 16px;
font-style: normal; font-style: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }