| | |
| | | handleList({...menu, components: _cards}) |
| | | setCards(_cards) |
| | | } |
| | | |
| | | if (menu.components.length > cards.length) { |
| | | setCards(menu.components) |
| | | } |
| | | |
| | | const findCard = id => { |
| | | const card = cards.filter(c => `${c.uuid}` === id)[0] |
| | |
| | | content: hasComponent ? '当前组件中含有子组件!' : '', |
| | | onOk() { |
| | | const _cards = cards.filter(item => item.uuid !== card.uuid) |
| | | MKEmitter.emit('delButtons', uuids) |
| | | handleList({...menu, components: _cards}) |
| | | setCards(_cards) |
| | | |
| | | if (uuids.length === 0) return |
| | | |
| | | MKEmitter.emit('delButtons', uuids) |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | |
| | | code: '自定义', |
| | | carousel: '轮播', |
| | | form: '表单', |
| | | dashboard: '仪表盘', |
| | | scatter: '散点图', |
| | | tree: '树形列表', |
| | | balcony: '浮动卡', |
| | | card: '卡片' |
| | | } |
| | | let i = 1 |