md-wechat/src/views/index.vue
YangQi 82f805f678
chore: move file (#161)
使用 views 替换 pages
2022-07-27 14:58:25 +08:00

47 lines
654 B
Vue

<template>
<transition name="fade" v-if="loading">
<loading />
</transition>
<codemirror-editor v-else />
</template>
<script>
import Loading from '../components/Loading'
import CodemirrorEditor from './CodemirrorEditor'
export default {
name: `App`,
components: {
Loading,
CodemirrorEditor,
},
data() {
return {
loading: true,
}
},
mounted() {
setTimeout(() => {
this.loading = false
}, 100)
},
}
</script>
<style scoped>
.fade-enter,
.fade-leave-to {
opacity: 0;
}
.fade-enter-to,
.fade-leave {
opacity: 1;
}
.fade-enter-active,
.fade-leave-active {
transition: all 1s;
}
</style>