refactor(components): blankLayout引入GlobalContent

This commit is contained in:
Soybean
2021-11-24 23:44:39 +08:00
parent 32aa5ee75a
commit 1ffb75afce
63 changed files with 64 additions and 50 deletions

View File

@ -0,0 +1,35 @@
<template>
<hover-container class="w-64px h-full" tooltip-content="重新加载" placement="bottom-end" @click="handleRefresh">
<icon-mdi-refresh class="text-16px" :class="{ 'reload-animation': loading }" />
</hover-container>
</template>
<script lang="ts" setup>
import { HoverContainer } from '@/components';
import { useAppStore } from '@/store';
import { useLoading } from '@/hooks';
const { handleReload } = useAppStore();
const { loading, startLoading, endLoading } = useLoading();
function handleRefresh() {
startLoading();
handleReload();
setTimeout(() => {
endLoading();
}, 1000);
}
</script>
<style scoped>
.reload-animation {
animation: rotate 1s;
}
@keyframes rotate {
from {
transform: rotate(0);
}
to {
transform: rotate(360deg);
}
}
</style>