草庐IT

NAVIGATION_MODE_TABS

全部标签

javascript - undefined 不是一个对象(评估 '_this2.props.navigation.navigate' ) - React Native

我真的无法让我的导航正常工作。我正在使用react-navigation(StackNavigator)。这是我的结构:http://i.imgur.com/IKExx9g.png我的导航在HomeScreen.js中工作:我从HomeScreen.js导航到NewScreen.js没有问题。App.js:importReactfrom'react';import{StatusBar,AppRegistry}from'react-native';import{StackNavigator}from'react-navigation';import{HomeScreen}from'./s

javascript - tabs.getCurrent() 结果未定义?

不知道为什么当我导航到amazon.com或google.com并点击浏览器图标进行浏览器操作时,我无法使用getCurrent()检索有关当前选项卡的信息。关于我遗漏了什么的任何提示?list:{"name":"testGetCurrentTab","version":"1.0","description":"","manifest_version":2,"icons":{"48":"icons/icon-48.png"},"permissions":["tabs",""],"browser_action":{"default_icon":"icon/icon-32.png"},"b

javascript - 如何在 React Navigation 中深度链接到嵌套导航器?

我的导航结构如下:constApp=()=>{constprefix='test://';return;};constAppNavigator=createSwitchNavigator({splash:SplashScreen,auth:AuthStack,main:HomeStack,});constAuthStack=createStackNavigator({landing:LandingScreen,login:{screen:LoginScreen,path:'page/login',},register:{screen:RegisterScreen,path:'page/

javascript - React navigation didfocus 事件监听器在类组件和功能组件之间的工作方式不同

当我转换到此屏幕时,它会执行一些API调用以获取最新数据。但是当我从另一个带有钩子(Hook)版本的导航堆栈转换时,它似乎不会触发didFocus事件来触发api调用,而它与类版本一起工作。如何使hooks版本与class版本具有相同的行为?这两个版本有什么区别?类组件版本classsomeScreenextendsComponent{componentDidMount(){const{navigation,}=this.props;this.navFocusListener=navigation.addListener('didFocus',()=>{//dosomeAPIcalls

javascript - React-Navigation - 标题与其屏幕组件的交互,失败的 Prop 类型

我正在关注React-Navigation教程,并卡在标题为Headerinteractionwithitsscreencomponent的部分.Thecode在教程中,在snack提供的模拟器中工作正常,但我发现在本地运行时遇到以下错误:警告:Prop类型失败:Prop“onPress”在“按钮”中被标记为必需,但其值为“未定义”。我通过更改navigationOptions中的onPress事件分配,设法使用expo-cli在我的本地机器上运行代码,如下所示(mysnackhere):{navigation.getParam('increaseCount')()}}//onPres

javascript - React-navigation: "You should only render one navigator"- 但我只有一个

我刚刚将react-navigation升级到v2.0-rc9,它会提示Youshouldonlyrenderonenavigatorexplicitlyinyourapp,andothernavigatorsshouldbyrenderedbyincludingtheminthatnavigator.我只有一个导航器,如下图,我不明白那是从哪里来的。您能否指出该错误的可能原因?下面是我的根组件和我创建导航器的方式。根.js:importReact,{PureComponent}from'react';import{Provider}from'react-redux';importst

javascript - chrome.tabs.executeScript : How to get access to variable from content script in background script?

如何从后台脚本background.js中的内容脚本app.js访问变量app?以下是我的尝试方式(background.js):chrome.tabs.executeScript(null,{file:"app.js"},function(){app.getSettings('authorizeInProgress');//...});这是我得到的:这是manifest.json:{"name":"ctrl-vk","version":"0.1.3","manifest_version":2,"description":"Chromeextensionforctrl+vinserti

javascript - 如何在 Meteor 中使用 Materialize css Tabs?

Meteor.js的新功能和MaterializeCSSFramework.我不完全理解如何将选项卡动态地连接到3个不同的选项卡,因此当用户单击它时,.tabindicator/active属性会随着所需的路线路径。如果我这样做:client/app.htmlPageOnePageTwoPageThreeclient/app.jsTemplate.layout.rendered=function(){$('ul.tabs').tabs();}选项卡指示器有效,但它不会更改指向正确页面的链接。就像它阻止了转到页面的能力一样。我需要有关如何执行此操作的帮助,我已经这样做了一段时间了。谢谢。

javascript - md-tabs 在其重复对象发生更改时失去范围 [AngularJS Material ]

请看这个codepen只要您单击UseDummy2btn,它只会更改md-tabs重复的变量,我就会松开$scope.selectedIndex值。$scope.selectedIndex重置为0,第一个选项卡被选中。如何在更改$scope.lineDirections后保持选中的选项卡?我试过使用$rootScope.selectedIndex但还是不行。 最佳答案 ng-tab有数组“lineDirections”的观察者,在这个观察者中,他们正在重置attrmd-selected(“selectedIndex”)的值,您可以使

firebase - Sec-Fetch-Mode 而不是 Preflight

我创建了登录FE并完成了它。和往常一样,我的ajaxgoto是Axios。我的代码如下。constbaseUrl=http://localhost:5000/project/us-central1/apiAxios.post(`${baseUrl}/v1/user/login`,{...data},{headers:{Authorization:'Basicauth...'}},).then(r=>console.log(r).catch(e=>console.log(e));现在,当我尝试向我的本地firebase云函数发送请求时。我收到400错误请求。检查请求后,我想知道为什么它没