Javascript vue关闭页面功能

Javascript vue关闭页面功能,javascript,vue.js,vuejs2,Javascript,Vue.js,Vuejs2,如何通过vue js中的函数实现页面关闭 以身作则 配置路由 { path: '/example', component: Layout, redirect: '/example/list', name: 'Example', meta: { title: 'example', icon: 'example' }, children: [ { path: 'create', component: () =

如何通过vue js中的函数实现页面关闭

以身作则

配置路由

{
    path: '/example',
    component: Layout,
    redirect: '/example/list',
    name: 'Example',
    meta: {
      title: 'example',
      icon: 'example'
    },
children: [
  {
    path: 'create',
    component: () => import('@/views/example/create'),
    name: 'CreateArticle',
    meta: { title: 'createArticle', icon: 'edit' }
  },
  {
    path: 'edit/:id(\\d+)',
    component: () => import('@/views/example/edit'),
    name: 'EditArticle',
    meta: { title: 'editArticle', noCache: true },
    hidden: true
  },
  {
    path: 'list',
    component: () => import('@/views/example/list'),
    name: 'ArticleList',
    meta: { title: 'articleList', icon: 'list' }
  }]
},
当我转到ArticleList.vue时,我打开列表,转到创作/编辑国家->新成员打开(列表页面在其旁边的选项卡中保持打开),在CreateArticle.vue中提交表单后,CreateArticle.vue页面应关闭


通过destroy()尝试,结果是页面内容被清理,页面本身保留(但为空),您必须通过X关闭页面

您是否已经阅读了?使用router.push,并重定向回articlelist如何?不,不需要关闭站点,只需在发送表单后关闭CreateArticle,并重定向到List.vue-重定向我正在执行,->无法关闭组件