Skip to content

Commit bf2677c

Browse files
committed
style: change image uploader style
1 parent 987df2b commit bf2677c

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

src/components/BoardResult.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<section class="section">
3-
<h2>分析结果</h2>
3+
<h2>棋盘识别结果</h2>
44
<div
55
class="image-container"
66
:style="{
@@ -11,7 +11,7 @@
1111
<img
1212
v-if="overlayImageSrc"
1313
:src="overlayImageSrc"
14-
alt="分析结果"
14+
alt="棋盘识别结果"
1515
class="overlay-image"
1616
:style="{
1717
left: `${leftOffset}px`,

src/components/ImageUploader.vue

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<template>
2-
<section class="section">
2+
<section class="upload-container">
33
<h2>上传图片</h2>
44
<input
55
ref="fileInputRef"
66
type="file"
77
@change="handleImageUpload"
88
accept="image/*"
9-
:style="{ display: 'none' }"
9+
class="file-input"
1010
/>
1111
<button @click="handleButtonClick">选择图片</button>
1212
</section>
@@ -44,7 +44,23 @@ const handleButtonClick = () => {
4444
</script>
4545

4646
<style scoped>
47-
.section > *:not(h2) {
48-
text-align: center;
47+
.upload-container {
48+
display: flex;
49+
align-items: center;
50+
justify-content: space-between;
51+
padding: 1.5rem;
52+
background-color: #fff;
53+
border-radius: 8px;
54+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
55+
margin-bottom: 1rem;
56+
}
57+
58+
h2 {
59+
margin: 0;
60+
color: #333;
61+
}
62+
63+
.file-input {
64+
display: none;
4965
}
5066
</style>

0 commit comments

Comments
 (0)