Heim  >  Fragen und Antworten  >  Hauptteil

javascript – So aktualisieren Sie die aktuelle Route in Vue

http://localhost:8080/#/hello

So aktualisieren Sie die aktuelle Route, nicht F5. .

Gibt es eine Möglichkeit?

PHP中文网PHP中文网2710 Tage vor593

Antworte allen(4)Ich werde antworten

  • 给我你的怀抱

    给我你的怀抱2017-05-19 10:23:16

    一种取巧的办法:https://jingyan.baidu.com/art...

    Antwort
    0
  • 黄舟

    黄舟2017-05-19 10:23:16

    这个目的本来就是应该不存在的,如果只是想刷某些数据,直接写函数刷就行了,为什么要刷路由呢

    Antwort
    0
  • 滿天的星座

    滿天的星座2017-05-19 10:23:16

    JS原生方法window.reload(false)

    Antwort
    0
  • 漂亮男人

    漂亮男人2017-05-19 10:23:16

    先配置路由好路由重定向,然后用this.$router.push('/')进行类似刷新操作。

    Antwort
    0
  • StornierenAntwort