config.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <!-- Echarts 全局设置 -->
  3. <global-setting :optionData="optionData"> </global-setting>
  4. <!-- 胶囊柱图 -->
  5. <collapse-item :name="`胶囊柱图`" expanded>
  6. <SettingItemBox name="指标">
  7. <SettingItem name="显示数值">
  8. <n-space>
  9. <n-switch v-model:value="optionData.showValue" size="small"></n-switch>
  10. </n-space>
  11. </SettingItem>
  12. <setting-item name="单位">
  13. <n-input v-model:value="optionData.unit" size="small"></n-input>
  14. </setting-item>
  15. <setting-item name="每块高度(px)">
  16. <n-input-number
  17. v-model:value="optionData.itemHeight"
  18. :min="0"
  19. :step="1"
  20. size="small"
  21. placeholder="水球数值"
  22. ></n-input-number>
  23. </setting-item>
  24. </SettingItemBox>
  25. </collapse-item>
  26. </template>
  27. <script setup lang="ts">
  28. import { PropType, computed } from 'vue'
  29. import { GlobalSetting, CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
  30. import { GlobalThemeJsonType } from '@/settings/chartThemes/index'
  31. import { option } from './config'
  32. const props = defineProps({
  33. optionData: {
  34. type: Object as PropType<typeof option & GlobalThemeJsonType>,
  35. required: true
  36. }
  37. })
  38. </script>