Ant Design Form.Item的label中文字换行的替代方式

 

const FormItem=Form.Item;

替换代码


                                    
{checkItem.desc}
{getFieldDecorator(`check_is_do_${checkItem.id}`, { rules: [ { required: true, message: "请选择" } ] })( )}

替换样式

.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: '*';
        }
      }

原代码



                                        {getFieldDecorator(`check_is_do_${checkItem.id}`, {
                                          rules: [
                                            {
                                              required: true,
                                              message: "请选择"
                                            }
                                          ]
                                        })(
                                          
                                            
                                            
                                          
                                        )}
                                      

 

你可能感兴趣的:(Ant,Design,Ant,Design)