king
2021-07-28 137fb8ea6af2789b3238b22bac31d80bced41dfe
src/pc/menushell/index.jsx
@@ -20,6 +20,10 @@
    setCards(_cards)
  }
  
  if (menu.components.length > cards.length) {
    setCards(menu.components)
  }
  const findCard = id => {
    const card = cards.filter(c => `${c.uuid}` === id)[0]
    return {
@@ -49,13 +53,16 @@
    let uuids = MenuUtils.getDelButtonIds(card)
    confirm({
      title: `确定删除《${card.name}》吗?`,
      title: `确定删除${card.name ? `《${card.name}》` : '组件'}吗?`,
      content: hasComponent ? '当前组件中含有子组件!' : '',
      onOk() {
        MKEmitter.emit('delButtons', uuids)
        const _cards = cards.filter(item => item.uuid !== card.uuid)
        handleList({...menu, components: _cards})
        setCards(_cards)
        if (uuids.length === 0) return
        MKEmitter.emit('delButtons', uuids)
      },
      onCancel() {}
    })
@@ -102,7 +109,10 @@
        code: '自定义',
        navbar: '导航栏',
        carousel: '轮播',
        card: '卡片'
        dashboard: '仪表盘',
        tree: '树形列表',
        card: '卡片',
        login: '登录'
      }
      let i = 1