feat:新增层级移动功能

This commit is contained in:
MTrun
2022-02-01 20:57:54 +08:00
parent 7ec0af42b8
commit c5b1380299
3 changed files with 68 additions and 15 deletions
+12 -8
View File
@@ -28,12 +28,6 @@ export interface MenuOptionsItemType {
// * 默认选项
const defaultOptions: MenuOptionsItemType[] = [
{
label: '删除',
key: MenuEnum.DELETE,
icon: renderIcon(TrashIcon),
fnHandle: chartEditStore.removeComponentList
},
{
label: '复制',
key: MenuEnum.COPY,
@@ -60,13 +54,23 @@ const defaultOptions: MenuOptionsItemType[] = [
label: '上移一层',
key: MenuEnum.UP,
icon: renderIcon(ChevronUpIcon),
fnHandle: () => {}
fnHandle: chartEditStore.setUp
},
{
label: '下移一层',
key: MenuEnum.DOWN,
icon: renderIcon(ChevronDownIcon),
fnHandle: () => {}
fnHandle: chartEditStore.setDown
},
{
type: 'divider',
key: 'd2'
},
{
label: '删除',
key: MenuEnum.DELETE,
icon: renderIcon(TrashIcon),
fnHandle: chartEditStore.removeComponentList
}
]