element ui admin 如何点击按钮关闭当前菜单。vue-element-admin关闭当前标签页。编辑文章或者编写文章后返回上一页 电脑版发表于:2025/1/6 10:10 **核心代码如下:** ``` // 调用全局挂载的方法(vuex中封装的方法),关闭当前页 this.$store.dispatch("tagsView/delView", this.$route); // 关闭之后跳转你要跳转的路由 // this.$router.push({ path: '/contentManage' }) this.$router.push("/contentManagement/contentManage"); // 也可以 返回上一步路由 this.$router.go(-1) ``` **封装的方法在`src/store/modules/tagsView.js`中** ![](https://img.tnblog.net/arcimg/notebook/9e2d9ea68cb84bd9a0675abd88bf18c8.png)