mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 10:07:07 +00: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:
@@ -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) }
|
||||
|
Reference in New Issue
Block a user