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;