HarmonyOS鸿蒙Next中SwiperController如何传递

HarmonyOS鸿蒙Next中SwiperController如何传递

在index中定义了

@Entry @Component export struct ProductDetailIndex { private swiperPicController: SwiperController = new SwiperController() GoodsDetailFullPicView({}) }

在子组件中GoodsDetailFullPicView 需要传递过来 swiperPicController,应该如何传递

@Component export struct GoodsDetailFullPicView{}


更多关于HarmonyOS鸿蒙Next中SwiperController如何传递的实战教程也可以访问 https://www.itying.com/category-93-b0.html

1 回复

更多关于HarmonyOS鸿蒙Next中SwiperController如何传递的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html


父子组件传值,可参考@Link装饰器或 @Provide@Consume装饰器。

回到顶部