@@ -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;
From bf7e0f9c8d28f8c2b601ad170eab9c2f55c779a8 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:56:29 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=87=AA=E5=AE=9A?=
=?UTF-8?q?=E4=B9=89=E7=9A=84=E9=BB=98=E8=AE=A4=E6=95=B0=E6=8D=AE=E6=98=BE?=
=?UTF-8?q?=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 | 2 --
src/views/layout/index.vue | 4 ++++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/components/model-custom/components/index.vue b/src/components/model-custom/components/index.vue
index 092c6f1e..ddb05b21 100644
--- a/src/components/model-custom/components/index.vue
+++ b/src/components/model-custom/components/index.vue
@@ -293,8 +293,6 @@ 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;
diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue
index 9dae554a..7e90f183 100644
--- a/src/views/layout/index.vue
+++ b/src/views/layout/index.vue
@@ -195,6 +195,8 @@ const save_formmat_form_data = (data: diy_data_item, close: boolean = false, is_
const new_array_3 = ['coupon'];
// 层级更深
const new_array_4 = ['data-magic'];
+ // 自定义数据
+ const new_array_5 = ['custom'];
clone_form.diy_data = clone_form.diy_data.map((item: any) => {
if (new_array_1.includes(item.key)) {
item.com_data.content.data_ids = item.com_data.content.data_list.map((item: any) => item.data.id).join(',') || '';
@@ -230,6 +232,8 @@ const save_formmat_form_data = (data: diy_data_item, close: boolean = false, is_
};
});
});
+ } else if (new_array_5.includes(item.key)) {
+ item.com_data.content.data_source_content = {};
}
return {
...item,