From 0413be595dbc3e94f6228a38092e2a15f4a7fd08 Mon Sep 17 00:00:00 2001 From: xingyu Date: Fri, 19 May 2023 11:36:12 +0800 Subject: [PATCH] fix: renderImg --- src/components/Table/src/hooks/useRender.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Table/src/hooks/useRender.ts b/src/components/Table/src/hooks/useRender.ts index 57eaa468..a7e4eb1a 100644 --- a/src/components/Table/src/hooks/useRender.ts +++ b/src/components/Table/src/hooks/useRender.ts @@ -1,7 +1,7 @@ import { h } from 'vue' import dayjs from 'dayjs' import { Button, Tag } from 'ant-design-vue' -import { isArray } from '@/utils/is' +import { isArray, isString } from '@/utils/is' import { DictTag } from '@/components/DictTag' import { Icon } from '@/components/Icon' import TableImg from '../components/TableImg.vue' @@ -16,7 +16,7 @@ export const useRender = { if (text) { if (isArray(text)) { return h(TableImg, { imgList: text }) - } else { + } else if (isString(text)) { return h(TableImg, { imgList: [text] }) } }