Skip to content

Commit

Permalink
fix: 图片空数据处理
Browse files Browse the repository at this point in the history
  • Loading branch information
Barrior committed Jul 4, 2024
1 parent fc44449 commit 9601bc2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/search-table-react/src/valueTypes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ export const BUILT_IN_VALUE_TYPES: ITableProps['registerValueType'] = {
* 图片显示
*/
images: ({ value, options }) => {
// 排除空数据
if (isEmpty(value)) {
return '-'
}
const imgList = isArray(value) ? value : [value]
return <ImagesPreview imgList={imgList} options={options} />
},
Expand Down

0 comments on commit 9601bc2

Please sign in to comment.