md/src/App.vue

44 lines
739 B
Vue
Raw Normal View History

2020-01-13 22:16:04 +08:00
<template>
2020-07-13 21:13:46 +08:00
<transition name="fade" v-if="loading">
<loading />
</transition>
2020-05-02 11:51:50 +08:00
<codemirror-editor v-else />
2020-01-13 22:16:04 +08:00
</template>
2020-02-11 17:51:04 +08:00
2020-01-13 22:16:04 +08:00
<script>
2020-10-20 20:03:36 +08:00
import Loading from "./components/Loading";
import CodemirrorEditor from "./view/CodemirrorEditor";
2020-01-13 22:16:04 +08:00
export default {
2020-10-20 20:03:36 +08:00
name: "App",
2020-05-02 11:51:50 +08:00
components: {
Loading,
2020-10-20 20:03:36 +08:00
CodemirrorEditor,
2020-05-02 11:51:50 +08:00
},
data() {
return {
2020-10-20 20:03:36 +08:00
loading: true,
};
2020-05-02 11:51:50 +08:00
},
mounted() {
setTimeout(() => {
2020-10-20 20:03:36 +08:00
this.loading = false;
2020-07-13 23:35:46 +08:00
}, 100);
2020-10-20 20:03:36 +08:00
},
};
2020-01-13 22:16:04 +08:00
</script>
2020-02-11 17:51:04 +08:00
<style lang="scss" scoped>
2020-10-20 20:03:36 +08:00
.fade-enter,
.fade-leave-to {
2020-07-13 21:13:46 +08:00
opacity: 0;
}
2020-10-20 20:03:36 +08:00
.fade-enter-to,
.fade-leave {
2020-07-13 21:13:46 +08:00
opacity: 1;
}
2020-10-20 20:03:36 +08:00
.fade-enter-active,
.fade-leave-active {
transition: all 1s;
2020-07-13 21:13:46 +08:00
}
2020-01-13 22:16:04 +08:00
</style>