diff --git a/package.json b/package.json index 6a2c990..9cb161e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "front-next", - "version": "5.7.6", + "version": "5.7.7", "scripts": { "dev": "vite --host", "build": "vite build", diff --git a/src/cool/router/index.ts b/src/cool/router/index.ts index 42fa82d..9117168 100644 --- a/src/cool/router/index.ts +++ b/src/cool/router/index.ts @@ -55,28 +55,27 @@ router.append = function (data) { d.name = d.path.substring(1); } + if (!d.component) { + const url = d.viewPath; + + if (url) { + if (url.indexOf("http") == 0) { + if (d.meta) { + d.meta.iframeUrl = url; + } + + d.component = () => import(`/$/base/views/frame.vue`); + } else { + d.component = files["/src/" + url.replace("cool/", "")]; + } + } else { + d.redirect = "/404"; + } + } + if (e.isPage) { router.addRoute(d); } else { - if (!d.component) { - const url = d.viewPath; - - if (url) { - if (url.indexOf("http") == 0) { - if (d.meta) { - d.meta.iframeUrl = url; - } - - d.component = () => import(`/$/base/views/frame.vue`); - } else { - d.component = files["/src/" + url.replace("cool/", "")]; - } - } else { - d.redirect = "/404"; - } - } - - // @ts-ignore router.addRoute("index", d); } }); diff --git a/src/modules/base/layout/components/views.vue b/src/modules/base/layout/components/views.vue index f5a5d2f..083b9cf 100644 --- a/src/modules/base/layout/components/views.vue +++ b/src/modules/base/layout/components/views.vue @@ -1,9 +1,9 @@ diff --git a/src/modules/base/views/components/dept/tree.vue b/src/modules/base/views/components/dept/tree.vue index 81dbe98..487b86c 100644 --- a/src/modules/base/views/components/dept/tree.vue +++ b/src/modules/base/views/components/dept/tree.vue @@ -7,7 +7,7 @@
  • - +
  • @@ -77,7 +77,7 @@ import { useCool } from "/@/cool"; import { deepTree, revDeepTree } from "/@/cool/utils"; import { isArray } from "lodash"; import { ContextMenu, useForm } from "@cool-vue/crud"; -import { Refresh, Operation, MoreFilled } from "@element-plus/icons-vue"; +import { Refresh as RefreshIcon, Operation, MoreFilled } from "@element-plus/icons-vue"; import { useBase, checkPerm } from "/$/base"; const props = defineProps({ diff --git a/src/modules/base/views/frame.vue b/src/modules/base/views/frame.vue index ae7fdae..9fabb2a 100644 --- a/src/modules/base/views/frame.vue +++ b/src/modules/base/views/frame.vue @@ -4,7 +4,7 @@ -