config.vue 1.22 KB
<template>
  <!-- Echarts 全局设置 -->
  <global-setting :optionData="optionData"></global-setting>
  <CollapseItem v-for="(item, index) in seriesList" :key="index" :name="`${t('charts.chart.functionDraw')}-${index + 1}`" :expanded="true">
    <setting-item-box :name="t('charts.chart.showPunctuation')">
      <setting-item>
        <n-space>
          <n-switch v-model:value="item.showSymbol" size="small" />
          <n-text>{{t('charts.chart.showPunctuation')}}</n-text>
        </n-space>
      </setting-item>
      <setting-item>
        <n-space>
          <n-switch v-model:value="item.clip" size="small" />
          <n-text>{{t('charts.chart.displayTrims')}}</n-text>
        </n-space>
      </setting-item>
    </setting-item-box>
  </CollapseItem>
</template>

<script setup lang="ts">
import { PropType, computed } from 'vue'
import { GlobalThemeJsonType } from '@/settings/chartThemes/index'
import { GlobalSetting, CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'

const props = defineProps({
  optionData: {
    type: Object as PropType<GlobalThemeJsonType>,
    required: true
  }
})
const t = window['$t']

const seriesList = computed(() => {
  return props.optionData.series
})
</script>