fix: style optimize
parent
c4c0ba0b38
commit
4ade65ee00
|
|
@ -8,10 +8,13 @@
|
||||||
:on-change="(file: any, fileList: any) => uploadFile(file, fileList)"
|
:on-change="(file: any, fileList: any) => uploadFile(file, fileList)"
|
||||||
v-model:file-list="model_value"
|
v-model:file-list="model_value"
|
||||||
multiple
|
multiple
|
||||||
|
:show-file-list="false"
|
||||||
>
|
>
|
||||||
<el-button type="primary">{{ $t('chat.uploadFile.label') }}</el-button>
|
<el-button type="primary">{{ $t('chat.uploadFile.label') }}</el-button>
|
||||||
<template #file="{ file }">
|
</el-upload>
|
||||||
<el-card style="--el-card-padding: 0" shadow="never" class="upload_content">
|
<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
|
<div
|
||||||
class="flex-between"
|
class="flex-between"
|
||||||
:class="[inputDisabled ? 'is-disabled' : '']"
|
:class="[inputDisabled ? 'is-disabled' : '']"
|
||||||
|
|
@ -33,7 +36,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-space>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, inject, ref, useAttrs } from 'vue'
|
import { computed, inject, ref, useAttrs } from 'vue'
|
||||||
|
|
@ -122,5 +125,28 @@ const uploadFile = async (file: any, fileList: Array<any>) => {
|
||||||
cursor: not-allowed;
|
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>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -335,7 +335,7 @@ function submitCodemirrorEditor(val: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
if (isEdit.value || !areAllValuesNonEmpty(form.value)) {
|
if (!areAllValuesNonEmpty(form.value)) {
|
||||||
visible.value = false
|
visible.value = false
|
||||||
} else {
|
} else {
|
||||||
MsgConfirm(t('common.tip'), t('views.tool.tip.saveMessage'), {
|
MsgConfirm(t('common.tip'), t('views.tool.tip.saveMessage'), {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue