refactor: change canvas style

This commit is contained in:
wangjiahao
2025-08-05 11:53:03 +08:00
parent 8a6b734aa2
commit 6e3c22bba2
2 changed files with 1 additions and 6 deletions
@@ -251,9 +251,7 @@ function removeItemFromPositionBox(item: CanvasItem) {
*/
function recomputeCellWidth() {
if (!containerRef.value) return
maxCell.value = isMainCanvas(props.canvasId)
? Math.floor(containerRef.value.offsetWidth / cellWidth.value)
: Math.round(containerRef.value.offsetWidth / cellWidth.value)
maxCell.value = Math.floor(containerRef.value.offsetWidth / cellWidth.value)
}
function sizeInit() {
@@ -93,7 +93,6 @@ const baseParams = computed(() => {
<style scoped lang="less">
.editor-content {
padding: 8px;
width: 100vw;
height: 100vh;
background: #fff;
@@ -104,10 +103,8 @@ const baseParams = computed(() => {
padding: 0 !important;
}
.editor-main {
border-radius: 12px;
position: relative;
background: #f5f6f7;
box-shadow: 4px 4px 8px 4px rgba(31, 35, 41, 0.2);
overflow: hidden;
width: 100%;
height: 100%;