小编Kar*_*Ots的帖子

反应原生导航 v5 选项卡按不工作

如代码所示,没有调用 tabPress,是我做错了还是我遗漏了什么,不幸的是我没有找到任何反应导航版本 5 的代码示例。

<Tab.Navigator labeled={false} barStyle={{backgroundColor: '#ffffff', height: 55}} options={{
        tabPress: ({navigation}) => {
            console.log('nav tab press triggered')
        }
    }}>
        <Tab.Screen name={`DeviceNavigatorTab`} component={DeviceNavigator} options={{
            tabBarIcon: ({tintColor}) => <Image source={require('../../images/feather_home-menu.png')}
                                                style={{width: 26, height: 26, tintColor}}/>,
            tabPress: ({navigation}) => {
                console.log('tab press triggered')
            }
        }} tabPress={() => { console.log('prop tab pressed') }}/>
        <Tab.Screen name={`AlarmNavigatorTab`} component={AlarmNavigator} options={{
            tabBarIcon: ({tintColor}) => <Image source={require('../../images/feather_alert-circle.png')}
                                                style={{width: 26, height: 26, tintColor}}/>,
        }}/>
        <Tab.Screen name={`ProfileNavigatorTab`} component={ProfileNavigator} options={{
            tabBarIcon: ({tintColor}) => <Image source={require('../../images/feather_user.png')}
                                                style={{width: 26, height: 26, tintColor}}/>, …
Run Code Online (Sandbox Code Playgroud)

react-native react-navigation-bottom-tab react-navigation-v5

8
推荐指数
1
解决办法
7455
查看次数

NodeJs 命令在 Ubuntu 14.04、nodemon、forever 和 node 上无法正常工作

NodeJs 是最新版本,npm 是最新版本,它们都可以工作。

我的问题是,当我尝试运行时nodemon exampleFile.js,它什么也没有返回,也没有发生任何事情,与永远一样,forever start exampleFile.js我也尝试在全局范围内安装它们,但结果是相同的。

我尝试重新启动服务器,仍然没有任何结果!

还有 1 个问题,当我运行时node exampleFile.js,它不起作用,行为相同,不返回任何内容,但当我运行时nodejs exampleFile.js,它工作得很好!

示例文件内容:

var io = require('socket.io').listen(5555);
var login = io.of('/login').on('connection', function (socket) {});
var notify = io.of('/notifications').on('connection', function (socket) { });
var chat = io.of('/chat').on('connection', function (socket) { });
Run Code Online (Sandbox Code Playgroud)

如果这里有人可以帮助我解决损坏的服务器以及如何修复它,请帮助我!

操作系统 Ubuntu 14.04

node.js ubuntu-14.04

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