import React from 'react';
import { Tree } from 'antd';

export default class TreeDiy extends React.Component {
  constructor(props) {
    super(props);
    const allJson = props.option || {};
    this.state = {
      allJson,
    };
  }
  // static getDerivedStateFromProps(nextProps, prevState) {
  //   if ('value' in nextProps) {
  //     return { ...nextProps.value }; // 更新state
  //   }
  // }
  // componentDidUpdate(prevProps, prevState) {}

  render() {
    return <Tree {...this.state.allJson} />;
  }
}
