From 85da14ad4377e081a744934c3ded049808427f59 Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期三, 06 十一月 2024 17:12:24 +0800 Subject: [PATCH] 绘画插件修改 --- src/components/paint/index.vue | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/src/components/paint/index.vue b/src/components/paint/index.vue index 40386fc..180ddcc 100644 --- a/src/components/paint/index.vue +++ b/src/components/paint/index.vue @@ -55,7 +55,7 @@ export default { data() { return { - canvasWidth:400, + canvasWidth:window.innerWidth > 450 ? 400 : window.innerWidth - 30, backgroundImgUrl: "", // 鑳屾櫙 isDraw: true, // 缁樼敾銆佹閫夋ā寮� brush: "Pencil", // 鐢荤瑪绫诲瀷 @@ -127,15 +127,9 @@ }, }, mounted() { - this.handleCanvasWidth() this.init(); }, methods: { - handleCanvasWidth() { - if(window.innerWidth < 450) { - this.canvasWidth = window.innerWidth - 30 - } - }, // 鍒濆鍖栫敾甯� init() { this.canvas = new fabric.Canvas( -- Gitblit v1.9.1