Skip to content

Commit cfea626

Browse files
committed
Merge branch 'main' of https://github.com/dataease/SQLBot
2 parents a3f9d4a + 4fd6015 commit cfea626

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

frontend/src/views/dashboard/canvas/CanvasCore.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@ function removeItemFromPositionBox(item: CanvasItem) {
251251
*/
252252
function recomputeCellWidth() {
253253
if (!containerRef.value) return
254-
maxCell.value = Math.round(containerRef.value.offsetWidth / cellWidth.value)
254+
maxCell.value = isMainCanvas(props.canvasId)
255+
? Math.floor(containerRef.value.offsetWidth / cellWidth.value)
256+
: Math.round(containerRef.value.offsetWidth / cellWidth.value)
255257
}
256258
257259
function sizeInit() {
@@ -918,6 +920,8 @@ function startMove(e: MouseEvent, item: CanvasItem, index: number) {
918920
),
919921
1
920922
)
923+
// temp adjust board
924+
921925
// Adjust the accuracy of moving coordinate changes
922926
const newY = Math.max(
923927
Math.floor(

frontend/src/views/dashboard/editor/DashboardEditor.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ const canvasSizeInit = () => {
6666
6767
const sizeInit = () => {
6868
if (dashboardEditorRef.value) {
69+
baseMarginLeft.value = 16
70+
baseMarginTop.value = 16
6971
// @ts-expect-error eslint-disable-next-line @typescript-eslint/ban-ts-comment
7072
const screenWidth = dashboardEditorRef.value.offsetWidth
7173
// @ts-expect-error eslint-disable-next-line @typescript-eslint/ban-ts-comment
7274
const screenHeight = dashboardEditorRef.value.offsetHeight
73-
baseMarginLeft.value = 10
74-
baseMarginTop.value = 10
7575
baseWidth.value =
7676
(screenWidth - baseMarginLeft.value) / props.baseMatrixCount.x - baseMarginLeft.value
7777
baseHeight.value =

frontend/src/views/dashboard/editor/Toolbar.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ const previewInner = () => {
272272
height: 24px;
273273
font-size: 16px;
274274
width: 300px;
275+
font-weight: 500;
275276
overflow: hidden;
276277
cursor: pointer;
277278
color: #1f2329;
@@ -324,6 +325,8 @@ const previewInner = () => {
324325
325326
.back-icon {
326327
margin-top: 8px;
328+
width: 20px;
329+
height: 20px;
327330
}
328331
329332
.toolbar-hover-icon {

frontend/src/views/dashboard/editor/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const baseParams = computed(() => {
9191

9292
<style scoped lang="less">
9393
.editor-content {
94-
padding: 12px;
94+
padding: 8px;
9595
width: 100vw;
9696
height: 100vh;
9797
background: #fff;
@@ -105,7 +105,7 @@ const baseParams = computed(() => {
105105
border-radius: 12px;
106106
position: relative;
107107
background: #f5f6f7;
108-
box-shadow: 0px 4px 8px 0px rgba(31, 35, 41, 0.1);
108+
box-shadow: 4px 4px 8px 4px rgba(31, 35, 41, 0.2);
109109
overflow: hidden;
110110
width: 100%;
111111
height: 100%;

0 commit comments

Comments
 (0)