mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-26 11:26:34 +08:00
fix: 修改aside展示动画
This commit is contained in:
parent
d1f84cded9
commit
8d9f503867
@ -9,15 +9,24 @@
|
|||||||
@mouseenter="toolsMouseoverHandle"
|
@mouseenter="toolsMouseoverHandle"
|
||||||
@mouseleave="toolsMouseoutHandle"
|
@mouseleave="toolsMouseoutHandle"
|
||||||
>
|
>
|
||||||
|
<!-- PawIcon -->
|
||||||
|
<n-icon
|
||||||
|
v-show="settingStore.getChartToolsStatus === ToolsStatusEnum.ASIDE"
|
||||||
|
class="asideLogo"
|
||||||
|
size="22"
|
||||||
|
>
|
||||||
|
<PawIcon></PawIcon>
|
||||||
|
</n-icon>
|
||||||
|
|
||||||
<n-tooltip
|
<n-tooltip
|
||||||
v-for="(item, index) in btnList"
|
v-for="(item, index) in btnList"
|
||||||
:key="item.key"
|
:key="item.key"
|
||||||
:disabled="!isAside"
|
:disabled="!isAside || asideTootipDis"
|
||||||
trigger="hover"
|
trigger="hover"
|
||||||
placement="left"
|
placement="left"
|
||||||
>
|
>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<div class="btn-item" :class="[btnList.length - 1 === index && 'go-mb-0']">
|
<div class="btn-item" :class="[btnList.length - 1 === index && 'go-111mt-0']">
|
||||||
<n-button
|
<n-button
|
||||||
v-if="item.type === TypeEnum.BUTTON"
|
v-if="item.type === TypeEnum.BUTTON"
|
||||||
:circle="isAside"
|
:circle="isAside"
|
||||||
@ -55,14 +64,6 @@
|
|||||||
<!-- 提示 -->
|
<!-- 提示 -->
|
||||||
<span>{{ item.name }}</span>
|
<span>{{ item.name }}</span>
|
||||||
</n-tooltip>
|
</n-tooltip>
|
||||||
<!-- PawIcon -->
|
|
||||||
<n-icon
|
|
||||||
v-if="isAside"
|
|
||||||
v-show="settingStore.getChartToolsStatus === ToolsStatusEnum.ASIDE && isMini"
|
|
||||||
size="22"
|
|
||||||
>
|
|
||||||
<PawIcon></PawIcon>
|
|
||||||
</n-icon>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -83,6 +84,8 @@ let mouseTime: any = null
|
|||||||
const isMini = ref<boolean>(true)
|
const isMini = ref<boolean>(true)
|
||||||
// 是否是侧边栏
|
// 是否是侧边栏
|
||||||
const isAside = computed(() => settingStore.getChartToolsStatus === ToolsStatusEnum.ASIDE)
|
const isAside = computed(() => settingStore.getChartToolsStatus === ToolsStatusEnum.ASIDE)
|
||||||
|
// 控制 tootip 提示时机
|
||||||
|
const asideTootipDis = ref(true)
|
||||||
// 文件上传
|
// 文件上传
|
||||||
const { importUploadFileListRef, importCustomRequest, importBeforeUpload } = useFile()
|
const { importUploadFileListRef, importCustomRequest, importBeforeUpload } = useFile()
|
||||||
|
|
||||||
@ -103,8 +106,12 @@ const toolsMouseoverHandle = () => {
|
|||||||
mouseTime = setTimeout(() => {
|
mouseTime = setTimeout(() => {
|
||||||
if (isMini.value) {
|
if (isMini.value) {
|
||||||
isMini.value = false
|
isMini.value = false
|
||||||
|
asideTootipDis.value = true
|
||||||
}
|
}
|
||||||
}, 200);
|
}, 200);
|
||||||
|
setTimeout(() => {
|
||||||
|
asideTootipDis.value = false
|
||||||
|
}, 200)
|
||||||
}
|
}
|
||||||
|
|
||||||
const toolsMouseoutHandle = () => {
|
const toolsMouseoutHandle = () => {
|
||||||
@ -122,7 +129,7 @@ $dockBottom: 60px;
|
|||||||
$dockMiniWidth: 200px;
|
$dockMiniWidth: 200px;
|
||||||
$dockMiniBottom: 53px;
|
$dockMiniBottom: 53px;
|
||||||
|
|
||||||
$asideHeight: 78px;
|
$asideHeight: 90px;
|
||||||
$asideMiniHeight: 22px;
|
$asideMiniHeight: 22px;
|
||||||
$asideBottom: 70px;
|
$asideBottom: 70px;
|
||||||
|
|
||||||
@ -137,18 +144,15 @@ $asideBottom: 70px;
|
|||||||
mix-blend-mode: luminosity;
|
mix-blend-mode: luminosity;
|
||||||
@include filter-border-color("hover-border-color-shallow");
|
@include filter-border-color("hover-border-color-shallow");
|
||||||
&.aside {
|
&.aside {
|
||||||
flex-direction: column;
|
flex-direction: column-reverse;
|
||||||
height: auto;
|
height: auto;
|
||||||
right: 20px;
|
right: 20px;
|
||||||
padding: 20px 8px;
|
padding: 20px 8px;
|
||||||
bottom: $asideBottom;
|
bottom: $asideBottom;
|
||||||
transition: height ease .4s;
|
overflow: hidden;
|
||||||
|
transition: height ease 0.4s;
|
||||||
.btn-item {
|
.btn-item {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
/* 没生效,用上面的 go-mb-0 代替 */
|
|
||||||
&:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
@include deep() {
|
@include deep() {
|
||||||
.n-button__icon {
|
.n-button__icon {
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
@ -172,15 +176,18 @@ $asideBottom: 70px;
|
|||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
.asideLogo {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
&.isMini {
|
&.isMini {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 13px 13px;
|
padding: 13px 13px;
|
||||||
background-color: var(--n-toggle-bar-color);
|
background-color: var(--n-toggle-bar-color);
|
||||||
animation: aside-mini-in .4s ease forwards;
|
animation: aside-mini-in 0.4s ease forwards;
|
||||||
@keyframes aside-mini-in {
|
@keyframes aside-mini-in {
|
||||||
0% {
|
0% {
|
||||||
opacity: .5;
|
opacity: 0.5;
|
||||||
height: $asideHeight;
|
height: $asideHeight;
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
@ -192,6 +199,9 @@ $asideBottom: 70px;
|
|||||||
position: relative;
|
position: relative;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
.asideLogo {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user