vue3在父组件的jsx代码中使用具名插槽我们可以使用v-slots
- (h: any, scoped: any) => {
- return (
- <div class="tdesignbox">
- <BasicButton
- v-slots={{
- mount: () => {
- return (
- <>
- <t-tooltip content="具名插槽绑定">
- <t-button
- shape="circle"
- variant="text"
- onClick={() => handleButton('mount', scoped.row)}
- >
- <MouseIcon />
- t-button>
- t-tooltip>
- >
- )
- }
- }}
- >BasicButton>
-
子组件
- <slot name="mount" />