mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
fix(Filed): onclick label execute twice (#11838)
* fix(Filed): onclick label execute twice * fix(Filed): onclick label execute twice * Update Field.tsx --------- Co-authored-by: zyc <1439655764> Co-authored-by: neverland <jait.chen@foxmail.com>
This commit is contained in:
parent
d05972d229
commit
ca59be8ea6
@ -584,6 +584,11 @@ export default defineComponent({
|
||||
<label
|
||||
id={`${id}-label`}
|
||||
for={getInputId()}
|
||||
onClick={(event: MouseEvent) => {
|
||||
// https://github.com/youzan/vant/issues/11831
|
||||
preventDefault(event);
|
||||
focus();
|
||||
}}
|
||||
style={
|
||||
labelAlign === 'top' && labelWidth
|
||||
? { width: addUnit(labelWidth) }
|
||||
|
Loading…
x
Reference in New Issue
Block a user