From 24881d7cdcd2f6cf42ac4355eda8449733676995 Mon Sep 17 00:00:00 2001 From: alwayrun Date: Thu, 23 May 2024 16:38:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E9=A2=98=E5=9E=8B=E9=80=89=E5=8C=BA=E5=A4=9A=E6=AC=A1=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E9=87=8D=E5=A4=8D=E8=A7=A6=E5=8F=91=20select=20?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=20(#155)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/edit/components/MaterialGroup.vue | 5 ++--- .../pages/edit/components/QuestionWrapper.vue | 13 ++++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/web/src/management/pages/edit/components/MaterialGroup.vue b/web/src/management/pages/edit/components/MaterialGroup.vue index 37f65439..cdf0d9e9 100644 --- a/web/src/management/pages/edit/components/MaterialGroup.vue +++ b/web/src/management/pages/edit/components/MaterialGroup.vue @@ -63,15 +63,14 @@ export default defineComponent({ setup(props, { emit }) { const store = useStore() const renderData = computed({ - get () { + get() { return filterQuestionPreviewData(props.questionDataList) }, - set (questionDataList) { + set(questionDataList) { store.commit('edit/setQuestionDataList', questionDataList) } }) const handleSelect = (index) => { - console.log('materialGroup-handleSelect', index) emit('select', index) } const handleChange = (data) => { diff --git a/web/src/management/pages/edit/components/QuestionWrapper.vue b/web/src/management/pages/edit/components/QuestionWrapper.vue index 763200f4..0ab1355d 100644 --- a/web/src/management/pages/edit/components/QuestionWrapper.vue +++ b/web/src/management/pages/edit/components/QuestionWrapper.vue @@ -6,7 +6,7 @@ @click="clickFormItem" >
- +
@@ -88,7 +88,10 @@ const showCopy = computed(() => { const clickFormItem = () => { const index = props.qIndex - emit('select', index) + + if (!props.isSelected) { + emit('select', index) + } } const onCopy = () => { const index = props.qIndex @@ -115,7 +118,7 @@ const onMoveDown = () => { isHover.value = false } const onDelete = async () => { - if(unref(hasShowLogic)) { + if (unref(hasShowLogic)) { ElMessageBox.alert('该问题被逻辑依赖,请先删除逻辑依赖', '提示', { confirmButtonText: '确定', type: 'warning' @@ -193,10 +196,10 @@ const onMove = () => {} } } } - .logic-text{ + .logic-text { font-size: 12px; color: #c8c9cd; - padding: 0 .4rem; + padding: 0 0.4rem; line-height: 26px; } }