From 3902b16e2bb4529d6b4bf896049a53a39e16b49c Mon Sep 17 00:00:00 2001 From: sws <1141121512@qq.com> Date: Thu, 22 Aug 2024 11:49:41 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=96=87=E7=AB=A0=E9=80=89=E9=A1=B9=E5=8D=A1?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=81=94=E8=B0=83=20sws=202024-08-22?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/base/drag/index.vue | 14 ++++++++++---- .../common/url-value/url-value-dialog.vue | 1 - 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/components/base/drag/index.vue b/src/components/base/drag/index.vue index 20bb51c1..c44114f8 100644 --- a/src/components/base/drag/index.vue +++ b/src/components/base/drag/index.vue @@ -43,8 +43,13 @@ if (props.type == 'card') { // 不是卡片类型的设置居中显示 className.value = 'align-c'; } - -const from = computed(() => props.data); +watch( + () => props.data, + () => { + from.value = props.data; + } +); +const from = ref(props.data); const on_click = (item: any, index: number) => { emits('click', item, index); @@ -58,7 +63,7 @@ const edit = (index: number) => { }; // 拖拽更新之后用户更新数据 const on_sort = () => { - emits('onSort', from); + emits('onSort', from.value); };