2020-01-13 22:16:04 +08:00
|
|
|
<template>
|
2020-02-11 17:51:04 +08:00
|
|
|
<loading v-if="loading" />
|
|
|
|
<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-02-11 17:51:04 +08:00
|
|
|
import Loading from './components/Loading'
|
|
|
|
import CodemirrorEditor from './components/CodemirrorEditor'
|
2020-03-02 08:19:38 +08:00
|
|
|
import prettyPrint from 'prettify'
|
2020-01-13 22:16:04 +08:00
|
|
|
export default {
|
2020-02-11 17:51:04 +08:00
|
|
|
name: 'App',
|
|
|
|
components: {
|
|
|
|
Loading,
|
|
|
|
CodemirrorEditor
|
|
|
|
},
|
2020-01-13 22:16:04 +08:00
|
|
|
data () {
|
2020-02-11 17:51:04 +08:00
|
|
|
return {
|
|
|
|
loading: true
|
2020-01-13 22:16:04 +08:00
|
|
|
}
|
|
|
|
},
|
2020-02-11 17:51:04 +08:00
|
|
|
mounted () {
|
|
|
|
setTimeout(() => {
|
|
|
|
this.loading = false
|
|
|
|
}, 200)
|
2020-03-02 08:19:38 +08:00
|
|
|
window.console
|
|
|
|
&& window.console.log
|
|
|
|
&& (console.log("Think big, train fast, learn deep. See https://github.com/yanglbme"))
|
|
|
|
setTimeout(() => {
|
2020-03-08 21:37:21 +08:00
|
|
|
// document.body.addEventListener('load', prettyPrint())
|
2020-03-02 08:19:38 +08:00
|
|
|
}, 2000)
|
2020-01-13 22:16:04 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
2020-02-11 17:51:04 +08:00
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2020-01-13 22:16:04 +08:00
|
|
|
|
|
|
|
</style>
|