| | |
| | | icon = card.icon |
| | | } |
| | | |
| | | if (!icon && card.noValue === 'hide') { // 空值隐藏 |
| | | return null |
| | | } |
| | | |
| | | if (!height) { // 兼容 |
| | | let fontSize = 14 |
| | | let lineHeight = 1.5 |
| | |
| | | if (url === '' && card.noValue === 'hide') { // 空值隐藏 |
| | | return null |
| | | } |
| | | |
| | | if (_style.borderRadius) { |
| | | _imagestyle.borderRadius = _style.borderRadius |
| | | } |
| | | |
| | | if (PicRadio[card.lenWidRadio]) { |
| | | _imagestyle.paddingTop = PicRadio[card.lenWidRadio] |
| | |
| | | _imagestyle.paddingTop = '100%' |
| | | } |
| | | |
| | | _imagestyle.backgroundSize = card.backgroundSize || 'cover' |
| | | _imagestyle.borderRadius = _style.borderRadius || 0 |
| | | _imagestyle.backgroundSize = _style.backgroundSize || 'cover' |
| | | _imagestyle.backgroundPosition = _style.backgroundPosition || 'center' |
| | | _imagestyle.backgroundRepeat = _style.backgroundRepeat || 'no-repeat' |
| | | |
| | | if (card.link) { |
| | | _style.cursor = 'pointer' |
| | |
| | | ) |
| | | } else if (card.eleType === 'button') { |
| | | let _disabled = data.$disabled |
| | | if (card.control === 'hidden') { |
| | | let s = data[card.controlField] !== undefined ? data[card.controlField] + '' : '' |
| | | if (s === card.controlVal || (card.controlVal && card.controlVal.split(',').includes(s))) { |
| | | return null |
| | | } |
| | | } else if (card.control === 'disabled') { |
| | | let s = data[card.controlField] !== undefined ? data[card.controlField] + '' : '' |
| | | if (s === card.controlVal || (card.controlVal && card.controlVal.split(',').includes(s))) { |
| | | _disabled = true |
| | | } |
| | | } |
| | | |
| | | let _data = [data] |
| | | |
| | | if (data.$$type === 'extendCard') { |
| | | _data = data.$$selectedData || [] |
| | | } else if (card.$sync) { |
| | | _data = this.props.syncData |
| | | _data = this.props.syncData || [] |
| | | } else if (data.$$empty) { |
| | | _data = [] |
| | | } |