feat: 新增撤回前进功能

This commit is contained in:
MTrun
2022-02-04 18:28:02 +08:00
parent 7d5985f743
commit 7b24b90fbc
13 changed files with 198 additions and 70 deletions
@@ -1,6 +1,6 @@
<template>
<div>
后端数据
数据
</div>
</template>
@@ -1,13 +1,13 @@
<template>
<div>
<div class="go-chart-content-details">
设置
</div>
</template>
<script setup>
</script>
<script setup></script>
<style lang="scss" scoped>
@include go('chart-content-details') {
position: relative;
}
</style>
+1 -1
View File
@@ -90,7 +90,7 @@ const tabList = shallowRef([
},
{
key: 'behind',
title: '后端数据',
title: '数据',
icon: FlashIcon,
render: Behind
}
@@ -75,7 +75,13 @@ const iconHandle = (e: HistoryItemType) => {
return renderIcon(TrashIcon)
case HistoryActionTypeEnum.PASTE:
return renderIcon(CopyIcon)
case HistoryActionTypeEnum.LARYER:
case HistoryActionTypeEnum.TOP:
return renderIcon(LayersIcon)
case HistoryActionTypeEnum.BOTTOM:
return renderIcon(LayersIcon)
case HistoryActionTypeEnum.UP:
return renderIcon(LayersIcon)
case HistoryActionTypeEnum.DOWN:
return renderIcon(LayersIcon)
case HistoryActionTypeEnum.MOVE:
return renderIcon(StackedMoveIcon)
+1 -1
View File
@@ -50,7 +50,7 @@ import { EditBottom } from './components/EditBottom'
import { ShapeBox } from './components/ShapeBox/index'
import { useLayout } from './hooks/useLayout.hook'
import { useAddKeyboard, useRemoveKeyboard } from './hooks/useKeyboard.hook'
import { useAddKeyboard } from '../hooks/useKeyboard.hook'
import { handleDrop, handleDragOver, useMouseHandle } from './hooks/useDrop.hook'
import { useContextMenu } from '@/views/chart/hooks/useContextMenu.hook'
import { getChartEditStore } from './hooks/useStore.hook'
+1 -1
View File
@@ -27,7 +27,7 @@ import { icon } from '@/plugins'
const { LayersIcon, BarChartIcon, PrismIcon, HomeIcon } = icon.ionicons5
import { useChartLayoutStore } from '@/store/modules/chartLayoutStore/chartLayoutStore'
import { ChartLayoutStoreEnum } from '@/store/modules/chartLayoutStore/chartLayoutStore.d'
import { useRemoveKeyboard } from '../ContentEdit/hooks/useKeyboard.hook'
import { useRemoveKeyboard } from '../hooks/useKeyboard.hook'
const { setItem } = useChartLayoutStore()
const { getLayers, getCharts, getDetails } = toRefs(useChartLayoutStore())
@@ -1,5 +1,5 @@
import { isMac, addEventListener, removeEventListener } from '@/utils'
import { getChartEditStore } from './useStore.hook'
import { getChartEditStore } from '../ContentEdit/hooks/useStore.hook'
import { MenuEnum } from '@/views/chart/hooks/useContextMenu.hook'
const chartEditStore = getChartEditStore()
@@ -25,6 +25,7 @@ const KeyboardHandle = (e: KeyboardEvent) => {
chartEditStore.removeComponentList()
return
}
// 前进
if (e.ctrlKey && e.shiftKey && key == keyboardValue.back) {
chartEditStore.setForward()