Skip to content

Commit 1898e03

Browse files
committed
style: Migrate global styles to scoped styles and update component styles
1 parent 802fa22 commit 1898e03

14 files changed

+622
-647
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
### 2024-11-01
2+
- 优化 OpenCV.js 加载完成的判断条件
3+
- 优化全局样式,使用 scoped 样式
4+
5+
### 2024-10-15
6+
- 使用 Vue 3 重构
7+
- 改用 `pinia` 管理状态
8+
- 优化代码结构
9+
110
### 2024-10-08
211
- 增加 更新日志 显示
312
- 棋盘显示优化

src/App.vue

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,99 @@
7979
processUploadedImage(img);
8080
};
8181
</script>
82+
83+
<style scoped>
84+
.app-container {
85+
flex: 1;
86+
display: flex;
87+
flex-direction: column;
88+
width: 100%;
89+
margin: 0 auto;
90+
padding: 0;
91+
box-sizing: border-box;
92+
}
93+
94+
.content-wrapper {
95+
display: flex;
96+
flex-wrap: wrap;
97+
gap: 2rem;
98+
width: 100%;
99+
max-width: 1200px;
100+
margin: 0 auto;
101+
padding: 0 1rem;
102+
box-sizing: border-box;
103+
}
104+
105+
.left-column,
106+
.right-column {
107+
width: 100%;
108+
}
109+
110+
.loading-overlay {
111+
position: fixed;
112+
top: 0;
113+
left: 0;
114+
width: 100%;
115+
height: 100%;
116+
background-color: rgba(255, 255, 255, 0.8);
117+
display: flex;
118+
flex-direction: column;
119+
justify-content: center;
120+
align-items: center;
121+
z-index: 9999;
122+
}
123+
124+
.loading-overlay p {
125+
margin-top: 20px;
126+
font-size: 1.2rem;
127+
color: #333;
128+
}
129+
130+
/* 媒体查询 */
131+
@media (max-width: 768px) {
132+
.content-wrapper {
133+
flex-direction: column;
134+
gap: 0;
135+
}
136+
137+
.solution-section {
138+
order: 1;
139+
}
140+
.upload-section {
141+
order: 0;
142+
}
143+
.board-result-section {
144+
order: 2;
145+
}
146+
.fen-section {
147+
order: 3;
148+
}
149+
.depth-control-section {
150+
order: 4;
151+
}
152+
}
153+
154+
@media (min-width: 769px) {
155+
.content-wrapper {
156+
flex-direction: row;
157+
align-items: flex-start;
158+
}
159+
160+
.left-column {
161+
width: calc(50% - 1rem);
162+
position: sticky;
163+
top: 1rem;
164+
align-self: flex-start;
165+
}
166+
167+
.right-column {
168+
width: calc(50% - 1rem);
169+
}
170+
171+
.solution-section {
172+
height: calc(100vh - 2rem);
173+
overflow-y: auto;
174+
order: -1;
175+
}
176+
}
177+
</style>

0 commit comments

Comments
 (0)