跳到主要内容
版本:3.x

NativeSlot

编译的原生组件支持使用 slot 插槽

支持情况:

参考文档

类型

ComponentType<NativeSlotProps>

示例代码

import { NativeSlot, View } from '@tarojs/components'

export default function () {
render () {
return (
<View>
<NativeSlot />
</View>
)
}
}

NativeSlotProps

参数类型默认值必填说明
namestringnone指定插入的 slot 位置

API 支持度

API微信小程序百度小程序支付宝小程序抖音小程序QQ 小程序京东小程序H5React NativeHarmony
NativeSlotProps.name✔️✔️✔️✔️✔️✔️