| | |
| | | }, |
| | | }) |
| | | |
| | | let _style = {opacity: isDragging ? 0 : 1} |
| | | let _style = {opacity: isDragging ? 0.3 : 1} |
| | | |
| | | if (card.style) { |
| | | _style = {...card.style, opacity: isDragging ? 0 : 1} |
| | | _style = {...card.style, opacity: isDragging ? 0.3 : 1} |
| | | _style = resetStyle(_style) |
| | | } |
| | | if (card.eleType === 'picture' && card.maxWidth) { |
| | |
| | | <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight || 'auto'}}>{val}</div> |
| | | ) |
| | | } else if (card.eleType === 'icon') { |
| | | return (<MkIcon style={{height: card.innerHeight || 'auto'}} className="ant-mk-icon" type={card.icon}/>) |
| | | return (<MkIcon style={{height: card.innerHeight || 'auto'}} className="ant-mk-icon" type={card.icon || 'bell'}/>) |
| | | } else if (card.eleType === 'slider') { |
| | | let val = card.value ? (card.value / card.maxValue) * 100 : 30 |
| | | return <MkProgress value={val} config={card}/> |
| | |
| | | let url = card.url !== '@icon@' ? card.url : sessionStorage.getItem('CloudAvatar') |
| | | |
| | | if (url) { |
| | | url = url.replace(/@mywebsite@\//ig, window.GLOB.baseurl) |
| | | _imagestyle = {backgroundImage: `url('${url}')`} |
| | | } else { |
| | | let index = card.uuid.match(/\d{1}/g) |
| | |
| | | able = false |
| | | } |
| | | |
| | | let _style_ = null |
| | | |
| | | if (card.style && card.style.clear === 'left') { |
| | | _style_ = {clear: 'left'} |
| | | } |
| | | |
| | | return ( |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control" onDoubleClick={(e) => e.stopPropagation()}> |
| | |
| | | {['text', 'number', 'slider', 'sequence', 'formula'].includes(card.eleType) ? <MarkColumn field={card.field || ''} columns={fields} type={card.eleType} marks={card.marks} onSubmit={(vals) => updateMarks({...card, marks: vals})} /> : null } |
| | | </div> |
| | | } trigger="hover"> |
| | | <div ref={node => drag(drop(node))} className={'ant-col card-cell ant-col-' + card.width}> |
| | | <div ref={node => drag(drop(node))} style={_style_} className={'ant-col card-cell ant-col-' + card.width}> |
| | | <div style={_style} onClick={clickComponent} onDoubleClick={() => able && editCard(id)} id={card.uuid}> |
| | | {getContent()} |
| | | </div> |