// 使用FlatList实现多选
private showFlatListMulti() {
let dataList = this.state.data
if (dataList && dataList.length) {
const extraUniqueKey = () => Math.random().toString();
const renderAssertItem = (render: ListRenderItemInfo<any>) => {
return (
<View>
<RadioItem
key={render.index}
style={
{ height: 45 }}
checked={render.item.checkedflag}
onChange={(event: any) => {
let oData: any = this.state.data;
let oNew: any[] = [];
oData.map((fItem: any) => {
// 将当前选中标记取反
if (render.item.promotionEvaId === fItem.promotionEvaId) {
使用RadioItem实现多选、FlatList多选功能
最新推荐文章于 2023-08-14 15:38:06 发布