king
2022-11-21 f6626b05f1275cc2f8ca77f773d4f6a6af1b0a89
src/menu/components/card/cardcellcomponent/dragaction/card.jsx
@@ -57,10 +57,10 @@
    },
  })
  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) {
@@ -89,7 +89,7 @@
        <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}/>
@@ -105,6 +105,7 @@
      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)
@@ -190,6 +191,12 @@
    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()}>
@@ -200,7 +207,7 @@
        {['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>