chore: update app name

This commit is contained in:
vben
2024-06-08 16:33:49 +08:00
parent 77d40dc763
commit d584d4cf4e
57 changed files with 4 additions and 4 deletions

View File

@@ -0,0 +1,85 @@
import type { RouteRecordRaw } from 'vue-router';
import { AuthPageLayoutType } from '@/layouts';
import { Fallback } from '@vben/common-ui';
import { $t } from '@vben/locales';
import Login from '@/views/_essential/authentication/login.vue';
/** 基本路由,这些路由是必须存在的 */
const essentialRoutes: RouteRecordRaw[] = [
{
component: AuthPageLayoutType,
meta: {
title: 'Authentication',
},
name: 'Authentication',
path: '/auth',
children: [
{
name: 'Login',
path: 'login',
component: Login,
meta: {
ignoreAccess: true,
title: $t('page.login'),
},
},
{
name: 'CodeLogin',
path: 'code-login',
component: () =>
import('@/views/_essential/authentication/code-login.vue'),
meta: {
ignoreAccess: true,
title: $t('page.code-login'),
},
},
{
name: 'QrCodeLogin',
path: 'qrcode-login',
component: () =>
import('@/views/_essential/authentication/qrcode-login.vue'),
meta: {
ignoreAccess: true,
title: $t('page.qrcode-login'),
},
},
{
name: 'ForgetPassword',
path: 'forget-password',
component: () =>
import('@/views/_essential/authentication/forget-password.vue'),
meta: {
ignoreAccess: true,
title: $t('page.forget-password'),
},
},
{
name: 'Register',
path: 'register',
component: () =>
import('@/views/_essential/authentication/register.vue'),
meta: {
ignoreAccess: true,
title: $t('page.register'),
},
},
],
},
// 错误页
{
component: Fallback,
meta: {
hideInBreadcrumb: true,
hideInMenu: true,
hideInTab: true,
// ignoreAccess: true,
title: 'Fallback',
},
name: 'Fallback',
path: '/:path(.*)*',
},
];
export { essentialRoutes };

View File

@@ -0,0 +1,73 @@
import type { RouteRecordRaw } from 'vue-router';
import { BasicLayout } from '@/layouts';
const routes: RouteRecordRaw[] = [
{
component: BasicLayout,
meta: {
keepAlive: true,
title: '多级菜单',
},
name: 'Nested',
path: '/nested',
children: [
{
name: 'Menu1',
path: 'menu1',
component: () => import('@/views/nested/menu-1.vue'),
meta: {
keepAlive: true,
title: '菜单1',
},
},
{
name: 'Menu2',
path: 'menu2',
component: () => import('@/views/nested/menu-2.vue'),
meta: {
keepAlive: true,
title: '菜单2',
},
},
{
name: 'Menu3',
path: 'menu3',
meta: {
title: '菜单3',
},
children: [
{
name: 'Menu31',
path: 'menu3-1',
component: () => import('@/views/nested/menu-3-1.vue'),
meta: {
keepAlive: true,
title: '菜单3-1',
},
},
{
name: 'Menu32',
path: 'menu3-2',
meta: {
title: '菜单3-2',
},
children: [
{
name: 'Menu321',
path: 'menu3-2-1',
component: () => import('@/views/nested/menu-3-2-1.vue'),
meta: {
keepAlive: true,
title: '菜单3-2-1',
},
},
],
},
],
},
],
},
];
export default routes;

View File

@@ -0,0 +1,39 @@
import type { RouteRecordRaw } from 'vue-router';
import { BasicLayout, IFrameView } from '@/layouts';
const routes: RouteRecordRaw[] = [
{
component: BasicLayout,
meta: {
title: '外部页面',
},
name: 'Outside',
path: '/outside',
redirect: '/outside/document',
children: [
{
name: 'Document',
path: 'document',
component: IFrameView,
meta: {
iframeSrc: 'https://doc.vvbin.cn/',
// keepAlive: true,
title: '项目文档',
},
},
{
name: 'IFrameView',
path: 'vue-document',
component: IFrameView,
meta: {
iframeSrc: 'https://cn.vuejs.org/',
keepAlive: true,
title: 'Vue 文档(缓存)',
},
},
],
},
];
export default routes;

View File

@@ -0,0 +1,30 @@
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

@@ -0,0 +1,53 @@
import { preferences } from '@vben-core/preferences';
import type { RouteRecordRaw } from 'vue-router';
import { BasicLayout, IFrameView } from '@/layouts';
import { VBEN_GITHUB_URL } from '@vben/constants';
import { $t } from '@vben/locales/helper';
const routes: RouteRecordRaw[] = [
{
component: BasicLayout,
meta: {
icon: preferences.logo.source,
title: 'Vben',
},
name: 'AboutLayout',
path: '/vben-admin',
redirect: '/vben-admin/about',
children: [
{
name: 'About',
path: 'about',
component: () => import('@/views/about/index.vue'),
meta: {
icon: 'mdi:creative-commons',
title: $t('page.about'),
},
},
{
name: 'AboutDocument',
path: 'document',
component: IFrameView,
meta: {
icon: 'mdi:flame-circle',
iframeSrc: 'https://doc.vvbin.cn/',
keepAlive: true,
title: $t('page.document'),
},
},
{
name: 'Github',
path: 'github',
component: IFrameView,
meta: {
icon: 'mdi:github',
target: VBEN_GITHUB_URL,
title: 'Github',
},
},
],
},
];
export default routes;

View File

View File

@@ -0,0 +1,28 @@
import { mergeRouteModules } from '@vben-core/helpers';
import type { RouteRecordRaw } from 'vue-router';
import { essentialRoutes } from './_essential';
const dynamicRouteFiles = import.meta.glob('./dynamic/**/*.ts', {
eager: true,
});
const staticRouteFiles = import.meta.glob('./static/**/*.ts', { eager: true });
const externalRouteFiles = import.meta.glob('./external/**/*.ts', {
eager: true,
});
/** 动态路由 */
const dynamicRoutes: RouteRecordRaw[] = mergeRouteModules(dynamicRouteFiles);
/** 静态路由列表,访问这些页面可以不需要权限 */
const staticRoutes: RouteRecordRaw[] = mergeRouteModules(staticRouteFiles);
/** 排除在主框架外的路由,这些路由没有菜单和顶部及其他框架内容 */
const externalRoutes: RouteRecordRaw[] = mergeRouteModules(externalRouteFiles);
/** 路由列表,由基本路由+静态路由组成 */
const routes: RouteRecordRaw[] = [...essentialRoutes, ...staticRoutes];
export { dynamicRoutes, externalRoutes, routes };