2020-02-11 17:51:04 +08:00
|
|
|
<template>
|
2022-08-08 17:30:41 +08:00
|
|
|
<transition name="fade" v-if="loading">
|
2022-08-09 10:31:23 +08:00
|
|
|
<div
|
|
|
|
class="loading"
|
|
|
|
:class="{
|
|
|
|
loading_night: nightMode,
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
<strong>致力于让 Markdown 编辑更简单</strong>
|
2020-02-11 17:51:04 +08:00
|
|
|
</div>
|
2022-08-08 17:30:41 +08:00
|
|
|
</transition>
|
2020-02-11 17:51:04 +08:00
|
|
|
</template>
|
|
|
|
|
2022-08-08 17:30:41 +08:00
|
|
|
<script>
|
2023-07-29 19:59:34 +08:00
|
|
|
import { mapState } from 'pinia'
|
|
|
|
import { useStore } from '@/stores'
|
2022-08-09 10:31:23 +08:00
|
|
|
|
2022-08-08 17:30:41 +08:00
|
|
|
export default {
|
2022-08-08 19:08:42 +08:00
|
|
|
name: `RunLoading`,
|
2022-08-08 17:30:41 +08:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
loading: true,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
setTimeout(() => {
|
|
|
|
this.loading = false
|
|
|
|
}, 100)
|
|
|
|
},
|
2022-08-09 10:31:23 +08:00
|
|
|
computed: {
|
2023-07-29 19:59:34 +08:00
|
|
|
...mapState(useStore, {
|
2022-08-09 10:31:23 +08:00
|
|
|
nightMode: ({ nightMode }) => nightMode,
|
|
|
|
}),
|
|
|
|
},
|
2022-08-08 17:30:41 +08:00
|
|
|
}
|
|
|
|
</script>
|
2020-02-11 17:51:04 +08:00
|
|
|
|
2020-07-13 21:13:46 +08:00
|
|
|
<style lang="less" scoped>
|
2022-08-09 10:31:23 +08:00
|
|
|
@light-color: #303133;
|
|
|
|
@light-background-color: #f2f2f2;
|
|
|
|
@night-color: #bbbbbb;
|
|
|
|
@night-background-color: #303133;
|
|
|
|
|
2020-07-04 00:48:27 +08:00
|
|
|
.loading {
|
2021-02-28 14:50:52 +08:00
|
|
|
position: fixed;
|
|
|
|
z-index: 99999;
|
2022-08-09 10:31:23 +08:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
width: 100vw;
|
|
|
|
height: 100vh;
|
|
|
|
font-size: 18px;
|
|
|
|
color: @light-color;
|
|
|
|
background-color: @light-background-color;
|
2020-07-04 00:48:27 +08:00
|
|
|
|
2022-08-09 10:31:23 +08:00
|
|
|
&::before {
|
|
|
|
content: url('../assets/images/favicon.png');
|
|
|
|
width: 100px;
|
|
|
|
height: 100px;
|
|
|
|
margin-bottom: 26px;
|
|
|
|
}
|
2020-07-04 00:48:27 +08:00
|
|
|
}
|
2022-08-08 17:30:41 +08:00
|
|
|
|
2022-08-09 10:31:23 +08:00
|
|
|
.loading_night {
|
|
|
|
color: @night-color;
|
|
|
|
background-color: @night-background-color;
|
2022-08-08 17:30:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.fade-enter,
|
|
|
|
.fade-leave-to {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.fade-enter-to,
|
|
|
|
.fade-leave {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.fade-enter-active,
|
|
|
|
.fade-leave-active {
|
|
|
|
transition: opacity 1s;
|
|
|
|
}
|
2020-02-11 17:51:04 +08:00
|
|
|
</style>
|