react-native - React Navigation v5 中的 setOptions 内的 CardStyleInterpolators
问题描述
我正在尝试根据请求的来源更改转换样式。我可以做这样的事情吗?
navigation.setOptions({
CardStyleInterpolator: ({ CardStyleInterpolators }) => {
if (route.params?.cleanup == 1) {
CardStyleInterpolators.forVerticalIOS;
} else {
CardStyleInterpolators.forHorizontalIOS;
}
},
}}
解决方案
推荐阅读
- r - 在同一数据框中,基于“:”在日期框中分隔多个列?
- python - 如何使用 Python 跳过 Json 文件中的字段
- django - django 表单下拉选项显示“对象”而不是模型的字符串表示 __str__
- python - 使用带有 scipy 的 Statsmodels 的公式 - Python
- python-3.x - 更改scrapy日志记录级别不起作用
- kotlin - 在 kotlin 中可变的列表类型可以在 java 中使用吗?
- reactjs - 使用 JWT 响应身份验证
- vba - 试图找到一组数字
- java - 基于窗口和元素计数从数据流写入 GCS
- javascript - 将变量分配给 div 标签中的属性