From 74e5d38d9a0e94421ceceea37c4677e5b57364ba Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 14 十月 2022 00:33:18 +0800 Subject: [PATCH] 2022-10-14 --- src/menu/tableshell/index.jsx | 24 ------------------------ 1 files changed, 0 insertions(+), 24 deletions(-) diff --git a/src/menu/tableshell/index.jsx b/src/menu/tableshell/index.jsx index 0346d43..999d732 100644 --- a/src/menu/tableshell/index.jsx +++ b/src/menu/tableshell/index.jsx @@ -11,12 +11,6 @@ const Container = ({menu, handleList }) => { const [cards, setCards] = useState(menu.components) - const moveCard = (id, atIndex) => { - const { card, index } = findCard(id) - const _cards = update(cards, { $splice: [[index, 1], [atIndex, 0, card]] }) - handleList({...menu, components: _cards}) - setCards(_cards) - } if (menu.components.length > cards.length) { setCards(menu.components) @@ -67,30 +61,13 @@ delete item.added // 鍒犻櫎缁勪欢娣诲姞鏍囪 return } - - let name = '' - let names = { - tabs: '鏍囩缁�' - } - let i = 1 - while (!name && names[item.component]) { - let _name = names[item.component] + i - if (menu.components.filter(com => com.name === _name).length === 0) { - name = _name - } - i++ - } - let newcard = { uuid: Utils.getuuid(), type: item.component, subtype: item.subtype, config: item.config, width: item.width || 24, - dataName: Utils.getdataName(), - name: name, - floor: 1, // 缁勪欢鐨勫眰绾� isNew: true // 鏂版坊鍔犳爣蹇楋紝鐢ㄤ簬鍒濆鍖� } @@ -119,7 +96,6 @@ id={card.uuid} key={card.uuid} card={card} - moveCard={moveCard} delCard={deleteCard} findCard={findCard} updateConfig={updateConfig} -- Gitblit v1.8.0