2021-01-06 18:41:05 +08:00
|
|
|
|
<template>
|
|
|
|
|
<div class="layout-footer mt15" v-show="isDelayFooter">
|
|
|
|
|
<div class="layout-footer-warp">
|
2021-03-06 14:45:40 +08:00
|
|
|
|
<div>vue-next-admin,Made by lyt with ❤️</div>
|
2021-01-06 18:41:05 +08:00
|
|
|
|
<div class="mt5">Copyright © 深圳市 xxx 软件科技有限公司</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
|
import { toRefs, reactive } from "vue";
|
|
|
|
|
import { onBeforeRouteUpdate } from "vue-router";
|
|
|
|
|
export default {
|
|
|
|
|
name: "layoutFooter",
|
|
|
|
|
setup() {
|
|
|
|
|
const state = reactive({
|
|
|
|
|
isDelayFooter: true,
|
|
|
|
|
});
|
2021-01-11 18:48:34 +08:00
|
|
|
|
// 路由改变时,等主界面动画加载完毕再显示 footer
|
2021-01-06 18:41:05 +08:00
|
|
|
|
onBeforeRouteUpdate((to, from) => {
|
|
|
|
|
state.isDelayFooter = false;
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
state.isDelayFooter = true;
|
|
|
|
|
}, 800);
|
|
|
|
|
});
|
|
|
|
|
return {
|
|
|
|
|
...toRefs(state),
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.layout-footer {
|
|
|
|
|
width: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
&-warp {
|
|
|
|
|
margin: auto;
|
|
|
|
|
color: #9e9e9e;
|
|
|
|
|
text-align: center;
|
|
|
|
|
animation: logoAnimation 0.3s ease-in-out;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|