|
@@ -1,26 +1,35 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div class="go-chart-content-details">
|
|
|
|
|
- <GlobalSetting
|
|
|
|
|
- v-if="targetData"
|
|
|
|
|
- :data="targetData.option"
|
|
|
|
|
- :in-chart="true"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <div class="go-chart-content-details" v-if="targetData">
|
|
|
|
|
+ <div class="chart-config">
|
|
|
|
|
+ <SettingItemBox name="名称">
|
|
|
|
|
+ <n-input
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ maxlength="6"
|
|
|
|
|
+ show-count
|
|
|
|
|
+ placeholder="请输入图表名称"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ v-model:value="targetData.chartConfig.title"
|
|
|
|
|
+ />
|
|
|
|
|
+ </SettingItemBox>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <GlobalSetting :data="targetData.option" :in-chart="true" />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { computed } from 'vue'
|
|
|
|
|
|
|
+import { computed, Ref } from 'vue'
|
|
|
import { loadAsyncComponent } from '@/utils'
|
|
import { loadAsyncComponent } from '@/utils'
|
|
|
import { useChartEditStoreStore } from '@/store/modules/chartEditStore/chartEditStore'
|
|
import { useChartEditStoreStore } from '@/store/modules/chartEditStore/chartEditStore'
|
|
|
import { GlobalSetting } from '@/components/ChartItemSetting/index'
|
|
import { GlobalSetting } from '@/components/ChartItemSetting/index'
|
|
|
import { CreateComponentType } from '@/packages/index.d'
|
|
import { CreateComponentType } from '@/packages/index.d'
|
|
|
|
|
+import { SettingItemBox } from '@/components/ChartItemSetting/index'
|
|
|
|
|
|
|
|
const GlobalSettingCom = loadAsyncComponent(() =>
|
|
const GlobalSettingCom = loadAsyncComponent(() =>
|
|
|
import('@/components/ChartItemSetting/index')
|
|
import('@/components/ChartItemSetting/index')
|
|
|
)
|
|
)
|
|
|
const chartEditStoreStore = useChartEditStoreStore()
|
|
const chartEditStoreStore = useChartEditStoreStore()
|
|
|
|
|
|
|
|
-const targetData = computed(() => {
|
|
|
|
|
|
|
+const targetData: Ref<CreateComponentType> = computed(() => {
|
|
|
const list = chartEditStoreStore.getComponentList
|
|
const list = chartEditStoreStore.getComponentList
|
|
|
const targetIndex = chartEditStoreStore.fetchTargetIndex()
|
|
const targetIndex = chartEditStoreStore.fetchTargetIndex()
|
|
|
return list[targetIndex]
|
|
return list[targetIndex]
|
|
@@ -29,5 +38,8 @@ const targetData = computed(() => {
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
@include go('chart-content-details') {
|
|
@include go('chart-content-details') {
|
|
|
|
|
+ .chart-config {
|
|
|
|
|
+ padding: 20px 0;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|