mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	chore: update
This commit is contained in:
		
							parent
							
								
									846e7350fb
								
							
						
					
					
						commit
						d81ab81fb0
					
				@ -1,10 +1,8 @@
 | 
			
		||||
import { $t } from "/@/plugins/i18n";
 | 
			
		||||
import type { RouteConfigsTable } from "/#/index";
 | 
			
		||||
const Layout = () => import("/@/layout/index.vue");
 | 
			
		||||
 | 
			
		||||
const ableRouter: RouteConfigsTable = {
 | 
			
		||||
  path: "/able",
 | 
			
		||||
  component: Layout,
 | 
			
		||||
  redirect: "/able/watermark",
 | 
			
		||||
  meta: {
 | 
			
		||||
    icon: "ubuntu-fill",
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,8 @@
 | 
			
		||||
import { $t } from "/@/plugins/i18n";
 | 
			
		||||
import type { RouteConfigsTable } from "/#/index";
 | 
			
		||||
const Layout = () => import("/@/layout/index.vue");
 | 
			
		||||
 | 
			
		||||
const aboutRouter: RouteConfigsTable = {
 | 
			
		||||
  path: "/about",
 | 
			
		||||
  component: Layout,
 | 
			
		||||
  redirect: "/about/index",
 | 
			
		||||
  meta: {
 | 
			
		||||
    // icon: "question-line",
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,8 @@
 | 
			
		||||
import { $t } from "/@/plugins/i18n";
 | 
			
		||||
import type { RouteConfigsTable } from "/#/index";
 | 
			
		||||
const Layout = () => import("/@/layout/index.vue");
 | 
			
		||||
 | 
			
		||||
const componentsRouter: RouteConfigsTable = {
 | 
			
		||||
  path: "/components",
 | 
			
		||||
  component: Layout,
 | 
			
		||||
  redirect: "/components/video",
 | 
			
		||||
  meta: {
 | 
			
		||||
    icon: "menu",
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,8 @@
 | 
			
		||||
import { $t } from "/@/plugins/i18n";
 | 
			
		||||
import type { RouteConfigsTable } from "/#/index";
 | 
			
		||||
const Layout = () => import("/@/layout/index.vue");
 | 
			
		||||
 | 
			
		||||
const editorRouter: RouteConfigsTable = {
 | 
			
		||||
  path: "/editor",
 | 
			
		||||
  component: Layout,
 | 
			
		||||
  redirect: "/editor/index",
 | 
			
		||||
  meta: {
 | 
			
		||||
    icon: "edit",
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,8 @@
 | 
			
		||||
import { $t } from "/@/plugins/i18n";
 | 
			
		||||
import type { RouteConfigsTable } from "/#/index";
 | 
			
		||||
const Layout = () => import("/@/layout/index.vue");
 | 
			
		||||
 | 
			
		||||
const errorRouter: RouteConfigsTable = {
 | 
			
		||||
  path: "/error",
 | 
			
		||||
  component: Layout,
 | 
			
		||||
  redirect: "/error/403",
 | 
			
		||||
  meta: {
 | 
			
		||||
    icon: "information-line",
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,8 @@
 | 
			
		||||
import { $t } from "/@/plugins/i18n";
 | 
			
		||||
import type { RouteConfigsTable } from "/#/index";
 | 
			
		||||
const Layout = () => import("/@/layout/index.vue");
 | 
			
		||||
 | 
			
		||||
const flowChartRouter: RouteConfigsTable = {
 | 
			
		||||
  path: "/flowChart",
 | 
			
		||||
  component: Layout,
 | 
			
		||||
  redirect: "/flowChart/index",
 | 
			
		||||
  meta: {
 | 
			
		||||
    icon: "set-up",
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,8 @@
 | 
			
		||||
import { $t } from "/@/plugins/i18n";
 | 
			
		||||
import type { RouteConfigsTable } from "/#/index";
 | 
			
		||||
const Layout = () => import("/@/layout/index.vue");
 | 
			
		||||
 | 
			
		||||
const formDesignRouter: RouteConfigsTable = {
 | 
			
		||||
  path: "/formDesign",
 | 
			
		||||
  component: Layout,
 | 
			
		||||
  redirect: "/formDesign/index",
 | 
			
		||||
  meta: {
 | 
			
		||||
    icon: "terminal-window-line",
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,8 @@
 | 
			
		||||
import { $t } from "/@/plugins/i18n";
 | 
			
		||||
import type { RouteConfigsTable } from "/#/index";
 | 
			
		||||
const Layout = () => import("/@/layout/index.vue");
 | 
			
		||||
 | 
			
		||||
const guideRouter: RouteConfigsTable = {
 | 
			
		||||
  path: "/guide",
 | 
			
		||||
  component: Layout,
 | 
			
		||||
  redirect: "/guide/index",
 | 
			
		||||
  meta: {
 | 
			
		||||
    icon: "guide",
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,8 @@
 | 
			
		||||
import { $t } from "/@/plugins/i18n";
 | 
			
		||||
import type { RouteConfigsTable } from "/#/index";
 | 
			
		||||
const Layout = () => import("/@/layout/index.vue");
 | 
			
		||||
 | 
			
		||||
const ableRouter: RouteConfigsTable = {
 | 
			
		||||
  path: "/list",
 | 
			
		||||
  component: Layout,
 | 
			
		||||
  redirect: "/list/card",
 | 
			
		||||
  meta: {
 | 
			
		||||
    icon: "list-check",
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,8 @@
 | 
			
		||||
import { $t } from "/@/plugins/i18n";
 | 
			
		||||
import type { RouteConfigsTable } from "/#/index";
 | 
			
		||||
const Layout = () => import("/@/layout/index.vue");
 | 
			
		||||
 | 
			
		||||
const nestedRouter: RouteConfigsTable = {
 | 
			
		||||
  path: "/nested",
 | 
			
		||||
  component: Layout,
 | 
			
		||||
  redirect: "/nested/menu1/menu1-1",
 | 
			
		||||
  meta: {
 | 
			
		||||
    title: $t("menus.hsmenus"),
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,8 @@
 | 
			
		||||
import type { RouteConfigsTable } from "/#/index";
 | 
			
		||||
const Layout = () => import("/@/layout/index.vue");
 | 
			
		||||
const IFrame = () => import("/@/layout/frameView.vue");
 | 
			
		||||
 | 
			
		||||
const pptRouter: RouteConfigsTable = {
 | 
			
		||||
  path: "/ppt",
 | 
			
		||||
  component: Layout,
 | 
			
		||||
  redirect: "/ppt/index",
 | 
			
		||||
  meta: {
 | 
			
		||||
    icon: "ppt",
 | 
			
		||||
 | 
			
		||||
@ -1,10 +1,8 @@
 | 
			
		||||
import { $t } from "/@/plugins/i18n";
 | 
			
		||||
import type { RouteConfigsTable } from "/#/index";
 | 
			
		||||
const Layout = () => import("/@/layout/index.vue");
 | 
			
		||||
 | 
			
		||||
const resultRouter: RouteConfigsTable = {
 | 
			
		||||
  path: "/result",
 | 
			
		||||
  component: Layout,
 | 
			
		||||
  redirect: "/result/success",
 | 
			
		||||
  meta: {
 | 
			
		||||
    icon: "checkbox-circle-line",
 | 
			
		||||
 | 
			
		||||
@ -13,7 +13,6 @@ import { useTimeoutFn } from "@vueuse/core";
 | 
			
		||||
import { RouteConfigs } from "/@/layout/types";
 | 
			
		||||
import { buildHierarchyTree } from "@pureadmin/utils";
 | 
			
		||||
import { usePermissionStoreHook } from "/@/store/modules/permission";
 | 
			
		||||
const Layout = () => import("/@/layout/index.vue");
 | 
			
		||||
const IFrame = () => import("/@/layout/frameView.vue");
 | 
			
		||||
// https://cn.vitejs.dev/guide/features.html#glob-import
 | 
			
		||||
const modulesRoutes = import.meta.glob("/src/views/**/*.{vue,tsx}");
 | 
			
		||||
@ -229,12 +228,10 @@ function addAsyncRoutes(arrRoutes: Array<RouteRecordRaw>) {
 | 
			
		||||
  arrRoutes.forEach((v: RouteRecordRaw) => {
 | 
			
		||||
    // 将backstage属性加入meta,标识此路由为后端返回路由
 | 
			
		||||
    v.meta.backstage = true;
 | 
			
		||||
    if (v.redirect) {
 | 
			
		||||
      v.component = Layout;
 | 
			
		||||
    } else if (v.meta?.frameSrc) {
 | 
			
		||||
    if (v.meta?.frameSrc) {
 | 
			
		||||
      v.component = IFrame;
 | 
			
		||||
    } else {
 | 
			
		||||
      // 对后端传component组件路径和不传做兼容(如果后端传component组件路径,那么path可以随便写,如果不传,component组件路径会根path保持一致)
 | 
			
		||||
      // 对后端传component组件路径和不传做兼容(如果后端传component组件路径,那么path可以随便写,如果不传,component组件路径会跟path保持一致)
 | 
			
		||||
      const index = v?.component
 | 
			
		||||
        ? modulesRoutesKeys.findIndex(ev => ev.includes(v.component as any))
 | 
			
		||||
        : modulesRoutesKeys.findIndex(ev => ev.includes(v.path));
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user