Skip to content

Commit

Permalink
feat(form):addonBefore warp support style
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Oct 26, 2023
1 parent 160faa3 commit 5dd732e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/form/src/components/FormItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ type WarpFormItemProps = {
addonBefore?: React.ReactNode;
/** @name 后置的dom * */
addonAfter?: React.ReactNode;
/**
* 包裹的样式,一般没用
*/
addonWarpStyle?: React.CSSProperties;
/**
* @name 获取时转化值,一般用于将数据格式化为组件接收的格式
* @param value 字段的值
Expand Down Expand Up @@ -164,6 +168,7 @@ const WarpFormItem: React.FC<FormItemProps & WarpFormItemProps> = ({
addonAfter,
addonBefore,
valuePropName,
addonWarpStyle,
convertValue,
...props
}) => {
Expand Down Expand Up @@ -211,6 +216,8 @@ const WarpFormItem: React.FC<FormItemProps & WarpFormItemProps> = ({
style={{
display: 'flex',
alignItems: 'center',
flexWrap: 'wrap',
...addonWarpStyle,
}}
>
{addonBefore ? (
Expand Down

0 comments on commit 5dd732e

Please sign in to comment.