From 3be509f0ead5cf29cecc2ffac7c9665aec7f8460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Mon, 26 Aug 2024 09:31:22 +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=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/model-custom/components/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/model-custom/components/index.vue b/src/components/model-custom/components/index.vue index 3a8e3365..6ffba486 100644 --- a/src/components/model-custom/components/index.vue +++ b/src/components/model-custom/components/index.vue @@ -198,8 +198,6 @@ watch(() => center_height.value, () => { data = diy_data.value; // 从 DOM 中删除组件 draggable_container.value = false; - // 容器高度变化时,组件不绑定右侧数据 - emits('rightUpdate', {}); nextTick(() => { // 在 DOM 中添加组件 diy_data.value = data.map((item) => ({ @@ -217,9 +215,11 @@ watch(() => center_height.value, () => { com_height: item.com_data.staging_height, }, })); + // 容器高度变化时,组件不绑定右侧数据 + emits('rightUpdate', {}); draggable_container.value = true; }); -},{ deep: true }); +},{ immediate:true, deep: true }); //#endregion //#region 左侧拖拽过来的处理 let draggedItem = ref({});