weaver_trunk_cli/pc4mobx/hrm/coms/inputBtn.js

24 lines
703 B
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;