Skip to content

页面刷新后,需要点击俩次才能返回上一级页面 #5736

Closed
@EvynXu

Description

@EvynXu

Version

2.1.1

Steps to reproduce

Router使用history 模式,A页面跳转B页面,然后在B页面执行刷新操作,然后点击返回按钮

What is expected?

返回到A页面

What is actually happening?

点击第一次没有任何反应,点击第二次才能正常返回到A页面。点击次数取决于刷新的次数


问题原因应该是刷新后Router内部又再一次执行了 history.pushState方法。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions