精华内容
下载资源
问答
  • navigation

    2006-02-16 11:27:00
    <navigation-rule> <from-view-id>/OrderError.jsp <navigation-case> <from-outcome>retry <to-view-id>/PlaceOrder.jsp </navigation-case> </navigation-rule> <navigation-rule> <from-view-id>/PlaceOrder.jsp ...
    <navigation-rule>
    <from-view-id>/OrderError.jsp</from-view-id>
    <navigation-case>
    <from-outcome>retry</from-outcome>

    <to-view-id>/PlaceOrder.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/PlaceOrder.jsp</from-view-id>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/ConfirmOrder.jsp</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>failure</from-outcome>
    <to-view-id>/OrderError.jsp</to-view-id>
    <redirect/>
    </navigation-case>
    </navigation-rule>
    展开全文
  • navigationdrawer

    千次下载 热门讨论 2013-10-10 15:17:31
    Navigation Drawer是从屏幕的左侧滑出,显示应用导航的视图 http://blog.csdn.net/xyz_lmn/article/details/12523895
  • 在VUE中路由遇到Error: Avoided redundant navigation to current location:报错显示是路由重复, 虽然对项目无影响,但是看到有红的还是不舒服。 于是查了一下发现可以这样解决 在你引入VueRouter的时候再加上一句...

    在VUE中路由遇到Error: Avoided redundant navigation to current location:报错显示是路由重复,
    在这里插入图片描述
    虽然我项目中引入的是vant,
    在这里插入图片描述

    但是不管你引入的是什么ui框架,报错本质不变,
    虽然对项目无影响,但是看到有红的还是不舒服。
    于是查了一下发现可以这样解决
    在你引入VueRouter的时候再加上一句话(我是在mainJs里面,你们可根据自身情况添加):
    在这里插入图片描述

    const originalPush = VueRouter.prototype.push
       VueRouter.prototype.push = function push(location) {
       return originalPush.call(this, location).catch(err => err)
    }
    

    这样就可以解决此报错。

    觉得有用的可以用你们即将年薪上50w的双手给博主点个赞吗~~ 爱你们哟

    有你们的支持是我最大的动力~

    后续会常更新一些项目问题,以及一些技术问题

    展开全文
  • react-navigation Navigation使用

    万次阅读 热门讨论 2017-03-31 16:54:01
    react-navigation Navigation使用

    效果:


    首先,在项目目录下,安装react-navigation库:

    npm install --save react-navigation

    具体代码实现:

    index.android.js:

    /**
     * Sample React Native App
     * https://github.com/facebook/react-native
     * @flow
     */
    
    import {
      AppRegistry,
    } from 'react-native';
    import rootApp from './js/rootApp'
    AppRegistry.registerComponent('GankProject', () => rootApp);
    
    rootAp.js:
    /**
     * Created by Administrator on 2017/3/31 0031.
     */
    'use strict'
    import React from 'react';
    import {
        AppRegistry,
        Text,View,Button,
    } from 'react-native';
    import { StackNavigator } from 'react-navigation';
    import ChatScreen from './ChatScreen';
    class HomeScreen extends React.Component {
        static navigationOptions = {
            title: 'Welcome',//设置标题内容
        };
    
        render() {
            const { navigate } = this.props.navigation;
            return (
                <View>
                    <Text>Hello, Navigation!</Text>
                    <Button
                        onPress={() => navigate('Chat',{user:'Lucy'})}
                        title="Chat with Lucy"/>
                </View>
            );
        }
    }
    
    const SimpleApp = StackNavigator({
        Home: {screen: HomeScreen},
        Chat:{screen:ChatScreen},
    
    });
    
    export default SimpleApp;

    navigate('Chat',{user:'Lucy'})} 意思说:跳转到Chat指的组件,并且带过去的参数key是user,value是Lucy。

    ChatScreen.js:

    /**
     * Created by Administrator on 2017/3/31 0031.
     */
    'use strict'
    import React,{Component} from 'react';
    import {View,Text} from 'react-native';
    class ChatScreen extends Component{
        static navigationOptions = {
            title:'Chat with Lucy',
        };
        render(){
            const {params} = this.props.navigation.state;
            return(
                <View>
    
                    <Text>Chat with {params.user}</Text>
                </View>
            );
        }
    }
    export default ChatScreen;
    

    {params.user}意思是接收前面传过来的值,user是前面的key。


    参考资料:https://reactnavigation.org/docs/intro/

    展开全文
  • 转载来自React Navigation(需要科学上网):https://reactnavigation.org/docs/navigators/navigation-prop Screen Navigation Prop:  Each screen in your app will receive a navigation prop which contain the...


    转载来自React Navigation(需要科学上网)https://reactnavigation.org/docs/navigators/navigation-prop

    ------------------------------------------------------------------------------------------------------

    第二次编辑补充:

      React Navigation:
      NavigationActions中的back方法的用法,举例:栈中有A/B/C/D四个页面,栈顶是D,从D直接跳转到A,
      那么需要在B加载的时候就记下B的key,通过this.props.navigation.state.key得到,记录在一个全局变量中,
      然后this.props.navigation.dispatch(NavigationActions.back({key: '记录在全局变量中的那个key'}));

    -------------------------------------------------------------------------------------------------------


    Screen Navigation Prop:

      Each screen in your app will receive a navigation prop which contain the following:
      1. navigate - (helper) link to other screens
      2. state - screen's current state/routes
      3. setParams - (helper) make changes to route's params
      4. goBack - (helper) close active screen and move back
      5. dispatch - send an action to router
      详细介绍:
      1. navigate - Link to other screens 
    Call this to link to another screen in your app. Takes the following arguments:
    navigate(routeName, params, action)
    routeName - A destination routeName that has been registered somewhere in the app's router
    params - Params to merge into the destination route
    action - (advanced) The sub-action to run in the child router, if the screen is a navigator. 
    See Actions Doc for a full list of supported actions.
    class HomeScreen extends React.Component {
      render() {
        const {navigate} = this.props.navigation;
        return (
          <View>
            <Text>This is the home screen of the app</Text>
            <Button
              onPress={() => navigate('Profile', {name: 'Brent'})}
              title="Go to Brent's profile"
            />
          </View>
         )
       }
    }


      2. state - The screen's current state/route 
    A screen has access to its route via this.props.navigation.state. Each will return an object with the following:
    {
      // the name of the route config in the router
      routeName: 'profile',
      //a unique identifier used to sort routes
      key: 'main0',
      //an optional object of string options for this screen
      params: { hello: 'world' }
    }
    class ProfileScreen extends React.Component {
      render() {
        const {state} = this.props.navigation;
        // state.routeName === 'Profile'
        return (
          <Text>Name: {state.params.name}</Text>
        );
      }
    }


      3. setParams - Make changes to route params 
    Firing the setParams action allows a screen to change the params in the route, 
    which is useful for updating the header buttons and title.
    class ProfileScreen extends React.Component {
      render() {
        const {setParams} = this.props.navigation;
        return (
          <Button
            onPress={() => setParams({name: 'Lucy'})}
            title="Set title name to 'Lucy'"
          />
         )
       }
    }


      4. goBack - Close the active screen and move back 
    Optionally provide a key, which specifies the route to go back from. By default, 
    goBack will close the route that it is called from. If the goal is to go back anywhere, 
    without specifying what is getting closed, call .goBack(null);
    class HomeScreen extends React.Component {
      render() {
        const {goBack} = this.props.navigation;
        return (
          <View>
            <Button
              onPress={() => goBack()}
              title="Go back from this HomeScreen"
            />
            <Button
              onPress={() => goBack(null)}
              title="Go back anywhere"
            />
            <Button
              onPress={() => goBack('screen-123')}
              title="Go back from screen-123"
            />
          </View>
         )
       }
    }


      5. dispatch - Send an action to the router 
    Use dispatch to send any navigation action to the router. The other navigation functions use dispatch behind the scenes.
    Note that if you want to dispatch react-navigation actions you should use the action creators provided in this library.
    See Navigation Actions Docs for a full list of available actions.
    import { NavigationActions } from 'react-navigation'


    const navigateAction = NavigationActions.navigate({
      routeName: 'Profile',
      params: {},


      // navigate can have a nested navigate action that will be run inside the child router
      action: NavigationActions.navigate({ routeName: 'SubProfileRoute'})
    })
    this.props.navigation.dispatch(navigateAction)




    Navigation Actions 
    All Navigation Actions return an object that can be sent to the router using navigation.dispatch() method.
    Note that if you want to dispatch react-navigation actions you should use the action creators provided in this library.
    The following actions are supported:
      1. Navigate - Navigate to another route
      2. Reset - Replace current state with a new state
      3. Back - Go back to previous state
      4. Set Params - Set Params for given route
      5. Init - Used to initialize first state if state is undefined


      1. Navigate 
    The Navigate action will update the current state with the result of a Navigate action.
    routeName - String - Required - A destination routeName that has been registered somewhere in the app's router
    params - Object - Optional - Params to merge into the destination route
    action - Object - Optional - (advanced) The sub-action to run in the child router, if the screen is a navigator.
     Any one of the actions described in this doc can be set as a sub-action.
    import { NavigationActions } from 'react-navigation'

    const navigateAction = NavigationActions.navigate({

      routeName: 'Profile',

      params: {},

      action: NavigationActions.navigate({ routeName: 'SubProfileRoute'})
    })


    this.props.navigation.dispatch(navigateAction)


      2. Reset 
    The Reset action wipes the whole navigation state and replaces it with the result of several actions.
    index - number - required - Index of the active route on routes array in navigation state.
    actions - array - required - Array of Navigation Actions that will replace the navigation state.
    import { NavigationActions } from 'react-navigation'


    const resetAction = NavigationActions.reset({
      index: 0,
      actions: [
        NavigationActions.navigate({ routeName: 'Profile'})
      ]
    })
    this.props.navigation.dispatch(resetAction)


    How to use the index parameter 
    The index param is used to specify the current active route.
    eg: given a basic stack navigation with two routes Profile and Settings.
     To reset the state to a point where the active screen was Settings but have it stacked on top of a Profile screen, 
     you would do the following:
    import { NavigationActions } from 'react-navigation'

    // reset方法的奥义
    const resetAction = NavigationActions.reset({
      index: 1,
      actions: [
        NavigationActions.navigate({ routeName: 'Profile'}),
        NavigationActions.navigate({ routeName: 'Settings'})
      ]
    })
    this.props.navigation.dispatch(resetAction)


      3. Back 
    Go back to previous screen and close current screen. back action creator takes in one optional parameter:
    key - string or null - optional - If set, navigation will go back from the given key. 
    If null, navigation will go back anywhere.
    import { NavigationActions } from 'react-navigation'


    const backAction = NavigationActions.back({
      key: 'Profile'
    })
    this.props.navigation.dispatch(backAction)


      4. SetParams 
    When dispatching SetParams, the router will produce a new state that has changed the params of a particular route, 
    as identified by the key
    params - object - required - New params to be merged into existing route params
    key - string - required - Route key that should get the new params
    import { NavigationActions } from 'react-navigation'


    const setParamsAction = NavigationActions.setParams({
      params: { title: 'Hello' },
      key: 'screen-123',
    })

    this.props.navigation.dispatch(setParamsAction)




    展开全文
  • ROS Navigation

    2020-01-30 11:48:36
    ROS与navigation教程-目录 说明: 介绍如何为机器人整合导航包,实现有效控制和自主导航等功能 目录: ROS与navigation教程-目录 ROS与navigation教程-设置机器人使用TF ROS与navigation教程-基本导航调试指南 ...
  • Navigation
  • bubble-navigation

    2019-04-15 15:44:34
    bubble-navigation 项目地址:gauravk95/bubble-navigation 简介:
  • 利用bottomNavigationView + navigation component能快速实现底部导航,只需要把navigation文件里的id和bottomNavigationView设置的menu里的id一致就可以实现,不用自己用supportFragmentManager切换fragment,还要...
  • 1、在build.gradle文件...implementation "androidx.navigation:navigation-fragment:2.1.0-alpha02" implementation "androidx.navigation:navigation-ui:2.1.0-alpha02" implementation 'com.google.android.mater...
  • 安卓NavigationView使用方法

    万次阅读 多人点赞 2018-09-15 16:17:58
    介绍NavigationView 布局文件、标签属性 导入依赖 使用Design下的NavigationView前导入依赖步骤 在这个页面中直接找到design这个依赖,点击后再点击这两个窗口上的OK按钮,等待编译完成就完成导入了! (可能...
  • navigation学习

    2017-02-21 13:19:24
    navigation教程:http://wiki.ros.org/navigation一.Setup and Configuration of the Navigation Stack on a Robot参考链接:http://blog.exbot.net/archives/1129 导航框架如下:
  • Navigation System

    2019-05-15 05:06:12
    NavMesh (short for Navigation Mesh)is a data structure which describes the walkable surfaces of the game world and allows to find path from one walkable location to another in the game world....
  • 应用中使用React Navigtation管理的每个screen组件都会被自动提供一个属性navigation。它看起来是这个样子的 : this.props.navigation navigate – 跳到其他屏 goBack – 关掉当前活跃屏 addListener – 订阅...
  • Navigation使用指南

    2020-08-11 18:22:34
    Navigation跳转 1.环境配置 在app model下配置: //build.gradle implementation deps.navigation.fragment_ktx implementation deps.navigation.ui_ktx 相关配置: //versions.gradle versions.navigation = ...
  • withNavigation withNavigation是一个更高阶的组件,它将navigationprop 传递给一个包装组件。当你不能navigation直接将prop 传递给组件时,或者在深度嵌套的子级的情况下不想传递它时,它很有用。 withNavigation...
  • Android JetPack navigation 结合 BottomNavigationView 组件使用 简要说一下流程 1. 添加依赖 在build.gradle文件中添加: ext.navigationVersion = "2.0.0" dependencies { //... implementation "androidx....
  • React-Navigation中withNavigation、withNavigationFocus高阶组件的使用 在2.18版本中的React-Navigation中有两个很实用的高阶组件,在这里我们进行说明一下: withNavigation withNavigation是一个高阶组件,它可以将...
  • 先上效果图: Navigation组件,也可以理解成FragmentNavigation。它提供了多Fragment...Navigation视图:在res/navigation包下面的xml视图资源,包括应用内所有单个内容区域以及用户可以通过应用获取的可能路径。
  • NavigationView

    2016-06-19 13:51:54
    一、 用途:NavigationView一般和DrawerLayout一起使用。 二、引入原因:当我们使用DrawerLayout的时候,我们完全可以将content和menu都写在一个XML中,但是引入NavigationView后,就可以简化我们的XML三、用法:...
  • ROS navigation分析:navigation框架

    千次阅读 2018-03-02 23:20:47
     ROS navigation stack是ROS提供的一个非常重要且常用的模块。它的主要作用是实现机器人的定位、导航和避障功能。在ROS wiki上,Maintainer把它的功能归纳为:“It takes in information from odometry and sensor ...
  • Hello React Navigation 在浏览器中,链接到其他页面你可以使用HTML锚点标签(anchor tag)&amp;amp;amp;lt;a&amp;amp;amp;gt;。当用户点击一个链接时,当前页面的URL被压到浏览器历史记录栈中。当用户点击了...
  • Navigation简单使用

    2020-07-14 00:26:26
    Navigation简单使用 针对Jitpack 组件中 Navigation的简单使用说明。 添加依赖 需要在对应模块层级的build.gradle文件中添加依赖: //版本指定为当时的最新稳定版本 ext.navigationVersion = "2.0.0" dependencies {...
  • jetpack navigation 组件化

    2020-09-18 10:06:04
    navigation 对于复杂的页面导航有优化方案吗?对于组件化,navigation是否支持?
  • ROS与navigation教程.pdf

    2019-10-05 22:32:01
     ROS 与 navigation 教程-目录  ROS 与 navigation 教程-设置机器人使用 TF  ROS 与 navigation 教程-基本导航调试指南  ROS 与 navigation 教程-安装和配置导航包  ROS 与 navigation 教程-结合 RVIZ 与...
  • Navigation Drawer

    万次阅读 2014-04-04 13:55:08
    Navigation Drawer是从屏幕的左侧滑出,显示应用导航的视图,覆盖在主视图上。 Navigation Drawer是Android团对在2013 google IO大会期间更新的Support库(V13)中新加入的重要的功能。 实现现Navigation ...
  • 在使用Navigation和BottomNavigationView作为APP导航时,避免Fragment重复创建可以使用以下方法解决。 binding.bottomNav.setOnNavigationItemSelectedListener { // 避免再次点击重复创建 if (it.isChecked) { r...
  • Navigation框架介绍

    千次阅读 2019-03-08 18:12:23
    Navigation框架 概述 Navigation,导航, Google官方对它的描述: 今天,我们宣布推出Navigation组件,作为构建您的应用内界面的框架,重点是让单 Activity 应用成为首选架构。利用Navigation组件对 Fragment 的...
  • 随着React Navigation逐渐稳定,Navigator也被光荣的退休了。在React Native生态环境中需要一款可扩展且易于使用的导航组件,Navigator 自然胜任不了,这时React Native社区便孕育出了一个开源导航组件React ...
  • Android 侧滑菜单的实现(NavigationView)

    万次阅读 多人点赞 2017-03-15 12:54:45
    很早之前就像写个android的侧滑菜单加入到项目中了,但是很多给的都是密密麻麻的代码,今天看到了简单快速的实现方法:通过NavigationView+DrawLayout来实现侧滑菜单的功能。Google I/O 2015 给大家带来了Android...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 54,944
精华内容 21,977
关键字:

navigation