fix(segmented): unable to switch again when the switch is rejected

pull/8052/head
laihanbin 2025-03-07 11:06:33 +08:00
parent aa211fd789
commit 160649c7d3
1 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,4 @@
import { defineComponent, shallowRef, computed } from 'vue';
import { defineComponent, shallowRef, computed, nextTick } from 'vue';
import type { ExtractPropTypes, FunctionalComponent } from 'vue';
import classNames from '../../_util/classNames';
import useConfigInject from '../../config-provider/hooks/useConfigInject';
@ -75,6 +75,10 @@ const SegmentedOption: FunctionalComponent<
}
emit('change', event, value);
nextTick(() => {
(event.target as HTMLInputElement).checked = checked;
});
};
return (