fix: 修复物料题型通用组件 BaseChoice 单选类型题重复触发 change 事件问题 (#164)

This commit is contained in:
alwayrun 2024-05-24 20:28:01 +08:00 committed by sudoooooo
parent 39ff6acf99
commit de7344b192

View File

@ -64,7 +64,10 @@ export default defineComponent({
const onRadioClick = (item, $event) => { const onRadioClick = (item, $event) => {
$event && $event.stopPropagation() $event && $event.stopPropagation()
$event && $event.preventDefault() $event && $event.preventDefault()
emit('change', item.hash)
if (!isChecked(item)) {
emit('change', item.hash)
}
} }
const onCheckboxClick = (item, $event) => { const onCheckboxClick = (item, $event) => {
$event && $event.stopPropagation() $event && $event.stopPropagation()