| | |
| | | elements: PropTypes.array, // 元素集 |
| | | } |
| | | |
| | | state = {} |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.state), fromJS(nextState)) || !is(fromJS(this.props), fromJS(nextProps)) |
| | | return !is(fromJS(this.props), fromJS(nextProps)) |
| | | } |
| | | |
| | | /** |
| | |
| | | node && node.scrollIntoView({behavior: 'smooth', block: 'center', inline: 'nearest'}) |
| | | } |
| | | |
| | | if (!card.link) return |
| | | if (!card.link || (card.linkType === 'qywx' || card.linkType === 'linkmenu')) return |
| | | e.stopPropagation() |
| | | |
| | | let url = '' |
| | |
| | | } |
| | | window.open(_url) |
| | | return |
| | | } else if (card.linkType === 'qywx') { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: 'PC不支持打开企业微信!', |
| | | duration: 5 |
| | | }) |
| | | } else if (card.linkType === 'other' && /^@menuid@/ig.test(url)) { |
| | | return |
| | | } |
| | | |
| | |
| | | // eslint-disable-next-line |
| | | _val = eval(_val) |
| | | } catch (e) { |
| | | if (window.debugger) { |
| | | console.info(_val) |
| | | console.warn(e) |
| | | } |
| | | _val = 0 |
| | | } |
| | | } |
| | |
| | | // eslint-disable-next-line |
| | | _val = eval(_val) |
| | | } catch (e) { |
| | | if (window.debugger) { |
| | | console.info(_val) |
| | | console.warn(e) |
| | | } |
| | | _val = '' |
| | | } |
| | | } |
| | |
| | | if (!val && card.noValue === 'hide') { // 空值隐藏 |
| | | return null |
| | | } |
| | | |
| | | if (card.round && typeof(val) === 'number') { |
| | | val = Math.round(val * card.round) / card.round |
| | | val = val.toFixed(card.decimal) |
| | | } |
| | | |
| | | if (val !== '') { |
| | | if (val && typeof(val) === 'string') { |