From 8ce6dc7607b1bf801e282bb9cd5bcc5f28c6d5bd Mon Sep 17 00:00:00 2001 From: dayou <853094838@qq.com> Date: Thu, 23 May 2024 11:39:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dattrs=E9=80=8F?= =?UTF-8?q?=E4=BC=A0=E4=BC=9A=E8=A7=A6=E5=8F=91=E4=B8=A4=E6=AC=A1select?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=20(#138)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/edit/components/MaterialGroup.vue | 12 ++++++++---- .../materials/questions/QuestionContainerB/index.jsx | 4 ---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/web/src/management/pages/edit/components/MaterialGroup.vue b/web/src/management/pages/edit/components/MaterialGroup.vue index c3edfd9e..37f65439 100644 --- a/web/src/management/pages/edit/components/MaterialGroup.vue +++ b/web/src/management/pages/edit/components/MaterialGroup.vue @@ -10,7 +10,6 @@ > @@ -60,9 +59,9 @@ export default defineComponent({ } } }, + emits: ['change', 'select', 'changeSeq'], setup(props, { emit }) { const store = useStore() - const renderData = computed({ get () { return filterQuestionPreviewData(props.questionDataList) @@ -72,8 +71,12 @@ export default defineComponent({ } }) const handleSelect = (index) => { + console.log('materialGroup-handleSelect', index) emit('select', index) } + const handleChange = (data) => { + emit('change', data) + } const handleChangeSeq = (data) => { emit('changeSeq', data) } @@ -102,6 +105,7 @@ export default defineComponent({ DND_GROUP, renderData, handleSelect, + handleChange, handleChangeSeq, checkMove, checkEnd, diff --git a/web/src/materials/questions/QuestionContainerB/index.jsx b/web/src/materials/questions/QuestionContainerB/index.jsx index 2660c75f..a11debe0 100644 --- a/web/src/materials/questions/QuestionContainerB/index.jsx +++ b/web/src/materials/questions/QuestionContainerB/index.jsx @@ -75,14 +75,10 @@ export default defineComponent({ const onChange = (data) => { emit('change', data) } - const onClick = () => { - emit('select', props.indexNumber) - } return { props, BlockComponent, - onClick, onBlur, onFocus, onChange,