Skip to content

导航菜单点击当前选中的菜单时出现NavigationDuplicated错误 #1094

@dxvgef

Description

@dxvgef
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.3.14

Environment

Mac OS 10.14.6, Chrome 76.0.3809.100, Vue 2.6.10

Reproduction link

about:blank

Steps to reproduce

<a-menu mode="inline" @click="goto">
methods: {
goto(prop) {
if (prop.key === 'status') {
this.$router.push('/');
return;
}
this.$router.push(prop.key);
}
}

What is expected?

在已经选中的菜单上再次点击时,会出现Uncaught (in promise) NavigationDuplicated {_name: "NavigationDuplicated", name: "NavigationDuplicated"}这样的错误

What is actually happening?

如果去掉菜单的@click事件,就不会有问题

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

    Issue actions