mirror of
https://gitee.com/dromara/go-view.git
synced 2025-05-16 04:29:15 +08:00
27 lines
663 B
Vue
27 lines
663 B
Vue
<template>
|
|
<n-progress
|
|
:type="type"
|
|
:percentage="dataset"
|
|
:indicator-placement="indicatorPlacement"
|
|
:color="color"
|
|
/>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { PropType, toRefs, watch } from 'vue'
|
|
import { useChartDataFetch } from '@/hooks'
|
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
|
import config from './config'
|
|
|
|
const props = defineProps({
|
|
chartConfig: {
|
|
type: Object as PropType<config>,
|
|
required: true,
|
|
},
|
|
})
|
|
|
|
// 取配置数据
|
|
const { type, color, indicatorPlacement, dataset } = toRefs(props.chartConfig.option)
|
|
|
|
useChartDataFetch(props.chartConfig, useChartEditStore)
|
|
</script> |