修改媒体库显示样式

This commit is contained in:
jacky 2024-04-16 00:50:50 +08:00
parent 1c83cb1bf8
commit eaa9caa47c
2 changed files with 5 additions and 6 deletions

View File

@ -70,7 +70,7 @@ const previewSrcList = computed(() => props.preview ? [file.value] : [])
</script>
<style scoped>
.headerAvatar {
.headerAvatar1 {
display: flex;
justify-content: center;
align-items: center;

View File

@ -12,9 +12,10 @@
</div>
<el-table :data="tableData">
<el-table-column align="left" label="预览" width="120">
<el-table-column align="left" label="预览" width="110">
<template #default="scope">
<CustomPic pic-type="file" :pic-src="scope.row.url" preview />
<el-image :src="getUrl(scope.row.url)" class="file" fit="cover" :preview-src-list="[getUrl(scope.row.url)]"
:preview-teleported="true" style="width: 80px; height: 80px" />
</template>
</el-table-column>
<el-table-column align="left" label="日期" prop="UpdatedAt" width="180">
@ -51,6 +52,7 @@
</template>
<script setup>
import { getUrl } from '@/utils/image'
import { getFileList, deleteFile, editFileName } from '@/api/mediaFile'
import { downloadImage } from '@/utils/downloadImg'
import CustomPic from '@/components/customPic/index.vue'
@ -68,9 +70,6 @@ defineOptions({
const path = ref(import.meta.env.VITE_BASE_API)
const imageUrl = ref('')
const imageCommon = ref('')
const page = ref(1)
const total = ref(0)
const pageSize = ref(10)