fix: style optimize
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run

This commit is contained in:
wangdan-fit2cloud 2025-09-02 12:15:15 +08:00
parent c4c0ba0b38
commit 4ade65ee00
2 changed files with 30 additions and 4 deletions

View File

@ -8,10 +8,13 @@
:on-change="(file: any, fileList: any) => uploadFile(file, fileList)"
v-model:file-list="model_value"
multiple
:show-file-list="false"
>
<el-button type="primary">{{ $t('chat.uploadFile.label') }}</el-button>
<template #file="{ file }">
<el-card style="--el-card-padding: 0" shadow="never" class="upload_content">
</el-upload>
<el-space wrap class="w-full media-file-width upload_content mt-16">
<template v-for="(file, index) in model_value" :key="index">
<el-card style="--el-card-padding: 0" shadow="never">
<div
class="flex-between"
:class="[inputDisabled ? 'is-disabled' : '']"
@ -33,7 +36,7 @@
</div>
</el-card>
</template>
</el-upload>
</el-space>
</template>
<script setup lang="ts">
import { computed, inject, ref, useAttrs } from 'vue'
@ -122,5 +125,28 @@ const uploadFile = async (file: any, fileList: Array<any>) => {
cursor: not-allowed;
}
}
&.media-file-width {
:deep(.el-space__item) {
width: calc(50% - 4px) !important;
}
}
}
@media only screen and (max-width: 768px) {
.upload_content {
&.media-file-width {
:deep(.el-space__item) {
min-width: 100% !important;
}
}
}
}
.debug-ai-chat {
.upload_content {
&.media-file-width {
:deep(.el-space__item) {
min-width: 100% !important;
}
}
}
}
</style>

View File

@ -335,7 +335,7 @@ function submitCodemirrorEditor(val: string) {
}
function close() {
if (isEdit.value || !areAllValuesNonEmpty(form.value)) {
if (!areAllValuesNonEmpty(form.value)) {
visible.value = false
} else {
MsgConfirm(t('common.tip'), t('views.tool.tip.saveMessage'), {