Skip to content

[vue] route和router有什么区别? #369

Open
@haizhilin2013

Description

@haizhilin2013
Collaborator

[vue] route和router有什么区别?

Activity

tjNane

tjNane commented on Jun 28, 2019

@tjNane

route代表当前路由对象,router代表整个vue实例下的路由对象

szwShen

szwShen commented on Nov 7, 2019

@szwShen

router是new vueRouter的实例,route是当前路由的对象

lancelote-zpc

lancelote-zpc commented on Mar 18, 2020

@lancelote-zpc

rorute 它是一条路由, ,routes只是配置了一组路由, router 是一个机制 相当于管理者 ,用来管理路由 ,我是这么认为的 不知道对不对

WenJieLi1998

WenJieLi1998 commented on Apr 19, 2020

@WenJieLi1998

route:代表当前路由信息对象,可以获取到当前路由的信息参数
router:代表路由实例的对象,包含了路由的跳转方法,钩子函数等

yxllovewq

yxllovewq commented on Mar 10, 2022

@yxllovewq

route:代表当前路由的对象,包含了一些基本信息。
router:代表路由实例对象,包含了路由跳转的一些方法。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @haizhilin2013@tjNane@WenJieLi1998@lancelote-zpc@szwShen

        Issue actions

          [vue] route和router有什么区别? · Issue #369 · haizlin/fe-interview