king
2025-02-25 010fdcf8abd58bde5c1106db8ed8448effc75b4b
src/menu/components/card/cardcellcomponent/dragaction/index.jsx
@@ -1,6 +1,7 @@
import React, { useState } from 'react'
import { useDrop } from 'react-dnd'
import { is, fromJS } from 'immutable'
import { message } from 'antd'
import update from 'immutability-helper'
import Card from './card'
@@ -53,16 +54,8 @@
    }
    copycard.uuid = Utils.getuuid()
    copycard.originCard = card
    try {
      delete _val.$srcId
      let srcid = localStorage.getItem(window.location.href.split('#')[0] + 'srcId')
      if (srcid) {
        _val.$srcId = srcid
      }
      _val = window.btoa(window.encodeURIComponent(JSON.stringify(_val)))
    } catch (e) {
      console.warn('Stringify Failure')
@@ -76,12 +69,18 @@
      oInput.select()
      document.execCommand('Copy')
      document.body.removeChild(oInput)
      message.success('复制成功。')
    } else {
      message.warning('复制失败。')
    }
    _cards.push(copycard)
    handleList(_cards)
    handleMenu(copycard)
    if (card.eleType !== 'button' && !window.GLOB.CopyOnly) {
      _cards.push(copycard)
      handleList(_cards)
      handleMenu(copycard)
    }
  }
  const changeStyle = id => {
@@ -130,6 +129,26 @@
          newcard.eleType = item.value
          newcard.datatype = 'dynamic'
          newcard.height = 1
          if (item.value === 'splitline') {
            newcard.width = 24
            newcard.color = '#EBE9E9'
          } else if (item.value === 'tag') {
            newcard.style = {
              backgroundColor: 'var(--mk-sys-color1)',
              color: 'var(--mk-sys-color)',
              borderColor: 'var(--mk-sys-color)',
              borderWidth: '1px',
              borderRadius: '4px',
              paddingLeft: '7px',
              paddingRight: '7px',
              marginRight: '8px',
              marginBottom: '8px',
            }
          } else if (item.value === 'slider') {
            newcard.width = 24
            newcard.color = '#1890ff'
          }
        } else {
          newcard.eleType = 'button'
          newcard.label = 'button'
@@ -141,7 +160,7 @@
          if (newcard.OpenType === 'excelIn') {
            newcard.label = item.text
            newcard.class = 'dgreen'
            newcard.class = 'border-dgreen'
            newcard.Ot = 'notRequired'
          } else if (item.subType === 'excelOut') {
            newcard.label = item.text