index.js 795 B

123456789101112131415161718192021222324252627282930
  1. import NewNumberBar from './NewNumberBar';
  2. function ThresholdDetail(props) {
  3. const { data = {}, edit, onChange, onClick, current } = props;
  4. const { Type, JsonNumThreshold, ThresholdEnum } = data;
  5. if (Type == 2) {
  6. return (
  7. <div onClick={onClick}>
  8. {/* <NumberBar
  9. scale
  10. current={current}
  11. breakdown={JsonNumThreshold?.breakdown}
  12. exception={JsonNumThreshold?.exception}
  13. /> */}
  14. <NewNumberBar
  15. scale
  16. current={current}
  17. breakdown={JsonNumThreshold?.breakdown}
  18. exception={JsonNumThreshold?.exception}
  19. />
  20. </div>
  21. );
  22. } else if (Type == 0) {
  23. return <div>文本</div>;
  24. } else {
  25. return <div>枚举({ThresholdEnum})</div>;
  26. }
  27. }
  28. export default ThresholdDetail;