feat(Table-> CustomerCell): helpMessage支持传递 tsx 和 h函数的数据

pull/40/MERGE
xingyu 2023-11-09 11:31:33 +08:00
parent 28b21bb466
commit 403ec7cfa3
2 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,5 @@
<script lang="tsx">
import type { CSSProperties } from 'vue'
import type { CSSProperties, PropType, VNodeChild } from 'vue'
import { computed, defineComponent, unref } from 'vue'
import { Tooltip } from 'ant-design-vue'
import { InfoCircleOutlined } from '@ant-design/icons-vue'
@ -35,7 +35,9 @@ const props = {
/**
* Help text list
*/
text: { type: [Array, String] as PropType<string[] | string> },
text: {
type: [Array, String, Object] as PropType<string[] | string | VNodeChild | JSX.Element>,
},
}
export default defineComponent({
@ -65,7 +67,7 @@ export default defineComponent({
)
})
}
return null
return <div>{textList}</div>
}
return () => {

View File

@ -438,7 +438,7 @@ export interface BasicColumn extends ColumnProps<Recordable> {
defaultHidden?: boolean
// Help text for table column header
helpMessage?: string | string[]
helpMessage?: string | string[] | VNodeChild | JSX.Element
format?: CellFormat