Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在反应导航中传递和获取参数?我努力了
this.props.navigation.getParams('name',defaultValue)
获取参数。
获取参数:
const name = props.route.params.name
传递参数:
navigation.navigate({ name: 'RouteName', params: { name: 'nameParam' } })
或者:
navigation.navigate('RouteName', {name: 'nameParam'})
我有一个带有输入字段和保存按钮的 jsf 表单,如下面的代码所示。我想要实现的是,当单击保存按钮时,应使用正则表达式模式验证输入。如果验证失败,则不应显示保存确认对话框。否则会显示保存确认对话框,让用户选择是否保存。
在下面的代码中,尽管有条件 onclick="if(#{conditionOK}),但始终显示对话框。我不希望显示确认对