mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
40 lines
790 B
Vue
40 lines
790 B
Vue
<template>
|
|
<Editor v-if="!screening" />
|
|
<Screen v-else />
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { computed, defineComponent, onMounted } from 'vue'
|
|
import { useStore } from 'vuex'
|
|
import { MutationTypes, ActionTypes, State } from '@/store'
|
|
|
|
import Editor from './views/Editor/index.vue'
|
|
import Screen from './views/Screen/index.vue'
|
|
|
|
export default defineComponent({
|
|
name: 'app',
|
|
components: {
|
|
Editor,
|
|
Screen,
|
|
},
|
|
setup() {
|
|
const store = useStore<State>()
|
|
const screening = computed(() => store.state.screening)
|
|
|
|
onMounted(() => {
|
|
store.commit(MutationTypes.SET_AVAILABLE_FONTS)
|
|
store.dispatch(ActionTypes.INIT_SNAPSHOT_DATABASE)
|
|
})
|
|
|
|
return {
|
|
screening,
|
|
}
|
|
},
|
|
})
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
#app {
|
|
height: 100%;
|
|
}
|
|
</style> |