| | |
| | | data: PropTypes.object, |
| | | } |
| | | |
| | | state = { |
| | | card: null, // 卡片信息,包括正反面 |
| | | } |
| | | |
| | | /** |
| | | * @description 搜索条件初始化 |
| | | */ |
| | | UNSAFE_componentWillMount () { |
| | | |
| | | } |
| | | state = {} |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.state), fromJS(nextState)) || !is(fromJS(this.props), fromJS(nextProps)) |
| | | return !is(fromJS(this.props.data), fromJS(nextProps.data)) |
| | | } |
| | | |
| | | /** |
| | |
| | | render() { |
| | | const { card, data, cards, children } = this.props |
| | | let style = {...card.style} |
| | | |
| | | let bg = null |
| | | |
| | | if (card.setting.bgField) { |
| | |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.props), fromJS(nextProps)) |
| | | return !is(fromJS(this.props.data), fromJS(nextProps.data)) |
| | | } |
| | | |
| | | /** |