From ea342a0d0b2b489206cc28bd3dc85c4350c725b3 Mon Sep 17 00:00:00 2001 From: alwayrun Date: Wed, 29 May 2024 21:35:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=A2=98=E5=9E=8B?= =?UTF-8?q?=E6=8B=96=E6=8B=BD=E7=A7=BB=E5=8A=A8=E9=97=AE=E9=A2=98=20(#218)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/edit/components/MaterialGroup.vue | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/web/src/management/pages/edit/components/MaterialGroup.vue b/web/src/management/pages/edit/components/MaterialGroup.vue index cdf0d9e9..f59932ab 100644 --- a/web/src/management/pages/edit/components/MaterialGroup.vue +++ b/web/src/management/pages/edit/components/MaterialGroup.vue @@ -87,11 +87,17 @@ export default defineComponent({ } const checkEnd = ({ oldIndex, newIndex }) => { - emit('changeSeq', { - type: 'move', - index: oldIndex, - range: newIndex - oldIndex - }) + if (oldIndex !== newIndex) { + emit('changeSeq', { + type: 'move', + index: newIndex, + range: 0 + }) + + if (props.currentEditOne === oldIndex) { + emit('select', newIndex) + } + } } const instance = getCurrentInstance()