fix(input-number): fix the issuse of missing id when use in form (#6519)
closed #6466pull/6524/head
parent
b39f2b2d03
commit
3b37cc1ae7
|
@ -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…
Reference in New Issue