@@ -11,28 +11,26 @@ const dashboardStore = dashboardStoreWithOut()
1111const canvasLocked = ref (false ) // Is the canvas movement locked, Default false
1212const emits = defineEmits ([' parentAddItemBox' ])
1313const { curComponentId, curComponent } = storeToRefs (dashboardStore )
14- // @ts-expect-error eslint-disable-next-line @typescript-eslint/ban-ts-comment
15- let currentInstance
16- // Props
14+ let currentInstance: any
1715const props = defineProps ({
1816 canvasId: {
1917 type: String ,
2018 default: ' canvas-main' ,
2119 },
22- // eslint-disable-next-line vue/require-default-prop
2320 parentConfigItem: {
2421 type: Object as PropType <CanvasItem >,
2522 required: false ,
23+ default: null ,
2624 },
27- // eslint-disable-next-line vue/require-default-prop
2825 dashboardInfo: {
2926 type: Object ,
3027 required: false ,
28+ default: null ,
3129 },
32- // eslint-disable-next-line vue/require-default-prop
3330 canvasStyleData: {
3431 type: Object ,
3532 required: false ,
33+ default: null ,
3634 },
3735 canvasComponentData: {
3836 type: Array as PropType <CanvasItem []>,
@@ -122,7 +120,6 @@ const coordinates = ref<CanvasCoord[]>([])
122120const infoBox = ref ()
123121
124122// Position data (non-reactive)
125-
126123let lastTask: (() => void ) | undefined = undefined
127124let isOverlay = false
128125let itemMaxX = 0
@@ -193,9 +190,9 @@ function addItemToPositionBox(item: CanvasItem) {
193190 for (let i = item .x - 1 ; i < item .x - 1 + item .sizeX ; i ++ ) {
194191 for (let j = item .y - 1 ; j < item .y - 1 + item .sizeY ; j ++ ) {
195192 if (pb [j ] && pb [j ][i ]) {
196- // Ensure the target location is valid
193+ // Ensure the target location is valid & Place the item in the corresponding position
197194 // @ts-expect-error eslint-disable-next-line @typescript-eslint/ban-ts-comment
198- pb [j ][i ].el = item // Place the item in the corresponding position
195+ pb [j ][i ].el = item
199196 }
200197 }
201198 }
@@ -935,7 +932,6 @@ function startMove(e: MouseEvent, item: CanvasItem, index: number) {
935932 if (curActiveMoveInSQTab ) {
936933 if (curActiveMoveInSQTab .moveInActive ) {
937934 const refTabInstance =
938- // @ts-expect-error eslint-disable-next-line @typescript-eslint/ban-ts-comment
939935 currentInstance .refs [' shape_component_' + curActiveMoveInSQTab .id ][0 ]
940936 refTabInstance .addTabItem (moveItem )
941937 removeItemById (moveItem .id )
0 commit comments