king
2021-04-13 16145059198ba7c7ff8a73f4ac207d3ba2269e5a
src/mob/mobshell/card.jsx
@@ -80,21 +80,26 @@
    } else if (card.type === 'code') {
      return (<CodeSandbox card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    } else if (card.type === 'login') {
      return (<NormalLogin card={card} updateConfig={updateConfig} deletecomponent={delCard}/>)
    }
  }
  if (card.type === 'login') {
      let height = ''
      if (card.wrap && card.wrap.height) {
      // scaleview
        height = card.wrap.height.replace(/\d+vw/ig, (word) => {
          return parseFloat(word) * 350 / 100 + 'px'
        return parseFloat(word) * 420 / 100 + 'px'
        // return parseFloat(word) * 350 / 100 + 'px'
        }).replace(/\d+vh/ig, (word) => {
          return parseFloat(word) * 615 / 100 + 'px'
        return parseFloat(word) * 738 / 100 + 'px'
        // return parseFloat(word) * 615 / 100 + 'px'
        })
      }
      
      return (<>
        <NormalLogin card={card} updateConfig={updateConfig} deletecomponent={delCard}/>
        <div style={{float: 'right', height}}></div>
      </>)
    style.minHeight = height
    }
  }
  return (
    <div className={'ant-col mk-component-card ant-col-' + (card.width || 24)} ref={node => drag(drop(node))} style={style}>
      {getCardComponent()}