diff --git a/.changeset/friendly-kiwis-juggle.md b/.changeset/friendly-kiwis-juggle.md new file mode 100644 index 0000000000..523461b238 --- /dev/null +++ b/.changeset/friendly-kiwis-juggle.md @@ -0,0 +1,5 @@ +--- +'@td-design/react-native': patch +--- + +fix: 修复 FormItem 下的 Input/InputItem 组件的 inputStyle 不生效的问题 diff --git a/packages/react-native/src/form/FormItem.tsx b/packages/react-native/src/form/FormItem.tsx index ffc22f3afb..5df9a4e088 100644 --- a/packages/react-native/src/form/FormItem.tsx +++ b/packages/react-native/src/form/FormItem.tsx @@ -70,9 +70,14 @@ const FormItem: FC = ({ children, type = 'bottom', name, ...field style: { height: formItemHeight, }, - inputStyle: { - padding: 0, - }, + inputStyle: children.props.inputStyle + ? { + padding: 0, + ...children.props.inputStyle, + } + : { + padding: 0, + }, })}