ny
23 小时以前 282fbc6488f4e8ceb5fda759f963ee88fbf7b999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<script setup lang="ts">
defineProps(['chart', 'dataSetList']);
 
const emit = defineEmits(['updateDefaultChart']);
 
const chartTypeOptions = [
  { id: 'bar', fullName: '柱状图' },
  { id: 'line', fullName: '折线图' },
  { id: 'pie', fullName: '饼状图' },
  { id: 'radar', fullName: '雷达图' },
];
 
// 设置默认展示数据
function onChartTypeChange(value) {
  emit('updateDefaultChart', value);
}
</script>
 
<template>
  <a-form-item :name="['chart', 'chartType']" label="图表类型">
    <jnpf-select v-model:value="chart.chartType" :options="chartTypeOptions" @change="onChartTypeChange" />
  </a-form-item>
</template>