-
Notifications
You must be signed in to change notification settings - Fork 0
/
PopupView.vue
34 lines (32 loc) · 931 Bytes
/
PopupView.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!-- src/views/PopupView.vue -->
<template>
<div>
<component :is="currentComponent"></component>
</div>
</template>
<script>
import CharTable from "../components/CharTable.vue"
import TokenClassification from "../components/TokenClassification.vue"
import KeywordTable from "../components/KeywordTable.vue"
import DFA from "../components/DFA.vue"
import ParsingProcess from "../components/ParsingProcess.vue"
import DelimeterTable from "@/components/DelimeterTable.vue"
import SyntaxRules from "@/components/SyntaxRules.vue"
export default {
computed: {
currentComponent() {
const component = this.$route.query.component
const components = {
CharTable,
TokenClassification,
KeywordTable,
DFA,
ParsingProcess,
DelimeterTable,
SyntaxRules,
}
return components[component] || null
},
},
}
</script>