fix: button wave error, close #6895

pull/6917/head
tangjinzhou 2023-08-30 16:05:54 +08:00
parent 1f01ae0728
commit 9855e43805
1 changed files with 3 additions and 4 deletions

View File

@ -41,21 +41,20 @@ export default defineComponent({
const node = findDOMNode(instance);
node.removeEventListener('click', onClick, true);
};
onMounted(() => {
watch(
() => props.disabled,
() => {
clear();
nextTick(() => {
const node = findDOMNode(instance);
const node: HTMLElement = findDOMNode(instance);
node?.removeEventListener('click', onClick, true);
if (!node || node.nodeType !== 1 || props.disabled) {
return;
}
// Click handler
const onClick = (e: MouseEvent) => {
onClick = (e: MouseEvent) => {
// Fix radio button click twice
if (
(e.target as HTMLElement).tagName === 'INPUT' ||