import React from 'react'; import { WeaSlideModal } from 'ecCom'; import { Button } from 'antd'; export default class SidePage extends React.Component { constructor(props) { super(props); this.state = { visible: false, data:{} } } componentDidMount() { this.props.onRef(this) } componentDidUpdate(prevProps, prevState) { if (prevProps.data !== this.props.data) { } } openSide = (data) => { this.setState({ visible: true, data:data}) } render() { const { visible,data } = this.state; return ( {JSON.stringify(data)})} onClose={() => this.setState({ visible: false })} onAnimationEnd={() => console.log('onAnimationEnd')} /> ) } }