mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-15 14:03:36 +08:00
fix: menu search (#214)
* fix: menu search * fix: i18 * perf: delete route name
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user