From 35e0a36ada3142f88cd6eb35967df94381e1aa9a Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 21 Jul 2025 17:43:19 +0800 Subject: [PATCH] refactor: dashboard view enlarge --- frontend/src/i18n/en.json | 5 ++ frontend/src/i18n/zh-CN.json | 1 + .../chat/component/DisplayChartBlock.vue | 1 + .../src/views/dashboard/canvas/CanvasCore.vue | 6 ++ .../views/dashboard/canvas/CanvasShape.vue | 3 +- .../views/dashboard/canvas/ComponentBar.vue | 11 +++- .../dashboard/components/sq-view/index.vue | 55 ++++++++++++++++++- .../src/views/dashboard/css/CanvasStyle.less | 4 +- .../dashboard/preview/SQComponentWrapper.vue | 1 + 9 files changed, 81 insertions(+), 6 deletions(-) diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index 0dafe579..ad24337e 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -32,6 +32,11 @@ "password_reset_successful": "Password reset successful" }, "dashboard": { + "exit_preview": "Exit preview", + "no_chat": "No conversations", + "today": "Today", + "this_week": "This week", + "earlier": "Earlier", "add_component_tips": "Select components from the top toolbar and add them here to create a dashboard", "add_view": "Add Chart", "delete_dashboard_warn": "Delete This Dashboard: {0}", diff --git a/frontend/src/i18n/zh-CN.json b/frontend/src/i18n/zh-CN.json index 1e9fe9f5..61bb02b2 100644 --- a/frontend/src/i18n/zh-CN.json +++ b/frontend/src/i18n/zh-CN.json @@ -34,6 +34,7 @@ "password_reset_successful": "重置密码成功" }, "dashboard": { + "exit_preview": "退出预览", "no_chat": "暂无对话", "today": "今日", "this_week": "本周", diff --git a/frontend/src/views/chat/component/DisplayChartBlock.vue b/frontend/src/views/chat/component/DisplayChartBlock.vue index 77f1264c..2b639b57 100644 --- a/frontend/src/views/chat/component/DisplayChartBlock.vue +++ b/frontend/src/views/chat/component/DisplayChartBlock.vue @@ -81,6 +81,7 @@ defineExpose({ .chart-base-container { height: 100%; width: 100%; + border-radius: 12px; background: rgba(224, 224, 226, 0.29); } diff --git a/frontend/src/views/dashboard/canvas/CanvasCore.vue b/frontend/src/views/dashboard/canvas/CanvasCore.vue index dfca61a8..b03619df 100644 --- a/frontend/src/views/dashboard/canvas/CanvasCore.vue +++ b/frontend/src/views/dashboard/canvas/CanvasCore.vue @@ -1149,6 +1149,11 @@ onMounted(() => { currentInstance = getCurrentInstance() }) +const enlargeView = (itemId: string) => { + const refTabInstance = currentInstance.refs['shape_component_' + itemId][0] + refTabInstance.enlargeView() +} + defineExpose({ getRenderState, init, @@ -1194,6 +1199,7 @@ defineExpose({ :start-resize="startResize" :canvas-id="canvasId" :style="nowItemStyle(item)" + @enlarge-view="() => enlargeView(item.id)" > { :active="active && canEdit" :show-position="'canvas'" :canvas-id="canvasId" + @enlarge-view="() => emits('enlargeView')" >