weaver_trunk_cli/pc4mobx/hrm/coms/inputBtn.js

24 lines
703 B
JavaScript
Raw Normal View History

2024-12-11 15:32:14 +08:00
import {WeaInput} from 'ecCom';
import {Button} from 'antd';
class Main extends React.Component {
constructor(props) {
super(props);
}
onBtnClick = () => {
this.props.onBtnClick && this.props.onBtnClick(this.props.value);
}
render() {
const {props} = this;
const {viewAttr} = props;
return (
<div className="hrm-input-btn">
<WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@9ze5u3`} {...props} />
{
viewAttr!='1' && <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@xjfmk5`} type="primary" onClick={this.onBtnClick}>{props.btnText}</Button>
}
</div>
)
}
}
export default Main;