| | |
| | | MkIcons[type](resProps) |
| | | ) |
| | | } else { |
| | | return <span className={'anticon anticon-mk ' + (resProps.className || '')} style={resProps.style || null} dangerouslySetInnerHTML={{ __html: type }}></span> |
| | | let svg = type |
| | | |
| | | if (!/<svg/.test(svg)) { |
| | | try { |
| | | svg = window.decodeURIComponent(window.atob(svg)) |
| | | if (!/<svg/.test(svg)) { |
| | | svg = '' |
| | | } |
| | | } catch (e) { |
| | | svg = '' |
| | | } |
| | | } |
| | | |
| | | return <span className={'anticon anticon-mk ' + (resProps.className || '')} style={resProps.style || null} dangerouslySetInnerHTML={{ __html: svg }}></span> |
| | | } |
| | | } |
| | | } |
| | |
| | | label: '节点颜色', |
| | | initval: card.nodeColor || '#1890ff', |
| | | tooltip: '右侧节点的标记颜色。', |
| | | isHex: true, |
| | | colorType: 'hex', |
| | | required: false |
| | | }, |
| | | { |
| | |
| | | label: '左节点颜色', |
| | | initval: card.leftColor || '#26C281', |
| | | tooltip: '左侧节点的标记颜色。', |
| | | isHex: true, |
| | | colorType: 'hex', |
| | | required: false |
| | | }, |
| | | { |
| | |
| | | field: 'color', |
| | | label: '颜色', |
| | | initval: wrap.color || '#000000', |
| | | isHex: true, |
| | | colorType: 'hex', |
| | | required: true |
| | | }, |
| | | ] |
| | |
| | | handleChange = (color) => { |
| | | let _color = `rgba(${ color.rgb.r }, ${ color.rgb.g }, ${ color.rgb.b }, ${ color.rgb.a })` |
| | | |
| | | if (!this.props.config.isHex) { |
| | | if (this.props.config.colorType !== 'hex') { |
| | | this.setState({ color: _color }, () => { |
| | | this.props.onChange(_color) |
| | | }) |
| | |
| | | width: 89.5%; |
| | | } |
| | | } |
| | | .ant-form-item label > .anticon { |
| | | vertical-align: middle; |
| | | } |
| | | } |
| | | .modal-fields-row.up_down { |
| | | .ant-form-item { |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'colorType', |
| | | label: '颜色类型', |
| | | initVal: card.colorType || 'hex', |
| | | options: [{ |
| | | value: 'hex', |
| | | text: '16进制' |
| | | }, { |
| | | value: 'rgba', |
| | | text: 'RGBA' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'allowHalf', |
| | | label: '半选', |
| | | initVal: card.allowHalf || 'false', |
| | |
| | | datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom', 'minDate', 'maxDate'], |
| | | textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'span', 'labelwidth', 'maxRows', 'encryption', 'interception', 'tooltip', 'extra', 'count', 'placeholder', 'marginTop', 'marginBottom'], |
| | | cascader: ['readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom', 'separator'], |
| | | color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom'], |
| | | color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'colorType', 'extra', 'marginTop', 'marginBottom'], |
| | | rate: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'splitline', 'tooltip', 'extra', 'marginTop', 'marginBottom', 'allowHalf', 'color', 'rateCount', 'character', 'place'], |
| | | hint: ['label', 'field', 'type', 'blacklist', 'message', 'span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], |
| | | split: ['label', 'type', 'marginTop', 'marginBottom', 'splitline'], |