小编e4g*_*gle的帖子

为抽屉导航设置标题

我试图通过设置选项而不做任何更改来在 react navigation v5 中设置标题

<Drawer.Navigator
  initialRouteName='...'
>
  <Drawer.Screen
    name='...'
    component={Component}
    options={{ title: 'My home' }}
  />
</Drawer.Navigator>
Run Code Online (Sandbox Code Playgroud)

有没有办法让我的 React 导航标题放在抽屉里?

react-navigation

6
推荐指数
1
解决办法
2731
查看次数

强制 Tampermonkey 延迟运行/执行脚本

在 AJAX 加载每个文档后,如何强制 Tampermonkey 延迟运行/执行脚本?

我希望在我的脚本中访问这些元素并更改它们。但是,即使我在设置页面中设置@run-atdocument-end,它也会在文档未完全加载时执行。而且,它发生在这个特定的网站上!!

我尝试了这些方法但没有成功:

  1. 加载事件。
  2. 我尝试使用while语句来检查是否所有文档都已加载,然后继续执行我的脚本,但它崩溃并陷入无限循环。
  3. 我尝试使用控制台来执行一个函数(但控制台无法访问)。

那我该怎么办?

javascript ajax tampermonkey

4
推荐指数
1
解决办法
8222
查看次数

monorepo:带有纱线工作区并使用博览会安装的博览会

我试图建立一个反应,世博monorepo项目,一切似乎都很好,直到我想安装react-navigationexpo install根据反应导航文档,因为世博会安装使用的纱线在后台,因为它是一个工作空间环境这个错误弹出,这我不知道如何绕过。有任何想法吗?

yarn add v1.21.1
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
error Running this command will add the dependency to the workspace root rather than the workspace itself, which might not be what you 
want - if you really meant it, make it explicit by running this command again with the -W flag (or --ignore-workspace-root-check).     
yarnpkg exited with non-zero code: 1
Set EXPO_DEBUG=true in your env to view the stack trace.
Run Code Online (Sandbox Code Playgroud)

expo

3
推荐指数
1
解决办法
3165
查看次数

标签 统计

ajax ×1

expo ×1

javascript ×1

react-navigation ×1

tampermonkey ×1