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

Loading…
Cancel
Save