fix: menu search (#214)

* fix: menu search

* fix: i18

* perf: delete route name
This commit is contained in:
一万 2022-03-12 23:32:32 +08:00 committed by GitHub
parent 494ce8f41b
commit 51d08e4b82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 5 additions and 23 deletions

View File

@ -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",

View File

@ -1 +0,0 @@
export type RouteList = AuthRoute.Route;

View File

@ -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) {

View File

@ -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"),

View File

@ -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

View File

@ -3,7 +3,6 @@ const Layout = () => import("/@/layout/index.vue");
const componentsRouter = {
path: "/components",
name: "components",
component: Layout,
redirect: "/components/video",
meta: {

View File

@ -3,7 +3,6 @@ const Layout = () => import("/@/layout/index.vue");
const editorRouter = {
path: "/editor",
name: "reEditor",
component: Layout,
redirect: "/editor/index",
meta: {

View File

@ -3,7 +3,6 @@ const Layout = () => import("/@/layout/index.vue");
const errorRouter = {
path: "/error",
name: "error",
component: Layout,
redirect: "/error/403",
meta: {

View File

@ -3,7 +3,6 @@ const Layout = () => import("/@/layout/index.vue");
const flowChartRouter = {
path: "/flowChart",
name: "flowChart",
component: Layout,
redirect: "/flowChart/index",
meta: {

View File

@ -3,7 +3,6 @@ const Layout = () => import("/@/layout/index.vue");
const guideRouter = {
path: "/guide",
name: "reGuide",
component: Layout,
redirect: "/guide/index",
meta: {

View File

@ -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"),

View File

@ -15,7 +15,6 @@ const remainingRouter = [
},
{
path: "/redirect",
name: "redirect",
component: Layout,
meta: {
icon: "home-filled",

View File

@ -3,7 +3,6 @@ const Layout = () => import("/@/layout/index.vue");
const resultRouter = {
path: "/result",
name: "reResult",
component: Layout,
redirect: "/result/success",
meta: {