feat: 新增图层列表右键菜单

This commit is contained in:
MTrun 2022-01-31 23:43:45 +08:00
parent c6a7be352b
commit 47456fb801
2 changed files with 4 additions and 1 deletions

View File

@ -21,10 +21,10 @@
:index="index"
:style="useComponentStyle(item.attr, index)"
:item="item"
@contextmenu="handleContextMenu($event, index)"
@mousedown="mousedownHandle($event, item)"
@mouseenter="mouseenterHandle($event, item)"
@mouseleave="mouseleaveHandle($event, item)"
@contextmenu="handleContextMenu($event, index)"
>
<component
class="edit-content-chart"

View File

@ -20,6 +20,7 @@
@mousedown="mousedownHandle(item)"
@mouseenter="mouseenterHandle(item)"
@mouseleave="mouseleaveHandle(item)"
@contextmenu="handleContextMenu($event, index)"
/>
</ContentBox>
</template>
@ -33,6 +34,7 @@ import { ChartLayoutStoreEnum } from '@/store/modules/chartLayoutStore/chartLayo
import { useChartEditStoreStore } from '@/store/modules/chartEditStore/chartEditStore'
import { ChartEditStoreEnum, TargetChartType } from '@/store/modules/chartEditStore/chartEditStore.d'
import { CreateComponentType } from '@/packages/index.d'
import { useContextMenu } from '@/views/chart/hooks/useContextMenu.hook'
import { ListItem } from './components/ListItem/index'
import { icon } from '@/plugins'
@ -40,6 +42,7 @@ import { icon } from '@/plugins'
const { LayersIcon } = icon.ionicons5
const chartLayoutStore = useChartLayoutStore()
const chartEditStore = useChartEditStoreStore()
const { handleContextMenu } = useContextMenu()
const backHandle = () => {
chartLayoutStore.setItem(ChartLayoutStoreEnum.LAYERS, false)