From 2382882e064755b5bf0cf8ed250b56a4423ff905 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 23 Jul 2025 18:39:19 +0800 Subject: [PATCH 1/2] style: update style --- frontend/src/views/dashboard/editor/Toolbar.vue | 3 +++ frontend/src/views/dashboard/editor/index.vue | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/dashboard/editor/Toolbar.vue b/frontend/src/views/dashboard/editor/Toolbar.vue index a42b4434..572eb58d 100644 --- a/frontend/src/views/dashboard/editor/Toolbar.vue +++ b/frontend/src/views/dashboard/editor/Toolbar.vue @@ -272,6 +272,7 @@ const previewInner = () => { height: 24px; font-size: 16px; width: 300px; + font-weight: 500; overflow: hidden; cursor: pointer; color: #1f2329; @@ -324,6 +325,8 @@ const previewInner = () => { .back-icon { margin-top: 8px; + width: 20px; + height: 20px; } .toolbar-hover-icon { diff --git a/frontend/src/views/dashboard/editor/index.vue b/frontend/src/views/dashboard/editor/index.vue index 7a8b652a..0a0bce8a 100644 --- a/frontend/src/views/dashboard/editor/index.vue +++ b/frontend/src/views/dashboard/editor/index.vue @@ -105,7 +105,7 @@ const baseParams = computed(() => { border-radius: 12px; position: relative; background: #f5f6f7; - box-shadow: 0px 4px 8px 0px rgba(31, 35, 41, 0.1); + box-shadow: 4px 4px 8px 4px rgba(31, 35, 41, 0.2); overflow: hidden; width: 100%; height: 100%; From 4fd601565d4f7cf0015d362bf672c03f22d20175 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 24 Jul 2025 08:52:55 +0800 Subject: [PATCH 2/2] refactor: update style and dashboard cell max --- frontend/src/views/dashboard/canvas/CanvasCore.vue | 6 +++++- frontend/src/views/dashboard/editor/DashboardEditor.vue | 4 ++-- frontend/src/views/dashboard/editor/index.vue | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/dashboard/canvas/CanvasCore.vue b/frontend/src/views/dashboard/canvas/CanvasCore.vue index a1b8178d..37b806c0 100644 --- a/frontend/src/views/dashboard/canvas/CanvasCore.vue +++ b/frontend/src/views/dashboard/canvas/CanvasCore.vue @@ -251,7 +251,9 @@ function removeItemFromPositionBox(item: CanvasItem) { */ function recomputeCellWidth() { if (!containerRef.value) return - maxCell.value = Math.round(containerRef.value.offsetWidth / cellWidth.value) + maxCell.value = isMainCanvas(props.canvasId) + ? Math.floor(containerRef.value.offsetWidth / cellWidth.value) + : Math.round(containerRef.value.offsetWidth / cellWidth.value) } function sizeInit() { @@ -918,6 +920,8 @@ function startMove(e: MouseEvent, item: CanvasItem, index: number) { ), 1 ) + // temp adjust board + // Adjust the accuracy of moving coordinate changes const newY = Math.max( Math.floor( diff --git a/frontend/src/views/dashboard/editor/DashboardEditor.vue b/frontend/src/views/dashboard/editor/DashboardEditor.vue index 8dae47c2..2db905bd 100644 --- a/frontend/src/views/dashboard/editor/DashboardEditor.vue +++ b/frontend/src/views/dashboard/editor/DashboardEditor.vue @@ -66,12 +66,12 @@ const canvasSizeInit = () => { const sizeInit = () => { if (dashboardEditorRef.value) { + baseMarginLeft.value = 16 + baseMarginTop.value = 16 // @ts-expect-error eslint-disable-next-line @typescript-eslint/ban-ts-comment const screenWidth = dashboardEditorRef.value.offsetWidth // @ts-expect-error eslint-disable-next-line @typescript-eslint/ban-ts-comment const screenHeight = dashboardEditorRef.value.offsetHeight - baseMarginLeft.value = 10 - baseMarginTop.value = 10 baseWidth.value = (screenWidth - baseMarginLeft.value) / props.baseMatrixCount.x - baseMarginLeft.value baseHeight.value = diff --git a/frontend/src/views/dashboard/editor/index.vue b/frontend/src/views/dashboard/editor/index.vue index 0a0bce8a..c70eeafd 100644 --- a/frontend/src/views/dashboard/editor/index.vue +++ b/frontend/src/views/dashboard/editor/index.vue @@ -91,7 +91,7 @@ const baseParams = computed(() => {