| | |
| | | subtype: card.subtype, |
| | | wrap: { type: 'navbar', height: 50, title: 'NavBar', back: 'true', logout: 'false' }, |
| | | style: {boxShadow: '0 0 3px #D9D9D9', shadowColor: '#D9D9D9', shadowBlur: '3px', paddingLeft: '10px', paddingRight: '10px', lineHeight: '2.8', fontSize: '18px' }, |
| | | searchStyle: {} |
| | | searchStyle: {}, |
| | | titleStyle: {} |
| | | } |
| | | |
| | | if (card.config) { |
| | |
| | | |
| | | if (comIds[1] === 'search') { |
| | | _card.searchStyle = style |
| | | } else if (comIds[1] === 'title') { |
| | | _card.titleStyle = style |
| | | } else { |
| | | _card.style = style |
| | | } |
| | |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', [card.uuid], ['font', 'background', 'border', 'padding', 'shadow'], card.style) |
| | | } |
| | | |
| | | changeTitleStyle = () => { |
| | | const { card } = this.state |
| | | |
| | | MKEmitter.emit('changeStyle', [card.uuid, 'title'], ['font'], card.titleStyle || {}) |
| | | } |
| | | |
| | | changeSearchStyle = () => { |
| | |
| | | {card.wrap.menuPosition === 'left' ? <div className="img" style={{backgroundImage: `url(${avatar})`}}></div> : null} |
| | | </div> |
| | | {card.wrap.type !== 'search' ? |
| | | <div className="am-navbar-title">{card.wrap.title || ''}</div> : |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <FontColorsOutlined className="style" title="调整样式" onClick={this.changeTitleStyle}/> |
| | | </div> |
| | | } trigger="hover"> |
| | | <div className="am-navbar-title" style={card.titleStyle}>{card.wrap.title || ''}</div> |
| | | </Popover> : |
| | | <div className="am-navbar-search" onDoubleClick={this.setSearch}> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |