Ant Design Form.Item的label中文字换行的替代方式
生活随笔
收集整理的這篇文章主要介紹了
Ant Design Form.Item的label中文字换行的替代方式
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?
const FormItem=Form.Item;
替換代碼
<Row><div className={styles.label}>{checkItem.desc}</div><div className={styles.wrapper}><FormItem className='desc'>{getFieldDecorator(`check_is_do_${checkItem.id}`, {rules: [{required: true,message: "請選擇"}]})(<RadioGroup><Radio value="1">是</Radio><Radio value="0">否</Radio></RadioGroup>)}</FormItem></div></Row>替換樣式
.label{padding:10px 0px;width:510px;word-wrap: break-word;margin-right:20px;&::before {display: inline-block;margin-right: 4px;color: #f5222d;font-size: 14px;font-family: SimSun, sans-serif;line-height: 1;content: '*';}}原代碼
<Row> <FormItem label={checkItem.desc} className='desc'>{getFieldDecorator(`check_is_do_${checkItem.id}`, {rules: [{required: true,message: "請選擇"}]})(<RadioGroup><Radio value="1">是</Radio><Radio value="0">否</Radio></RadioGroup>)}</FormItem> </Row>?
總結
以上是生活随笔為你收集整理的Ant Design Form.Item的label中文字换行的替代方式的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 使用泛型解决之前的问题
- 下一篇: IIC总线设计⑥——时钟模块DS1302