From 33d10f190f089f0a4275093f2ebe9ed47bb21f7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Tue, 24 Dec 2024 11:12:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E6=8A=BD=E6=88=90=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model-custom/components/dialog.vue | 7 +- .../model-custom/components/index-default.ts | 8 +- .../model-custom/components/index.vue | 6 ++ .../model-custom/model-custom-content.vue | 93 +++---------------- 4 files changed, 23 insertions(+), 91 deletions(-) diff --git a/src/components/model-custom/components/dialog.vue b/src/components/model-custom/components/dialog.vue index e58506f4..48110538 100644 --- a/src/components/model-custom/components/dialog.vue +++ b/src/components/model-custom/components/dialog.vue @@ -9,8 +9,7 @@ diff --git a/src/components/model-custom/components/index-default.ts b/src/components/model-custom/components/index-default.ts index d47fcc01..f56a7588 100644 --- a/src/components/model-custom/components/index-default.ts +++ b/src/components/model-custom/components/index-default.ts @@ -1,5 +1,3 @@ -import { id } from "element-plus/es/locale" - // 文本的默认值 const text_com_data = { com_width: 150, @@ -175,6 +173,9 @@ const panel_com_data = { z_index: 0 } +const custom_group_com_data = { + custom_list: [], +} // 判断两个矩形是否有交集或者被包裹 export const isRectangleIntersecting = (rect1: react1, rect2: react1) => { // 矩形的格式为 { x, y, width, height } @@ -199,5 +200,6 @@ export const defaultComData = { img_com_data, line_com_data, icon_com_data, - panel_com_data + panel_com_data, + custom_group_com_data } \ No newline at end of file diff --git a/src/components/model-custom/components/index.vue b/src/components/model-custom/components/index.vue index 2d738818..f7afdfb5 100644 --- a/src/components/model-custom/components/index.vue +++ b/src/components/model-custom/components/index.vue @@ -163,6 +163,12 @@ const components = reactive([ new_name: '', com_data: defaultComData.panel_com_data, }, + { + key: 'custom-group', + name: '自定义组', + new_name: '', + com_data: defaultComData.custom_group_com_data, + }, ], }, ]); diff --git a/src/components/model-custom/model-custom-content.vue b/src/components/model-custom/model-custom-content.vue index adafd9a7..428f5e11 100644 --- a/src/components/model-custom/model-custom-content.vue +++ b/src/components/model-custom/model-custom-content.vue @@ -58,41 +58,13 @@ 自定义编辑 - -
- - - -
- - - - - - -
-
-
+ + +