ny
昨天 282fbc6488f4e8ceb5fda759f963ee88fbf7b999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<script lang="ts" setup>
defineProps(['chart']);
 
const labelPositionList = [
  { fullName: '外侧', id: 'outside' },
  { fullName: '内侧', id: 'inside' },
];
const labelShowList = [
  { fullName: '数值', id: 'count' },
  { fullName: '百分比', id: 'percent' },
];
</script>
<template>
  <a-collapse-panel>
    <template #header>数值设置</template>
    <a-form-item label="显示">
      <a-switch v-model:checked="chart.label.show" />
    </a-form-item>
    <template v-if="chart.label.show">
      <template v-if="chart.chartType == 'pie'">
        <a-form-item label="显示位置">
          <jnpf-radio v-model:value="chart.seriesLabelPosition" :options="labelPositionList" option-type="button" button-style="solid" class="right-radio" />
        </a-form-item>
        <a-form-item label="显示内容">
          <jnpf-checkbox v-model:value="chart.seriesLabelShowInfo" :options="labelShowList" option-type="button" button-style="solid" class="right-radio" />
        </a-form-item>
      </template>
      <a-form-item label="字体大小">
        <a-input-number v-model:value="chart.label.fontSize" placeholder="请输入" :min="12" :max="25" />
      </a-form-item>
      <a-form-item label="字体加粗">
        <a-switch v-model:checked="chart.label.fontWeight" />
      </a-form-item>
    </template>
    <a-form-item label="字体颜色">
      <jnpf-color-picker v-model:value="chart.label.color" size="small" />
    </a-form-item>
    <a-form-item label="背景色">
      <jnpf-color-picker v-model:value="chart.label.backgroundColor" size="small" />
    </a-form-item>
  </a-collapse-panel>
</template>