mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: style optimize
This commit is contained in:
parent
c4c0ba0b38
commit
4ade65ee00
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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'), {
|
||||
|
|
|
|||
Loading…
Reference in New Issue