mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Radio): icon ref may be undefined (#9504)
This commit is contained in:
parent
43b725d020
commit
d2b67fda74
@ -65,7 +65,7 @@ export const CheckboxMixin = ({ parent, bem, role }) => ({
|
|||||||
onClick(event) {
|
onClick(event) {
|
||||||
const { target } = event;
|
const { target } = event;
|
||||||
const { icon } = this.$refs;
|
const { icon } = this.$refs;
|
||||||
const iconClicked = icon === target || icon.contains(target);
|
const iconClicked = icon === target || icon?.contains(target);
|
||||||
|
|
||||||
if (!this.isDisabled && (iconClicked || !this.labelDisabled)) {
|
if (!this.isDisabled && (iconClicked || !this.labelDisabled)) {
|
||||||
this.toggle();
|
this.toggle();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user