fix: 预览支持图片等内容展示

This commit is contained in:
sy2084 2024-08-09 10:50:15 +08:00
parent 00112726a0
commit 4fec5b0804
2 changed files with 11 additions and 4 deletions

View File

@ -42,14 +42,14 @@
}
// 设置分页器
:deep(.@{ant-prefix}-pagination) {
&-item-active {
:deep(.@{ant-prefix}-pagination-item) {
&-active {
border-color: @primary-color !important;
a {
color: @primary-color !important;
}
}
&-item-link-icon {
&-link-icon {
color: @primary-color !important;
}
}

View File

@ -99,7 +99,14 @@
:scroll="{ x: 1000, y: `calc(100vh - 260px)` }"
size="small"
bordered
></a-table>
>
<template #bodyCell="{ column, record }">
<a-image v-if="column.show_type === 'img'" :src="record[column.dataIndex]" :width="160" />
<a v-else-if="column.show_type === 'link'" target="_blank" :href="record[column.dataIndex]">{{ record[column.dataIndex] }}</a>
<div v-else-if="column.show_type === 'richText'" v-html="record[column.dataIndex]"></div>
<template v-else>{{ record[column.dataIndex] }}</template>
</template>
</a-table>
<a-pagination
v-model:current="previewData.page"
:total="previewData.total"