fix(input-number): fix the issuse of missing id when use in form (#6519)

closed #6466
pull/6524/head
Zhan Dong 2 years ago committed by GitHub
parent b39f2b2d03
commit 3b37cc1ae7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -76,6 +76,7 @@ const InputNumber = defineComponent({
emit('focus', e);
};
return () => {
const id = props.id ?? formItemContext.id.value;
const {
class: className,
bordered,
@ -86,7 +87,7 @@ const InputNumber = defineComponent({
prefix = slots.prefix?.(),
valueModifiers = {},
...others
} = { ...attrs, ...props } as InputNumberProps & HTMLAttributes;
} = { ...attrs, ...props, id } as InputNumberProps & HTMLAttributes;
const preCls = prefixCls.value;

Loading…
Cancel
Save