perf: vxe img 渲染增加预览

This commit is contained in:
xingyu4j 2022-11-22 17:26:50 +08:00
parent 7b40e5a5e4
commit 270b68bd7b
2 changed files with 4 additions and 2 deletions

View File

@ -11,6 +11,7 @@ VXETable.renderer.add('XImg', {
style="width: 80px; height: 50px" style="width: 80px; height: 50px"
src={row[column.field]} src={row[column.field]}
key={row[column.field]} key={row[column.field]}
preview-src-list={[row[column.field]]}
fit="contain" fit="contain"
lazy lazy
></ElImage> ></ElImage>

View File

@ -39,8 +39,9 @@ const crudSchemas = reactive<VxeCrudSchema>({
title: '应用图标', title: '应用图标',
field: 'logo', field: 'logo',
table: { table: {
type: 'html', cellRender: {
formatter: 'formatImg' name: 'XImg'
}
} }
}, },
{ {