Skip to content

[vue] 如何获取路由传过来的参数? #379

Open
@haizhilin2013

Description

@haizhilin2013
Collaborator

[vue] 如何获取路由传过来的参数?

Activity

AnsonZnl

AnsonZnl commented on Jul 3, 2019

@AnsonZnl
Contributor

如果使用query方式传入的参数使用this.$route.query 接收
如果使用params方式传入的参数使用this.$router.params接收

WenJieLi1998

WenJieLi1998 commented on Apr 19, 2020

@WenJieLi1998

一个路径参数使用“:”,可以通过this.$route.params获取
路径中有查询参数,可以通过this.$route.query获取

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@AnsonZnl@WenJieLi1998@liuxiaoyang1

        Issue actions

          [vue] 如何获取路由传过来的参数? · Issue #379 · haizlin/fe-interview