From f1a40db0059c97ae017fd7e147c3ab0193235afa Mon Sep 17 00:00:00 2001
From: XieYongHong <18010623010@163.com>
Date: Fri, 8 Sep 2023 18:58:44 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E4=BD=8E=E7=A0=81?=
=?UTF-8?q?=E8=B7=AF=E7=94=B1=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Layout/SinglePage.vue | 129 +++++++++++++++++++++++++++
src/components/Layout/index.ts | 3 +-
src/utils/menu.ts | 15 +++-
src/views/iframe/index.vue | 12 ++-
4 files changed, 151 insertions(+), 8 deletions(-)
create mode 100644 src/components/Layout/SinglePage.vue
diff --git a/src/components/Layout/SinglePage.vue b/src/components/Layout/SinglePage.vue
new file mode 100644
index 00000000..cfdb6ac8
--- /dev/null
+++ b/src/components/Layout/SinglePage.vue
@@ -0,0 +1,129 @@
+
+
+
+
+ {{ slotProps.route.breadcrumbName }}
+
+ {{ slotProps.route.breadcrumbName }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/Layout/index.ts b/src/components/Layout/index.ts
index 9214b6a0..46483d31 100644
--- a/src/components/Layout/index.ts
+++ b/src/components/Layout/index.ts
@@ -1,3 +1,4 @@
export { default as BasicLayoutPage } from './BasicLayoutPage.vue'
export { default as BlankLayoutPage } from './BlankLayoutPage.vue'
-export { default as FullPage } from './FullPage.vue'
\ No newline at end of file
+export { default as FullPage } from './FullPage.vue'
+export { default as SinglePage } from './SinglePage.vue'
\ No newline at end of file
diff --git a/src/utils/menu.ts b/src/utils/menu.ts
index 53e4ebe4..95619d93 100644
--- a/src/utils/menu.ts
+++ b/src/utils/menu.ts
@@ -1,6 +1,7 @@
-import { BlankLayoutPage, BasicLayoutPage } from 'components/Layout'
+import { BlankLayoutPage, BasicLayoutPage, SinglePage } from 'components/Layout'
import { isNoCommunity } from '@/utils/utils'
import Iframe from '../views/iframe/index.vue'
+import { h } from 'vue'
const pagesComponent = import.meta.glob('../views/**/*.vue');
@@ -343,10 +344,12 @@ import { shallowRef } from 'vue'
type Buttons = Array<{ id: string }>
-const hasAppID = (item: { appId?: string, url?: string }): { isApp: boolean, appUrl: string } => {
+const hasAppID = (item: any): { isApp: boolean, appUrl: string } => {
+ const isApp = !!item.appId
+ const isLowCode = !!item.options?.LowCode
return {
- isApp: !!item.appId,
- appUrl: `/${item.appId}${item.url}`
+ isApp: isApp || isLowCode,
+ appUrl: isApp ? `/${item.appId}${item.url}` : item.url
}
}
@@ -453,6 +456,10 @@ export const handleMenus = (menuData: any[], components: any, level: number = 1)
route.children = route.children ? [...route.children, ...extraRoute] : extraRoute
}
+ if (item.options?.LowCode && level === 1) {
+ route.component = () => SinglePage
+ }
+
if (detail_components.length) {
route.children = route.children ? route.children.concat(detail_components) : detail_components
}
diff --git a/src/views/iframe/index.vue b/src/views/iframe/index.vue
index 2d9f9d92..4ab24f52 100644
--- a/src/views/iframe/index.vue
+++ b/src/views/iframe/index.vue
@@ -10,7 +10,7 @@