【发布时间】:2019-11-10 16:34:51
【问题描述】:
我有一张地图,如果我在每个项目上按索引制作功能,我想要
<ActionSheet
ref={o => this.ActionSheet = o}
title={'Which one do you like ?'}
options={['Delete', 'Edit','Hide', 'Cancel']}
cancelButtonIndex={3}
destructiveButtonIndex={1}
onPress={(index) => { ?????????}
/>
我想如果我按下 index=0 使这个函数 >>this.delete 如果索引 = 1,则执行此功能 >>Actions.editpost.. 我该怎么做??
【问题讨论】:
-
创建函数是什么意思?你的意思是调用一个函数?还是实际构造一个函数定义?
-
调用函数
标签: react-native