diff --git a/.changeset/dull-carrots-shout.md b/.changeset/dull-carrots-shout.md new file mode 100644 index 000000000..aad80f05a --- /dev/null +++ b/.changeset/dull-carrots-shout.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/hiui": patch +--- + +feat(number-input): 新增前缀后缀内容扩展 diff --git a/.changeset/soft-actors-perform.md b/.changeset/soft-actors-perform.md new file mode 100644 index 000000000..f4a5a78c2 --- /dev/null +++ b/.changeset/soft-actors-perform.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/number-input": minor +--- + +feat: 新增前缀后缀内容扩展 diff --git a/packages/ui/number-input/src/NumberInput.tsx b/packages/ui/number-input/src/NumberInput.tsx index 5184e6990..730627075 100644 --- a/packages/ui/number-input/src/NumberInput.tsx +++ b/packages/ui/number-input/src/NumberInput.tsx @@ -11,7 +11,7 @@ const _prefix = getPrefixCls('number-input') * 数字输入框 */ export const NumberInput = forwardRef( - ({ prefixCls = _prefix, role = _role, ...rest }, ref) => { + ({ prefixCls = _prefix, role = _role, prefix, ...rest }, ref) => { const { rootProps, getInputProps, getMinusButtonProps, getPlusButtonProps } = useCounter({ prefixCls, role, @@ -20,6 +20,7 @@ export const NumberInput = forwardRef( return (
+ {prefix ? {prefix} : null}