| | |
| | | let _card = { |
| | | uuid: card.uuid, |
| | | type: card.type, |
| | | dataName: card.dataName || '', |
| | | name: card.name, |
| | | subtype: card.subtype, |
| | | wrap: { name: card.name, width: card.width || 1200, height: 50 }, |
| | |
| | | MKEmitter.emit('changeStyle', ['width', 'margin'], card.logoStyle, this.getLogoStyle) |
| | | } |
| | | |
| | | clickComponent = (e) => { |
| | | if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') { |
| | | e.stopPropagation() |
| | | MKEmitter.emit('clickComponent', this.state.card) |
| | | } |
| | | } |
| | | |
| | | changeMenu = (menu) => { |
| | | if (menu.property === 'link') { |
| | | if (menu.property === 'text') { |
| | | return |
| | | } else if (menu.property === 'link') { |
| | | window.open(menu.link) |
| | | return |
| | | } |
| | |
| | | const { card } = this.state |
| | | |
| | | return ( |
| | | <div className="normal-navbar-edit-box" style={card.style} onClick={this.clickComponent} id={card.uuid}> |
| | | <div className="normal-navbar-edit-box" style={card.style} id={card.uuid}> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <MenuComponent config={card} updateConfig={this.updateComponent} /> |