| | |
| | | import Action from './action' |
| | | import './index.scss' |
| | | |
| | | const Container = ({list, fields, handleList, handleMenu, deleteMenu, profileAction, handleStyle, updateMarks, dropButton, handleSubConfig }) => { |
| | | const Container = ({list, parent, fields, handleList, handleMenu, deleteMenu, profileAction, handleStyle, updateMarks, dropButton, handleSubConfig }) => { |
| | | const [cards, setCards] = useState(list) |
| | | const moveCard = (id, atIndex) => { |
| | | const { card, index } = findCard(id) |
| | |
| | | let copycard = fromJS(card).toJS() |
| | | let _cards = fromJS(cards).toJS() |
| | | |
| | | copycard.uuid = Utils.getuuid() |
| | | copycard.copyType = 'customCardElement' |
| | | copycard.focus = true |
| | | |
| | | let _val = '' |
| | | let _val = fromJS(copycard).toJS() |
| | | |
| | | copycard.uuid = Utils.getuuid() |
| | | copycard.originCard = card |
| | | |
| | | try { |
| | | _val = window.btoa(window.encodeURIComponent(JSON.stringify(copycard))) |
| | | _val = window.btoa(window.encodeURIComponent(JSON.stringify(_val))) |
| | | } catch { |
| | | console.warn('Stringify Failure') |
| | | _val = '' |
| | |
| | | |
| | | const doubleClickCard = id => { |
| | | const { card } = findCard(id) |
| | | if (card.OpenType === 'pop') { |
| | | handleSubConfig(card) |
| | | } |
| | | handleSubConfig(card) |
| | | } |
| | | |
| | | const delCard = id => { |
| | |
| | | id={card.uuid} |
| | | key={card.uuid} |
| | | card={card} |
| | | parent={parent} |
| | | moveCard={moveCard} |
| | | editCard={editCard} |
| | | changeStyle={changeStyle} |
| | |
| | | id={card.uuid} |
| | | key={card.uuid} |
| | | card={card} |
| | | parent={parent} |
| | | fields={fields} |
| | | moveCard={moveCard} |
| | | copyCard={copyCard} |