From 93346c5f8701e46b0aeded2d7f7464394bfb0dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Wed, 18 Sep 2024 13:42:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/model-custom/components/index.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/model-custom/components/index.vue b/src/components/model-custom/components/index.vue index 7aaaecec..092c6f1e 100644 --- a/src/components/model-custom/components/index.vue +++ b/src/components/model-custom/components/index.vue @@ -41,7 +41,7 @@
- +
@@ -293,6 +293,8 @@ const dragEndHandle = (item: any, index: number) => { // {x: number, y: number, w: number, h: number} const resizingHandle = (new_location: any, key: string, index: number) => { const { x, y, w, h } = new_location; + console.log(new_location); + diy_data.value[index].location = { x, y, record_x: x, record_y: y, staging_y: y }; const com_data = diy_data.value[index].com_data; com_data.com_width = w; @@ -310,10 +312,10 @@ const resizingHandle = (new_location: any, key: string, index: number) => { }; // 图片大小的计算 const handleImg = (com_data: any, w: number, h: number ) => { - if (com_data.border_show) { + if (com_data.border_show == '1') { return { img_width: w - com_data.border_size * 2, img_height: h - com_data.border_size * 2 } } else { - return { img_width: w, img_height: h } + return { img_width: w, img_height: h } } }; // 线条的计算 @@ -657,10 +659,8 @@ defineExpose({ background: #fff; margin: 0 auto; .drag-area { - height: calc(v-bind(drag_area_height) + 0.4rem); - width: calc(100% + 0.4rem); - left: -0.2rem; - bottom: -0.2rem; + height: v-bind(drag_area_height); + width: 100%; margin: 0.5rem 0; // 用于将上边框和下边框显示出来 user-select: none; cursor: crosshair;