feat: add dashboard page

This commit is contained in:
vben
2024-06-23 23:18:55 +08:00
parent 199d5506ac
commit c58c0797ba
100 changed files with 1908 additions and 1081 deletions

View File

@@ -0,0 +1,39 @@
import type { RouteRecordRaw } from 'vue-router';
import { $t } from '@vben/locales/helper';
import { BasicLayout } from '#/layouts';
const routes: RouteRecordRaw[] = [
{
component: BasicLayout,
meta: {
order: -1,
title: $t('page.dashboard.title'),
},
name: 'Dashboard',
path: '/',
redirect: '/analytics',
children: [
{
name: 'Analytics',
path: '/analytics',
component: () => import('#/views/dashboard/analytics/index.vue'),
meta: {
affixTab: true,
title: $t('page.dashboard.analytics'),
},
},
{
name: 'Workspace',
path: '/workspace',
component: () => import('#/views/dashboard/workspace/index.vue'),
meta: {
title: $t('page.dashboard.workspace'),
},
},
],
},
];
export default routes;

View File

@@ -9,7 +9,7 @@ const routes: RouteRecordRaw[] = [
component: BasicLayout,
meta: {
icon: 'mdi:lightbulb-error-outline',
title: $t('page.fallback.page'),
title: $t('page.fallback.title'),
},
name: 'FallbackLayout',
path: '/fallback',

View File

@@ -1,30 +0,0 @@
import type { RouteRecordRaw } from 'vue-router';
import { BasicLayout } from '#/layouts';
const routes: RouteRecordRaw[] = [
{
component: BasicLayout,
meta: {
hideChildrenInMenu: true,
order: -1,
title: '首页',
},
name: 'Home',
path: '/',
redirect: '/welcome',
children: [
{
name: 'Welcome',
path: '/welcome',
component: () => import('#/views/dashboard/index.vue'),
meta: {
affixTab: true,
title: 'Welcome',
},
},
],
},
];
export default routes;

View File

@@ -11,7 +11,7 @@ const routes: RouteRecordRaw[] = [
icon: 'ic:round-menu',
keepAlive: true,
order: 1000,
title: $t('page.nested.page'),
title: $t('page.nested.title'),
},
name: 'Nested',
path: '/nested',

View File

@@ -9,7 +9,7 @@ const routes: RouteRecordRaw[] = [
component: BasicLayout,
meta: {
icon: 'ic:round-settings-input-composite',
title: $t('page.outside.page'),
title: $t('page.outside.title'),
},
name: 'Outside',
path: '/outside',