diff --git a/packages/form/src/components/FormItem/index.tsx b/packages/form/src/components/FormItem/index.tsx index 828285b03528..b0d564b9c7d4 100644 --- a/packages/form/src/components/FormItem/index.tsx +++ b/packages/form/src/components/FormItem/index.tsx @@ -137,6 +137,10 @@ type WarpFormItemProps = { addonBefore?: React.ReactNode; /** @name 后置的dom * */ addonAfter?: React.ReactNode; + /** + * 包裹的样式,一般没用 + */ + addonWarpStyle?: React.CSSProperties; /** * @name 获取时转化值,一般用于将数据格式化为组件接收的格式 * @param value 字段的值 @@ -164,6 +168,7 @@ const WarpFormItem: React.FC = ({ addonAfter, addonBefore, valuePropName, + addonWarpStyle, convertValue, ...props }) => { @@ -211,6 +216,8 @@ const WarpFormItem: React.FC = ({ style={{ display: 'flex', alignItems: 'center', + flexWrap: 'wrap', + ...addonWarpStyle, }} > {addonBefore ? (