fix: 修复活动题型选区多次点击重复触发 select 事件 (#155)
This commit is contained in:
parent
627eabd8b2
commit
24881d7cdc
@ -63,15 +63,14 @@ export default defineComponent({
|
|||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
const renderData = computed({
|
const renderData = computed({
|
||||||
get () {
|
get() {
|
||||||
return filterQuestionPreviewData(props.questionDataList)
|
return filterQuestionPreviewData(props.questionDataList)
|
||||||
},
|
},
|
||||||
set (questionDataList) {
|
set(questionDataList) {
|
||||||
store.commit('edit/setQuestionDataList', questionDataList)
|
store.commit('edit/setQuestionDataList', questionDataList)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const handleSelect = (index) => {
|
const handleSelect = (index) => {
|
||||||
console.log('materialGroup-handleSelect', index)
|
|
||||||
emit('select', index)
|
emit('select', index)
|
||||||
}
|
}
|
||||||
const handleChange = (data) => {
|
const handleChange = (data) => {
|
||||||
|
@ -88,7 +88,10 @@ const showCopy = computed(() => {
|
|||||||
|
|
||||||
const clickFormItem = () => {
|
const clickFormItem = () => {
|
||||||
const index = props.qIndex
|
const index = props.qIndex
|
||||||
|
|
||||||
|
if (!props.isSelected) {
|
||||||
emit('select', index)
|
emit('select', index)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const onCopy = () => {
|
const onCopy = () => {
|
||||||
const index = props.qIndex
|
const index = props.qIndex
|
||||||
@ -115,7 +118,7 @@ const onMoveDown = () => {
|
|||||||
isHover.value = false
|
isHover.value = false
|
||||||
}
|
}
|
||||||
const onDelete = async () => {
|
const onDelete = async () => {
|
||||||
if(unref(hasShowLogic)) {
|
if (unref(hasShowLogic)) {
|
||||||
ElMessageBox.alert('该问题被逻辑依赖,请先删除逻辑依赖', '提示', {
|
ElMessageBox.alert('该问题被逻辑依赖,请先删除逻辑依赖', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
@ -193,10 +196,10 @@ const onMove = () => {}
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.logic-text{
|
.logic-text {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #c8c9cd;
|
color: #c8c9cd;
|
||||||
padding: 0 .4rem;
|
padding: 0 0.4rem;
|
||||||
line-height: 26px;
|
line-height: 26px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user