fix: router push

This commit is contained in:
xingyu4j
2025-10-20 15:36:06 +08:00
parent 95bda979a1
commit dd70dc0012
9 changed files with 131 additions and 90 deletions

View File

@@ -1,41 +0,0 @@
import type { RouteRecordRaw } from 'vue-router';
// TODO @chihuo这个合并到 mall.ts 里
const routes: RouteRecordRaw[] = [
{
path: '/diy',
name: 'DiyCenter',
meta: {
title: '营销中心',
icon: 'lucide:shopping-bag',
keepAlive: true,
hideInMenu: true,
},
children: [
{
path: String.raw`template/decorate/:id(\d+)`,
name: 'DiyTemplateDecorate',
meta: {
title: '模板装修',
activePath: '/mall/promotion/diy-template/diy-template',
},
component: () =>
import('#/views/mall/promotion/diy/template/modules/decorate.vue'),
},
{
path: 'page/decorate/:id',
name: 'DiyPageDecorate',
meta: {
title: '页面装修',
noCache: false,
hidden: true,
activePath: '/mall/promotion/diy-template/diy-page',
},
component: () =>
import('#/views/mall/promotion/diy/page/modules/decorate.vue'),
},
],
},
];
export default routes;

View File

@@ -80,6 +80,40 @@ const routes: RouteRecordRaw[] = [
},
],
},
{
path: '/diy',
name: 'DiyCenter',
meta: {
title: '营销中心',
icon: 'lucide:shopping-bag',
keepAlive: true,
hideInMenu: true,
},
children: [
{
path: String.raw`template/decorate/:id(\d+)`,
name: 'DiyTemplateDecorate',
meta: {
title: '模板装修',
activePath: '/mall/promotion/diy-template/diy-template',
},
component: () =>
import('#/views/mall/promotion/diy/template/modules/decorate.vue'),
},
{
path: 'page/decorate/:id',
name: 'DiyPageDecorate',
meta: {
title: '页面装修',
noCache: false,
hidden: true,
activePath: '/mall/promotion/diy-template/diy-page',
},
component: () =>
import('#/views/mall/promotion/diy/page/modules/decorate.vue'),
},
],
},
];
export default routes;