vue关闭当前路由页面并跳转到其父页面

1.dom中添加关闭或取消按钮

   <el-button type="primary" class="blueLinearbg cancelBtn" @click="cancel" >取 消</el-button>

2.cancel方法中

  /*取消或关闭*/
        cancel(){
   
          this.$store.dispatch("tagsView/delView", this.$route);  //关闭当前路由
          this.$router.push({
    path: "/wzx/jcjhua/jyjl"});  //跳转至它父页面,路径为地址栏localhost后的路径
        }

在这里插入图片描述

相关推荐

  1. vue 其他页面指定位置(锚点)

    2023-12-21 11:04:04       53 阅读
  2. Vue3 setup 页面监听变化调整页面访问位置

    2023-12-21 11:04:04       104 阅读
  3. 鸿蒙跨包页面-HSP页面

    2023-12-21 11:04:04       52 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2023-12-21 11:04:04       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2023-12-21 11:04:04       100 阅读
  3. 在Django里面运行非项目文件

    2023-12-21 11:04:04       82 阅读
  4. Python语言-面向对象

    2023-12-21 11:04:04       91 阅读

热门阅读

  1. stable diffusion 极简入门 核心 概念介绍 使用

    2023-12-21 11:04:04       56 阅读
  2. Boost.Python与BOOST_TEST_EQ宏的示例编程

    2023-12-21 11:04:04       56 阅读
  3. 使用 Layui 的 template 模块来动态加载select选项

    2023-12-21 11:04:04       55 阅读
  4. Qt 软件界面点击QCombBox控件,造成整个界面移位

    2023-12-21 11:04:04       47 阅读
  5. Mybatis配置-映射器(mappers)

    2023-12-21 11:04:04       55 阅读
  6. Vite 打包时修改静态资源的路径

    2023-12-21 11:04:04       60 阅读
  7. 服务器不稳定因素

    2023-12-21 11:04:04       54 阅读