47 lines
1.5 KiB
Vue
Raw Normal View History

2022-01-08 21:01:52 +08:00
<template>
2022-02-24 20:11:38 +08:00
<div class="go-chart-content-details" v-if="targetData">
2022-02-26 17:38:24 +08:00
<!-- 名称 -->
2022-02-25 21:26:56 +08:00
<SettingItemBox name="名称">
<n-input
type="text"
maxlength="6"
show-count
placeholder="请输入图表名称"
size="small"
v-model:value="targetData.chartConfig.title"
/>
</SettingItemBox>
2022-02-26 17:38:24 +08:00
<!-- 位置 -->
2022-02-25 21:26:56 +08:00
<PositionSetting :chartAttr="targetData.attr" />
2022-02-26 17:38:24 +08:00
<!-- 自定义配置项 -->
<component :is="targetData.chartConfig.conNode()" :optionData="targetData.option"></component>
<!-- 全局设置 -->
2022-02-25 15:51:19 +08:00
<GlobalSetting :optionData="targetData.option" :in-chart="true" />
2022-01-08 21:01:52 +08:00
</div>
</template>
<script setup lang="ts">
2022-02-24 20:11:38 +08:00
import { computed, Ref } from 'vue'
import { loadAsyncComponent } from '@/utils'
import { useChartEditStoreStore } from '@/store/modules/chartEditStore/chartEditStore'
2022-02-25 21:26:56 +08:00
import { GlobalSetting, PositionSetting } from '@/components/ChartItemSetting/index'
import { CreateComponentType } from '@/packages/index.d'
2022-02-24 20:11:38 +08:00
import { SettingItemBox } from '@/components/ChartItemSetting/index'
const GlobalSettingCom = loadAsyncComponent(() =>
import('@/components/ChartItemSetting/index')
)
const chartEditStoreStore = useChartEditStoreStore()
2022-02-24 20:11:38 +08:00
const targetData: Ref<CreateComponentType> = computed(() => {
const list = chartEditStoreStore.getComponentList
const targetIndex = chartEditStoreStore.fetchTargetIndex()
return list[targetIndex]
})
</script>
2022-01-08 21:01:52 +08:00
<style lang="scss" scoped>
2022-02-04 18:28:02 +08:00
@include go('chart-content-details') {
}
2022-02-07 20:55:40 +08:00
</style>