mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-06 03:58:04 +08:00
fix: 修改图层顺序
This commit is contained in:
parent
8f15b0a32f
commit
ec5e74019b
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<!-- 图层内容 -->
|
<!-- 图层内容 -->
|
||||||
<ListItem
|
<ListItem
|
||||||
v-for="item in chartEditStore.getComponentList"
|
v-for="item in reverseList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:componentData="item"
|
:componentData="item"
|
||||||
@mousedown="mousedownHandle(item)"
|
@mousedown="mousedownHandle(item)"
|
||||||
@ -26,12 +26,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { computed } from 'vue'
|
||||||
import { ContentBox } from '../ContentBox/index'
|
import { ContentBox } from '../ContentBox/index'
|
||||||
|
|
||||||
import { useChartLayoutStore } from '@/store/modules/chartLayoutStore/chartLayoutStore'
|
import { useChartLayoutStore } from '@/store/modules/chartLayoutStore/chartLayoutStore'
|
||||||
import { ChartLayoutStoreEnum } from '@/store/modules/chartLayoutStore/chartLayoutStore.d'
|
import { ChartLayoutStoreEnum } from '@/store/modules/chartLayoutStore/chartLayoutStore.d'
|
||||||
import { useChartEditStoreStore } from '@/store/modules/chartEditStore/chartEditStore'
|
import { useChartEditStoreStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||||
import { CreateComponentType } from '@/packages/index.d'
|
import { CreateComponentType } from '@/packages/index.d'
|
||||||
|
import cloneDeep from 'lodash/cloneDeep';
|
||||||
import {
|
import {
|
||||||
ChartEditStoreEnum,
|
ChartEditStoreEnum,
|
||||||
TargetChartType
|
TargetChartType
|
||||||
@ -53,6 +54,12 @@ const { handleContextMenu } = useContextMenu({
|
|||||||
hideOptionsList: [MenuEnum.CLEAR, MenuEnum.PARSE]
|
hideOptionsList: [MenuEnum.CLEAR, MenuEnum.PARSE]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 逆序输出
|
||||||
|
const reverseList = computed(()=>{
|
||||||
|
const list: CreateComponentType[] = cloneDeep(chartEditStore.getComponentList)
|
||||||
|
return list.reverse()
|
||||||
|
})
|
||||||
|
|
||||||
const backHandle = () => {
|
const backHandle = () => {
|
||||||
chartLayoutStore.setItem(ChartLayoutStoreEnum.LAYERS, false)
|
chartLayoutStore.setItem(ChartLayoutStoreEnum.LAYERS, false)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user