feat: 模板管理页面支持嵌入 #14924

This commit is contained in:
wangjiahao
2025-04-02 10:37:28 +08:00
committed by 王嘉豪
parent 1eb752e295
commit 12bceb7bc1
4 changed files with 34 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ const DashboardPanel = defineAsyncComponent(
)
const Copilot = defineAsyncComponent(() => import('@/views/copilot/index.vue'))
const TemplateManage = defineAsyncComponent(() => import('@/views/template/indexInject.vue'))
const Preview = defineAsyncComponent(() => import('@/views/data-visualization/PreviewCanvas.vue'))
const DashboardEmpty = defineAsyncComponent(() => import('@/views/mobile/panel/DashboardEmpty.vue'))
@@ -48,7 +49,8 @@ const componentMap = {
DashboardPanel,
DatasetEditor,
DashboardEmpty,
Copilot
Copilot,
TemplateManage
}
const isDataFilling = ref(false)

View File

@@ -156,6 +156,13 @@ export const routes: AppRouteRecordRaw[] = [
hidden: true,
meta: {},
component: () => import('@/views/chart/ChartView.vue')
},
{
path: '/template-manage',
name: 'template-manage',
hidden: true,
meta: {},
component: () => import('@/views/template/indexInject.vue')
}
]

View File

@@ -29,6 +29,7 @@ const DashboardPanel = defineAsyncComponent(
() => import('@/views/dashboard/DashboardPreviewShow.vue')
)
const Copilot = defineAsyncComponent(() => import('@/views/copilot/index.vue'))
const TemplateManage = defineAsyncComponent(() => import('@/views/template/indexInject.vue'))
const AsyncXpackComponent = defineAsyncComponent(() => import('@/components/plugin/src/index.vue'))
@@ -42,7 +43,8 @@ const componentMap = {
Datasource,
ScreenPanel,
DashboardPanel,
Copilot
Copilot,
TemplateManage
}
const iframeStyle = ref(null)
const setStyle = debounce(() => {

View File

@@ -0,0 +1,21 @@
<script setup lang="ts">
import DeTemplateManage from './index.vue'
</script>
<template>
<div class="inject-template-main">
<DeTemplateManage></DeTemplateManage>
</div>
</template>
<style scoped lang="less">
.inject-template-main {
width: 100%;
height: 100vh;
padding: 24px;
background-color: var(--MainBG, #f5f6f7);
::v-deep(.sys-setting-p) {
height: calc(100vh - 100px);
}
}
</style>