-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathButtonPanel.vue
112 lines (99 loc) · 2.59 KB
/
ButtonPanel.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<template>
<div class="container">
<div class="title-bar">编译程序</div>
<div class="main-content">
<div class="panel">
<h3>系统维护</h3>
<button @click="openPopup('CharTable')">字符表</button>
<button @click="openPopup('TokenClassification')">单词分类</button>
<button @click="openPopup('SyntaxRules')">语法规则</button>
</div>
<div class="panel">
<h3>词法分析</h3>
<button @click="openPopup('KeywordTable')">关键字表</button>
<button @click="openPopup('DelimeterTable')">单字符分界符</button>
<button @click="openPopup('DFA')">词法分析DFA</button>
<button @click="openPopup('ParsingProcess')">词法分析过程展示</button>
</div>
</div>
<div class="status-bar">系统状态</div>
</div>
</template>
<script>
import { useRouter } from 'vue-router';
export default {
setup() {
const router = useRouter();
const openPopup = (component) => {
router.push({ name: 'Popup', query: { component } });
};
return {
openPopup
};
}
}
</script>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f0f0f0;
}
.container {
display: flex;
flex-direction: column;
width: 600px;
background-color: white;
border: 1px solid #ccc;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.title-bar {
background-color: #2c3e50;
color: white;
padding: 10px;
text-align: center;
font-size: 18px;
font-weight: bold;
}
.main-content {
display: flex;
justify-content: space-around;
padding: 20px;
}
.panel {
display: flex;
flex-direction: column;
align-items: center;
width: 45%;
border: 1px solid #ccc;
padding: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.panel h3 {
margin-bottom: 10px;
font-size: 16px;
}
.panel button {
margin: 5px 0;
padding: 10px 20px;
width: 100%;
border: 1px solid #ccc;
background-color: #f9f9f9;
cursor: pointer;
transition: background-color 0.3s;
}
.panel button:hover {
background-color: #e9e9e9;
}
.status-bar {
background-color: #ecf0f1;
padding: 10px;
text-align: center;
font-size: 14px;
}
</style>