[Question]
插槽指令使用出错
// 组件Carousel
<View className="carousel" ref={scrollbar}>
// 使用组件Carousel <Carousel> <View x-slot:carousel="progress" className="carousel-container"> <View>{progress}</View> </View> </Carousel>
找不到名称“progress”。你是否指的是“onprogress”?ts(2552) lib.dom.d.ts(17618, 13): 在此处声明了 "onprogress"。
请问哪一步出错了,我需要作用域插槽
// 组件Carousel
<View className="carousel" ref={scrollbar}> <slot x-bind:progress={progress} name="carousel">{children}</slot> </View>
// 使用组件Carousel
<Carousel> <View x-slot:carousel="progress" className="carousel-container"> <View>{progress}到底啦~~~~~~</View> </View> </Carousel>
现在的问题是我对供了作用域插槽 progress ,但在外部无法使用着这个数据