tk2312-web/src/uapbd/common/components/BDFormItem/index.js

39 lines
1.2 KiB
JavaScript

/*IHTivaHGTSm9T7chEWjS8QMwpg1SIEMOeDuzFmjloOo=*/
/*
* @Descripttion:
* @version:
* @Author: Chendch
* @Date: 2022-05-13 16:06:20
* @LastEditors: Chendch
* @LastEditTime: 2022-05-20 13:29:38
*/
import React, {PureComponent, Fragment} from "react";
require("./index.less");
export default class BDFormItem extends PureComponent{
constructor(props){
super(props);
}
render() {
const {options = [], lineWrap = false, className="", style = {}} = this.props;
return (
<div className={`${lineWrap ? "" : "uapbd-form-flex-container-row-container"} ${className}`} style={style}>
{options.map( ele => {
return (
<div className="uapbd-form-flex-contain">
<div className="uapbd-form-flex-label nc-theme-form-label-c">
{ele.isRequired === true && <span className="required-style">*</span>}
{ele.label}
</div>
<div className="uapbd-form-flex-input nc-theme-from-input-bgc nc-theme-form-input-c">
{ele.input}
</div>
</div>
)
})}
</div>
)
}
}
/*IHTivaHGTSm9T7chEWjS8QMwpg1SIEMOeDuzFmjloOo=*/