king
2023-03-11 34e7681fd12b1c4e4994d3bea1a553870e10bc50
src/menu/components/card/cardcellcomponent/dragaction/card.jsx
@@ -101,22 +101,23 @@
      //   </div>
      // )
    } else if (card.eleType === 'picture') {
      let _imagestyle = {}
      let _imagestyle = {
        backgroundSize: card.style.backgroundSize || 'cover',
        backgroundPosition: card.style.backgroundPosition || 'center',
        backgroundRepeat: card.style.backgroundRepeat || 'no-repeat',
        borderRadius: card.style.borderRadius || 0
      }
      let url = card.url !== '@icon@' ? card.url : sessionStorage.getItem('CloudAvatar')
      if (url) {
        url = url.replace(/@mywebsite@\//ig, window.GLOB.baseurl)
        _imagestyle = {backgroundImage: `url('${url}')`}
        _imagestyle.backgroundImage = `url('${url}')`
      } else {
        let index = card.uuid.match(/\d{1}/g)
        index = index.slice(-1)[0] % 5
        let demos = [demo1, demo2, demo3, demo4, demo5]
        _imagestyle = {backgroundImage: `url('${demos[index]}')`}
      }
      if (card.style && card.style.borderRadius) {
        _imagestyle.borderRadius = card.style.borderRadius
        _imagestyle.backgroundImage = `url('${demos[index]}')`
      }
      if (PicRadio[card.lenWidRadio]) {
@@ -176,6 +177,19 @@
          {val}
        </div>
      )
    } else if (card.eleType === 'color') {
      _style.overflow = 'hidden'
      let _bgstyle = {backgroundColor: card.value || '#1890ff'}
      if (PicRadio[card.lenWidRadio]) {
        _bgstyle.paddingTop = PicRadio[card.lenWidRadio]
      } else {
        _bgstyle.paddingTop = '100%'
      }
      return (
        <div style={_bgstyle}></div>
      )
    }
  }
@@ -187,7 +201,7 @@
  }
  let able = true
  if ((appType === 'mob' || appType === 'pc') && (parent.setting.click === 'menu' || parent.setting.click === 'menus')) {
  if ((appType === 'mob' || appType === 'pc') && parent.setting && (parent.setting.click === 'menu' || parent.setting.click === 'menus')) {
    able = false
  }