V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
coolair
V2EX  ›  问与答

vue 同一页面跳转怎么获取参数?

  •  
  •   coolair · 2021-01-18 11:03:41 +08:00 · 417 次点击
    这是一个创建于 1220 天前的主题,其中的信息可能已经有所发展或是发生改变。

    http://localhost/#/test
    页面有个链接:
    http://localhost/#/test?q=123
    点击后怎么获取 q 的值? mounted 里不行,因为已经 mounted 了。
    1 条回复    2021-01-18 11:09:53 +08:00
    clf
        1
    clf  
       2021-01-18 11:09:53 +08:00
    watch 监听$route()就行了。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1493 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 17:24 · PVG 01:24 · LAX 10:24 · JFK 13:24
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.