50 lines
1.3 KiB
Vue
Raw Normal View History

2022-01-06 13:45:51 +08:00
<template>
2022-01-08 21:01:52 +08:00
<ContentBox
class="go-content-layers"
:class="{ scoped: !chartLayoutStore.getLayers }"
title="图层"
2022-01-11 20:56:19 +08:00
:depth="2"
2022-01-08 21:01:52 +08:00
@back="backHandle"
>
<template #icon>
<n-icon size="16" :depth="2">
<component :is="LayersIcon" />
</n-icon>
</template>
2022-01-28 21:17:49 +08:00
2022-01-19 19:59:11 +08:00
<!-- 图层内容 -->
2022-01-28 21:17:49 +08:00
<ListItem v-for="item in chartEditStore.getComponentList" :key="item.id"/>
2022-01-08 21:01:52 +08:00
</ContentBox>
2022-01-06 13:45:51 +08:00
</template>
<script setup lang="ts">
import { ContentBox } from '../ContentBox/index'
2022-01-08 21:01:52 +08:00
import { useChartLayoutStore } from '@/store/modules/chartLayoutStore/chartLayoutStore'
2022-01-20 21:25:35 +08:00
import { ChartLayoutStoreEnum } from '@/store/modules/chartLayoutStore/chartLayoutStore.d'
2022-01-28 21:17:49 +08:00
import { useChartEditStoreStore } from '@/store/modules/chartEditStore/chartEditStore'
import { ListItem } from './components/ListItem/index'
2022-01-08 21:01:52 +08:00
import { icon } from '@/plugins'
2022-01-28 21:17:49 +08:00
2022-01-08 21:01:52 +08:00
const { LayersIcon } = icon.ionicons5
const chartLayoutStore = useChartLayoutStore()
2022-01-28 21:17:49 +08:00
const chartEditStore = useChartEditStoreStore()
2022-01-08 21:01:52 +08:00
const backHandle = () => {
2022-01-20 21:25:35 +08:00
chartLayoutStore.setItem(ChartLayoutStoreEnum.LAYERS, false)
2022-01-08 21:01:52 +08:00
}
2022-01-06 13:45:51 +08:00
</script>
<style lang="scss" scoped>
2022-01-28 21:17:49 +08:00
$wight: 150px;
2022-01-06 13:45:51 +08:00
@include go(content-layers) {
width: $wight;
2022-01-28 21:17:49 +08:00
flex-shrink: 0;
2022-01-08 21:01:52 +08:00
overflow: hidden;
@extend .go-transition;
&.scoped {
width: 0;
}
2022-01-06 13:45:51 +08:00
}
</style>