[fix] Upload area overflows the container range

This commit is contained in:
root 2025-12-09 10:04:57 +08:00
parent 678317ae04
commit 904876bd89

View file

@ -57,7 +57,8 @@
</div>
</div>
<div v-if="modelValue.light.backgroundType === 'image'" class="upload-side">
<div v-if="modelValue.light.backgroundType === 'image'" class="upload-center">
<div class="upload-side">
<el-upload
class="dashed-upload"
action=""
@ -78,6 +79,7 @@
</div>
</div>
</div>
</div>
<!-- Dark mode -->
<div class="mode-section">
@ -130,7 +132,8 @@
</div>
</div>
<div v-if="modelValue.dark.backgroundType === 'image'" class="upload-side">
<div v-if="modelValue.dark.backgroundType === 'image'" class="upload-center">
<div class="upload-side">
<el-upload
class="dashed-upload"
action=""
@ -152,6 +155,7 @@
</div>
</div>
</div>
</div>
<!-- 预览区域 -->
<div class="preview-section">
@ -408,6 +412,8 @@ export default {
border-radius: 8px;
padding: 8px;
height: 100%;
box-sizing: border-box;
overflow: hidden;
}
.mode-buttons {
margin-bottom: 10px;
@ -418,12 +424,29 @@ export default {
align-items: stretch;
gap: 12px;
flex-wrap: nowrap;
width: 100%;
max-width: 100%;
box-sizing: border-box;
overflow: hidden;
}
.color-stack {
display: flex;
flex-direction: column;
gap: 10px;
min-width: 0;
flex: 0 0 auto;
max-width: 100%;
}
.upload-center {
display: flex;
flex: 1;
justify-content: center;
align-items: center;
min-width: 120px;
max-width: 100%;
overflow: visible;
box-sizing: border-box;
padding: 0 10px;
}
.color-item {
display: flex;
@ -453,24 +476,27 @@ export default {
border-radius: 4px;
}
.dashed-upload {
display: flex;
width: 100%;
box-sizing: border-box;
border: none;
padding: 0;
}
.dashed-upload {
display: flex;
flex: 1;
justify-content: center;
}
.dashed-upload .el-upload-dragger {
border: 2px dashed #909399;
border-radius: 4px;
padding: 2px 0;
width: 100px;
min-width: 100px;
max-width: 100px;
display: inline-flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
box-sizing: border-box;
flex-shrink: 0;
}
.upload-row .file-name,
.inline-upload .file-name,
@ -483,9 +509,14 @@ export default {
flex-direction: column;
justify-content: center;
gap: 4px;
width: 120px;
min-width: 120px;
max-width: 120px;
flex-shrink: 0;
flex-grow: 0;
align-items: flex-start;
align-self: stretch;
box-sizing: border-box;
overflow: visible;
}
.dashed-upload .el-upload__text {
font-size: 12px;