mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-06 00:18:51 +08:00
fix: menu search (#214)
* fix: menu search * fix: i18 * perf: delete route name
This commit is contained in:
parent
494ce8f41b
commit
51d08e4b82
@ -4,7 +4,6 @@ import { MockMethod } from "vite-plugin-mock";
|
||||
// http://mockjs.com/examples.html#Object
|
||||
const systemRouter = {
|
||||
path: "/system",
|
||||
name: "system",
|
||||
redirect: "/system/user/index",
|
||||
meta: {
|
||||
icon: "setting",
|
||||
@ -35,7 +34,6 @@ const systemRouter = {
|
||||
|
||||
const permissionRouter = {
|
||||
path: "/permission",
|
||||
name: "permission",
|
||||
redirect: "/permission/page/index",
|
||||
meta: {
|
||||
title: "menus.permission",
|
||||
@ -66,7 +64,6 @@ const permissionRouter = {
|
||||
|
||||
const frameRouter = {
|
||||
path: "/iframe",
|
||||
name: "reFrame",
|
||||
redirect: "/iframe/pure",
|
||||
meta: {
|
||||
icon: "monitor",
|
||||
@ -106,7 +103,6 @@ const frameRouter = {
|
||||
|
||||
const tabsRouter = {
|
||||
path: "/tabs",
|
||||
name: "reTabs",
|
||||
redirect: "/tabs/index",
|
||||
meta: {
|
||||
icon: "IF-team-icontabs",
|
||||
|
@ -1 +0,0 @@
|
||||
export type RouteList = AuthRoute.Route;
|
@ -50,10 +50,9 @@ export function transformI18n(
|
||||
|
||||
// 处理存储动态路由的title,格式 {zh:"",en:""}
|
||||
if (typeof message === "object") {
|
||||
debugger;
|
||||
const locale: string | WritableComputedRef<string> | any =
|
||||
i18n.global.locale;
|
||||
return message[locale];
|
||||
return message[locale?.value];
|
||||
}
|
||||
|
||||
if (isI18n) {
|
||||
|
@ -3,9 +3,8 @@ const Layout = () => import("/@/layout/index.vue");
|
||||
|
||||
const ableRouter = {
|
||||
path: "/able",
|
||||
name: "components",
|
||||
component: Layout,
|
||||
redirect: "/able/menuTree",
|
||||
redirect: "/able/watermark",
|
||||
meta: {
|
||||
icon: "ubuntu-fill",
|
||||
title: $t("menus.hsAble"),
|
||||
|
@ -3,9 +3,8 @@ const Layout = () => import("/@/layout/index.vue");
|
||||
|
||||
const aboutRouter = {
|
||||
path: "/about",
|
||||
name: "reAbout",
|
||||
component: Layout,
|
||||
redirect: "/about",
|
||||
redirect: "/about/index",
|
||||
meta: {
|
||||
icon: "question-line",
|
||||
title: $t("menus.hsAbout"),
|
||||
@ -14,9 +13,9 @@ const aboutRouter = {
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/about",
|
||||
path: "/about/index",
|
||||
name: "reAbout",
|
||||
component: () => import("/@/views/about.vue"),
|
||||
component: () => import("/@/views/about/index.vue"),
|
||||
meta: {
|
||||
title: $t("menus.hsAbout"),
|
||||
i18n: true
|
||||
|
@ -3,7 +3,6 @@ const Layout = () => import("/@/layout/index.vue");
|
||||
|
||||
const componentsRouter = {
|
||||
path: "/components",
|
||||
name: "components",
|
||||
component: Layout,
|
||||
redirect: "/components/video",
|
||||
meta: {
|
||||
|
@ -3,7 +3,6 @@ const Layout = () => import("/@/layout/index.vue");
|
||||
|
||||
const editorRouter = {
|
||||
path: "/editor",
|
||||
name: "reEditor",
|
||||
component: Layout,
|
||||
redirect: "/editor/index",
|
||||
meta: {
|
||||
|
@ -3,7 +3,6 @@ const Layout = () => import("/@/layout/index.vue");
|
||||
|
||||
const errorRouter = {
|
||||
path: "/error",
|
||||
name: "error",
|
||||
component: Layout,
|
||||
redirect: "/error/403",
|
||||
meta: {
|
||||
|
@ -3,7 +3,6 @@ const Layout = () => import("/@/layout/index.vue");
|
||||
|
||||
const flowChartRouter = {
|
||||
path: "/flowChart",
|
||||
name: "flowChart",
|
||||
component: Layout,
|
||||
redirect: "/flowChart/index",
|
||||
meta: {
|
||||
|
@ -3,7 +3,6 @@ const Layout = () => import("/@/layout/index.vue");
|
||||
|
||||
const guideRouter = {
|
||||
path: "/guide",
|
||||
name: "reGuide",
|
||||
component: Layout,
|
||||
redirect: "/guide/index",
|
||||
meta: {
|
||||
|
@ -5,7 +5,6 @@ const nestedRouter = {
|
||||
path: "/nested",
|
||||
component: Layout,
|
||||
redirect: "/nested/menu1/menu1-1",
|
||||
name: "Nested",
|
||||
meta: {
|
||||
title: $t("menus.hsmenus"),
|
||||
icon: "histogram",
|
||||
@ -15,7 +14,6 @@ const nestedRouter = {
|
||||
children: [
|
||||
{
|
||||
path: "/nested/menu1",
|
||||
name: "Menu1",
|
||||
meta: {
|
||||
title: $t("menus.hsmenu1"),
|
||||
i18n: true,
|
||||
@ -35,7 +33,6 @@ const nestedRouter = {
|
||||
},
|
||||
{
|
||||
path: "/nested/menu1/menu1-2",
|
||||
name: "Menu1-2",
|
||||
redirect: "/nested/menu1/menu1-2/menu1-2-1",
|
||||
meta: {
|
||||
title: $t("menus.hsmenu1-2"),
|
||||
|
@ -15,7 +15,6 @@ const remainingRouter = [
|
||||
},
|
||||
{
|
||||
path: "/redirect",
|
||||
name: "redirect",
|
||||
component: Layout,
|
||||
meta: {
|
||||
icon: "home-filled",
|
||||
|
@ -3,7 +3,6 @@ const Layout = () => import("/@/layout/index.vue");
|
||||
|
||||
const resultRouter = {
|
||||
path: "/result",
|
||||
name: "reResult",
|
||||
component: Layout,
|
||||
redirect: "/result/success",
|
||||
meta: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user