| | |
| | | import { Empty, notification, Modal } from 'antd' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import MenuUtils from '@/utils/utils-custom.js' |
| | | import Card from './card' |
| | | import './index.scss' |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | let uuids = MenuUtils.getDelButtonIds(card) |
| | | |
| | | confirm({ |
| | | title: `确定删除《${card.name}》吗?`, |
| | | content: hasComponent ? '当前组件中含有子组件!' : '', |
| | |
| | | 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() {} |
| | | }) |
| | |
| | | tree: '树形列表', |
| | | balcony: '浮动卡', |
| | | timeline: '时间轴', |
| | | antvG6: '树图', |
| | | iframe: 'iframe', |
| | | card: '卡片' |
| | | } |
| | | let i = 1 |
| | |
| | | } |
| | | }) |
| | | |
| | | let style = JSON.stringify(menu.style || {}) |
| | | style = style.replace(/@mywebsite@\//ig, window.GLOB.baseurl) |
| | | style = JSON.parse(style) |
| | | |
| | | return ( |
| | | <div ref={drop} className="menu-shell-inner" id="menu-shell-inner" style={menu.style}> |
| | | <div ref={drop} className="menu-shell-inner" id="menu-shell-inner" style={style}> |
| | | <div className="ant-row"> |
| | | {cards.map(card => ( |
| | | <Card |