fix: button wave error, close #6895
parent
1f01ae0728
commit
9855e43805
|
@ -41,21 +41,20 @@ export default defineComponent({
|
||||||
const node = findDOMNode(instance);
|
const node = findDOMNode(instance);
|
||||||
node.removeEventListener('click', onClick, true);
|
node.removeEventListener('click', onClick, true);
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
watch(
|
watch(
|
||||||
() => props.disabled,
|
() => props.disabled,
|
||||||
() => {
|
() => {
|
||||||
clear();
|
clear();
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
const node = findDOMNode(instance);
|
const node: HTMLElement = findDOMNode(instance);
|
||||||
|
node?.removeEventListener('click', onClick, true);
|
||||||
if (!node || node.nodeType !== 1 || props.disabled) {
|
if (!node || node.nodeType !== 1 || props.disabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Click handler
|
// Click handler
|
||||||
const onClick = (e: MouseEvent) => {
|
onClick = (e: MouseEvent) => {
|
||||||
// Fix radio button click twice
|
// Fix radio button click twice
|
||||||
if (
|
if (
|
||||||
(e.target as HTMLElement).tagName === 'INPUT' ||
|
(e.target as HTMLElement).tagName === 'INPUT' ||
|
||||||
|
|
Loading…
Reference in New Issue