feat: 修改组件展示,支持单个组件数据编辑

This commit is contained in:
MTrun
2022-02-24 17:23:20 +08:00
parent 2bdc489827
commit 14010cce8f
17 changed files with 219 additions and 175 deletions
@@ -1,10 +1,31 @@
<template>
<div class="go-chart-content-details">
设置
<GlobalSetting
v-if="targetData"
:data="targetData.option"
:in-chart="true"
/>
</div>
</template>
<script setup></script>
<script setup lang="ts">
import { computed } from 'vue'
import { loadAsyncComponent } from '@/utils'
import { useChartEditStoreStore } from '@/store/modules/chartEditStore/chartEditStore'
import { GlobalSetting } from '@/components/ChartItemSetting/index'
import { CreateComponentType } from '@/packages/index.d'
const GlobalSettingCom = loadAsyncComponent(() =>
import('@/components/ChartItemSetting/index')
)
const chartEditStoreStore = useChartEditStoreStore()
const targetData = computed(() => {
const list = chartEditStoreStore.getComponentList
const targetIndex = chartEditStoreStore.fetchTargetIndex()
return list[targetIndex]
})
</script>
<style lang="scss" scoped>
@include go('chart-content-details') {