| | |
| | | |
| | | class NodeUpdate extends Component { |
| | | static propTpyes = { |
| | | node: PropTypes.object |
| | | node: PropTypes.object, |
| | | rolelist: PropTypes.array |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | ] |
| | | } else if (node.shape === 'mk-text') { |
| | | let fontFill = '#262626' |
| | | if (node.attrs && node.attrs.text) { |
| | | fontFill = node.attrs.text.fill || '#262626' |
| | | if (node.attrs && node.attrs.label) { |
| | | title = node.attrs.label.text || '' |
| | | } |
| | | |
| | | let fontSize = 12 |
| | | if (node.attrs && node.attrs.text) { |
| | | fontSize = node.attrs.text.fontSize || 12 |
| | | let fill = '' |
| | | |
| | | if (node.attrs && node.attrs.body) { |
| | | fill = node.attrs.body.fill || '' |
| | | } |
| | | |
| | | let stroke = '' |
| | | |
| | | if (node.attrs && node.attrs.body) { |
| | | stroke = node.attrs.body.stroke || '' |
| | | } |
| | | |
| | | let fontFill = '#262626' |
| | | if (node.attrs && node.attrs.label) { |
| | | fontFill = node.attrs.label.style.color || '#262626' |
| | | } |
| | | |
| | | let fontSize = 14 |
| | | if (node.attrs && node.attrs.label) { |
| | | fontSize = node.attrs.label.style.fontSize || 14 |
| | | } |
| | | return [ |
| | | { |
| | |
| | | field: 'title', |
| | | label: '标签', |
| | | initval: title |
| | | }, |
| | | { |
| | | type: 'title', |
| | | label: '样式' |
| | | }, |
| | | { |
| | | type: 'color', |
| | | field: 'fill', |
| | | label: '背景', |
| | | initval: fill |
| | | }, |
| | | { |
| | | type: 'color', |
| | | field: 'stroke', |
| | | label: '边框', |
| | | initval: stroke |
| | | }, |
| | | { |
| | | type: 'title', |
| | |
| | | label: '标记', |
| | | initval: node.mksign || '' |
| | | }, |
| | | { |
| | | type: 'select', |
| | | field: 'mkroleid', |
| | | label: '角色', |
| | | initval: node.mkroleid || '', |
| | | options: this.props.rolelist.map(item => ({value: item.RoleID, text: item.RoleName})) |
| | | }, |
| | | ] |
| | | } |
| | | } |