fix: long text will wrap in FormItem (#295)

This commit is contained in:
SemmyWong 2022-04-17 23:11:05 +08:00 committed by GitHub
parent 8e11e8d364
commit e21d819155
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,4 @@
import { css } from '@emotion/css';
import { FormItem as Item } from '@formily/antd'; import { FormItem as Item } from '@formily/antd';
import { Field } from '@formily/core'; import { Field } from '@formily/core';
import { ISchema, useField, useFieldSchema } from '@formily/react'; import { ISchema, useField, useFieldSchema } from '@formily/react';
@ -14,6 +15,9 @@ export const FormItem: any = (props) => {
return ( return (
<BlockItem className={'nb-form-item'}> <BlockItem className={'nb-form-item'}>
<Item <Item
className={`${css`& .ant-space{
flex-wrap:wrap;
}`}`}
{...props} {...props}
extra={ extra={
field.description ? ( field.description ? (