king
2020-07-23 71fce3cc19f80a6e0eba36cfc5e67995ee9712ff
src/templates/sharecomponent/cardcomponent/index.jsx
@@ -38,7 +38,7 @@
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (!is(fromJS(this.props.card), fromJS(nextProps.card))) {
      setTimeout(() => {
        if (nextProps.card.insert === 'true' && this.cardRef) {
        if (nextProps.card.extraAction && this.cardRef) {
          if (this.cardRef.offsetWidth !== this.state.cardwidth || this.cardRef.offsetHeight !== this.state.cardheight) {
            this.setState({
              cardwidth: this.cardRef.offsetWidth,
@@ -311,7 +311,7 @@
  componentDidMount() {
    const { card } = this.props
    if (card.insert === 'true' && this.cardRef) {
    if (card.extraAction && this.cardRef) {
      this.setState({
        cardwidth: this.cardRef.offsetWidth,
        cardheight: this.cardRef.offsetHeight
@@ -322,7 +322,7 @@
  componentDidUpdate() {
    const { card } = this.props
    if (card.insert === 'true' && this.cardRef) {
    if (card.extraAction && this.cardRef) {
      if (this.cardRef.offsetWidth !== this.state.cardwidth || this.cardRef.offsetHeight !== this.state.cardheight) {
        this.setState({
          cardwidth: this.cardRef.offsetWidth,
@@ -437,7 +437,7 @@
            </ul> : null
          }
        </div>
        {card.insert === 'true' ?
        {card.extraAction ?
          <div className={'ant-card chart-card chart-card-insert' + outclass} style={{ width: cardwidth, height: cardheight }} >
            <Icon type="plus" style={cardwidth > cardheight ? {fontSize: cardheight / 2 + 'px', lineHeight: cardheight + 'px'} : {fontSize: cardwidth / 2 + 'px', lineHeight: cardheight + 'px'}} />
          </div> : null