V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
coolair
V2EX  ›  问与答

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

  •  
  •   coolair · Jan 18, 2021 · 751 views
    This topic created in 1937 days ago, the information mentioned may be changed or developed.

    http://localhost/#/test
    页面有个链接:
    http://localhost/#/test?q=123
    点击后怎么获取 q 的值? mounted 里不行,因为已经 mounted 了。
    1 replies    2021-01-18 11:09:53 +08:00
    clf
        1
    clf  
       Jan 18, 2021
    watch 监听$route()就行了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2761 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 50ms · UTC 15:33 · PVG 23:33 · LAX 08:33 · JFK 11:33
    ♥ Do have faith in what you're doing.