Skip to content

Commit

Permalink
fix: 修复物料题型通用组件 BaseChoice 单选类型题重复触发 change 事件问题 (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
alwayrun authored May 24, 2024
1 parent d3378ad commit 0095e3b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/src/materials/questions/widgets/BaseChoice/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ export default defineComponent({
const onRadioClick = (item, $event) => {
$event && $event.stopPropagation()
$event && $event.preventDefault()
emit('change', item.hash)

if (!isChecked(item)) {
emit('change', item.hash)
}
}
const onCheckboxClick = (item, $event) => {
$event && $event.stopPropagation()
Expand Down

0 comments on commit 0095e3b

Please sign in to comment.