From b170450463c04c02b05a1c50df55fcce122e3486 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 11 Jun 2025 18:19:24 +0800 Subject: [PATCH] feat: dashboard preview single --- frontend/src/assets/svg/icon_pc_outlined.svg | 2 +- frontend/src/components/layout/index.vue | 2 +- frontend/src/router/index.ts | 7 ++ .../dashboard/preview/SQComponentWrapper.vue | 2 + .../src/views/dashboard/preview/SQPreview.vue | 27 +++---- .../views/dashboard/preview/SQPreviewHead.vue | 40 ++++++++--- .../views/dashboard/preview/SQPreviewShow.vue | 12 +--- .../dashboard/preview/SQPreviewSingle.vue | 71 +++++++++++++++++++ 8 files changed, 121 insertions(+), 42 deletions(-) create mode 100644 frontend/src/views/dashboard/preview/SQPreviewSingle.vue diff --git a/frontend/src/assets/svg/icon_pc_outlined.svg b/frontend/src/assets/svg/icon_pc_outlined.svg index b5ce9a28..5f0d51ce 100644 --- a/frontend/src/assets/svg/icon_pc_outlined.svg +++ b/frontend/src/assets/svg/icon_pc_outlined.svg @@ -1,3 +1,3 @@ - + diff --git a/frontend/src/components/layout/index.vue b/frontend/src/components/layout/index.vue index 6e3b5cde..8d0129f4 100644 --- a/frontend/src/components/layout/index.vue +++ b/frontend/src/components/layout/index.vue @@ -171,7 +171,7 @@ const name = ref('admin') const activeMenu = computed(() => route.path) const routerList = computed(() => { return router.getRoutes().filter(route => { - return !route.path.includes('canvas') && route.path !== '/login' && !route.path.includes('/system') && !route.redirect && route.path !== '/:pathMatch(.*)*' && !route.path.includes('dsTable') + return !route.path.includes('canvas') &&!route.path.includes('preview') && route.path !== '/login' && !route.path.includes('/system') && !route.redirect && route.path !== '/:pathMatch(.*)*' && !route.path.includes('dsTable') }) }) diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 51cefc81..1efd885d 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -6,6 +6,7 @@ import login from "@/views/login/index.vue"; import chat from "@/views/chat/index.vue"; import ds from "@/views/ds/index.vue"; import DashboardEditor from "@/views/dashboard/editor/index.vue"; +import DashboardPreview from "@//views/dashboard/preview/SQPreviewSingle.vue"; import Dashboard from "@/views/dashboard/index.vue"; import Model from "@/views/system/model/index.vue"; // import User from "@/views/system/user/index.vue"; @@ -75,6 +76,12 @@ const router = createRouter({ component: DashboardEditor, meta: { title: "canvas", icon: "dashboard" }, }, + { + path: "/dashboard-preview", + name: "preview", + component: DashboardPreview, + meta: { title: "DashboardPreview", icon: "dashboard" }, + }, /* { path: "/setting", component: Layout, diff --git a/frontend/src/views/dashboard/preview/SQComponentWrapper.vue b/frontend/src/views/dashboard/preview/SQComponentWrapper.vue index 4c541016..b4f2c53e 100644 --- a/frontend/src/views/dashboard/preview/SQComponentWrapper.vue +++ b/frontend/src/views/dashboard/preview/SQComponentWrapper.vue @@ -56,10 +56,12 @@ const viewDemoInnerId = computed(() => 'enlarge-inner-content-' + configItem.val
+