fix: cellRender CellImages
parent
382757b458
commit
5fefb334af
|
@ -17,7 +17,13 @@ import {
|
||||||
isString,
|
isString,
|
||||||
} from '@vben/utils';
|
} from '@vben/utils';
|
||||||
|
|
||||||
import { Button, Image, Popconfirm, Switch } from 'ant-design-vue';
|
import {
|
||||||
|
Button,
|
||||||
|
Image,
|
||||||
|
ImagePreviewGroup,
|
||||||
|
Popconfirm,
|
||||||
|
Switch,
|
||||||
|
} from 'ant-design-vue';
|
||||||
|
|
||||||
import { DictTag } from '#/components/dict-tag';
|
import { DictTag } from '#/components/dict-tag';
|
||||||
import { $t } from '#/locales';
|
import { $t } from '#/locales';
|
||||||
|
@ -84,7 +90,11 @@ setupVbenVxeTable({
|
||||||
renderTableDefault(_renderOpts, params) {
|
renderTableDefault(_renderOpts, params) {
|
||||||
const { column, row } = params;
|
const { column, row } = params;
|
||||||
if (column && column.field && row[column.field]) {
|
if (column && column.field && row[column.field]) {
|
||||||
return row[column.field].map((item: any) => h(Image, { src: item }));
|
return h(ImagePreviewGroup, {}, () => {
|
||||||
|
return row[column.field].map((item: any) =>
|
||||||
|
h(Image, { src: item }),
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue