index.jsx 773 B

1234567891011121314151617181920212223242526272829
  1. import React from 'react';
  2. import style from "./index.less";
  3. import PropTypes from "prop-types";
  4. /**
  5. *
  6. */
  7. class InspectCommon extends React.Component {
  8. constructor(props) {
  9. super(props);
  10. }
  11. render() {
  12. const { children,handleClear,handleConfirm} = this.props;
  13. return <div className={ style.wrapper} id="inspectFill">
  14. {children}
  15. <div className={style.btnWrap}>
  16. <span className={style.clear + ' red'} onClick={handleClear}>清空选项</span>
  17. <span className={style.sure} onClick={handleConfirm}>确定</span>
  18. </div>
  19. </div>
  20. }
  21. }
  22. InspectCommon.propTypes = {
  23. handleClear: PropTypes.func,
  24. handleConfirm: PropTypes.func
  25. };
  26. export default InspectCommon;