| | |
| | | |
| | | return ( |
| | | <Col span={card.setting.width || 6} offset={offset || 0}> |
| | | <div className="card-item" style={_style} onClick={this.clickComponent} onDoubleClick={(e) => {e.stopPropagation(); this.doubleClickCard()}} id={card.uuid}> |
| | | <div className={'card-item ' + (card.setting.btnControl || '')} style={_style} onClick={this.clickComponent} onDoubleClick={(e) => {e.stopPropagation(); this.doubleClickCard()}} id={card.uuid}> |
| | | <CardCellComponent cards={cards} cardCell={card} side={side} elements={elements} updateElement={this.updateCard}/> |
| | | <div className="card-control" onDoubleClick={(e) => e.stopPropagation()}> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | |
| | | initval: setting.linkbtn || '', |
| | | required: true, |
| | | options: buttons |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'btnControl', |
| | | label: '按钮控制', |
| | | initval: setting.btnControl || 'show', |
| | | tooltip: '可设置按钮显示规则,一直显示或鼠标悬浮时显示。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'show', label: '正常显示'}, |
| | | {value: 'hover', label: '悬浮显示'}, |
| | | ], |
| | | forbid: appType === 'mob' |
| | | } |
| | | ] |
| | | |
| | |
| | | background-size: cover; |
| | | min-height: 20px; |
| | | } |
| | | .card-item.hover:not(:hover) { |
| | | button { |
| | | opacity: 0; |
| | | transition: opacity 0.3s; |
| | | } |
| | | } |
| | | |
| | | .card-item:hover { |
| | | box-shadow: 0px 0px 2px #1890ff; |
| | |
| | | background-size: cover; |
| | | min-height: 20px; |
| | | } |
| | | .card-item.hover:not(:hover) { |
| | | button { |
| | | opacity: 0; |
| | | transition: opacity 0.3s; |
| | | } |
| | | } |
| | | |
| | | .card-item:hover { |
| | | box-shadow: 0px 0px 2px #1890ff; |
| | |
| | | changeStyle = () => { |
| | | const { config } = this.props |
| | | |
| | | // MKEmitter.emit('changeStyle', [config.uuid, 'header'], ['font', 'height', 'border'], config.headerStyle) |
| | | MKEmitter.emit('changeStyle', [config.uuid, 'header'], ['font', 'border'], config.headerStyle) |
| | | let options = ['font', 'border'] |
| | | if (config.type === 'menubar') { |
| | | options.push('padding') |
| | | } |
| | | |
| | | MKEmitter.emit('changeStyle', [config.uuid, 'header'], options, config.headerStyle) |
| | | } |
| | | |
| | | render() { |
| | |
| | | fontSize: card.setting.iconFont || 20, |
| | | padding: card.setting.padding, |
| | | background: card.setting.background, |
| | | color: card.setting.color |
| | | color: card.setting.color, |
| | | borderRadius: card.setting.borderRadius || '50%' |
| | | }} type={card.setting.icon}/> |
| | | </div> : <div className="menu-sign"> |
| | | <img style={{width: card.setting.imgWidth, height: card.setting.imgWidth}} src={card.setting.url} alt=""/> |
| | | <img style={{width: card.setting.imgWidth, height: card.setting.imgWidth, borderRadius: card.setting.borderRadius || '50%'}} src={card.setting.url} alt=""/> |
| | | </div>} |
| | | <div className="menu-name">{card.setting.name}</div> |
| | | </div> |
| | |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'styleInput', |
| | | field: 'borderRadius', |
| | | label: '圆角', |
| | | initval: setting.borderRadius || '50%', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'color', |
| | | field: 'color', |
| | | label: '字体颜色', |
| | |
| | | const { card, data, cards } = this.props |
| | | |
| | | return ( |
| | | <div className="card-item-box" style={card.style} onClick={this.openView}> |
| | | <div className={'card-item-box ' + (card.setting.btnControl || '')} style={card.style} onClick={this.openView}> |
| | | <CardCellComponent data={data} cards={cards} cardCell={card} elements={card.elements}/> |
| | | {card.setting.type === 'multi' ? <div className={'back-side ' + card.setting.transform} style={card.backStyle}> |
| | | <CardCellComponent data={data} cards={cards} cardCell={card} elements={card.backElements}/> |
| | |
| | | .back-side.scale { |
| | | transform: scale(1, 1); |
| | | } |
| | | } |
| | | |
| | | .card-item-box.hover:not(:hover) { |
| | | button { |
| | | opacity: 0; |
| | | transition: opacity 0.3s; |
| | | } |
| | | } |