From a942850e0ae9070f396517f7e8556ce06559347e Mon Sep 17 00:00:00 2001 From: yangxuexue Date: Tue, 18 Jun 2024 17:46:39 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat(number-input):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=89=8D=E7=BC=80=E5=90=8E=E7=BC=80=E5=86=85=E5=AE=B9=E6=89=A9?= =?UTF-8?q?=E5=B1=95(#2906)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/number-input/src/NumberInput.tsx | 3 ++- .../number-input/src/styles/number-input.scss | 16 +++++++++---- .../ui/number-input/stories/addon.stories.tsx | 24 +++++++++++++++++++ .../ui/number-input/stories/index.stories.tsx | 1 + 4 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 packages/ui/number-input/stories/addon.stories.tsx 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}