We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问题描述 如下代码,在index.js中使用CardList组件两次,分别有两个数据源。 操作: npm run dev:swan 现象: 第一个组件渲染正常,className都有,第二个组件数据可以正常渲染,但是className丢失,样式无法正常渲染。
index.js : <View className='jrth'}>今日特惠</View> <CardList source={this.getState().items1} prefixurl={this.getState().prefixUrl}></CardList> <View className='jrth'}>特惠福利</View> <CardList source={this.getState().items2} prefixurl={this.getState().prefixUrl}></CardList> cardList.js: render () { return ( <View className='rec-list clearfix'> {this.props.source.map((item) => <View className='rec_item pull-left' key={item.id} data-id={item.uid}> <View className='item_bg' style={'background:url('+ this.props.prefixurl + item.icon +') no-repeat 50% 50% / 100% auto'}></View> {item.online && <View className='item_online'> <View className='item_online_dot'></View>在线 </View> } <View className='item_player'>{item.name}</View> <View className='item_money'>{item._price/100}元/小时</View> <View className='item_type item_type01'>{item._name}</View> <View className='item_num'>{item._num}单</View> </View> )} </View> ) }
期望行为 组件内能重复使用同一个组件多次
系统信息
补充信息 查看swan编译dist中CardList组件.swan文件,编译后的class都有。
The text was updated successfully, but these errors were encountered:
欢迎提交 Issue~
如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏
如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。
Good luck and happy coding~
Sorry, something went wrong.
No branches or pull requests
问题描述
如下代码,在index.js中使用CardList组件两次,分别有两个数据源。
操作: npm run dev:swan
现象: 第一个组件渲染正常,className都有,第二个组件数据可以正常渲染,但是className丢失,样式无法正常渲染。
期望行为
组件内能重复使用同一个组件多次
系统信息
补充信息
查看swan编译dist中CardList组件.swan文件,编译后的class都有。
The text was updated successfully, but these errors were encountered: