mirror of
https://gitee.com/dromara/go-view.git
synced 2026-05-30 00:00:05 +08:00
feat:新增全局接口配置,单个图表映射表,抽离柱状图数据格式,
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { computed, Ref } from 'vue'
|
||||
import { CreateComponentType } from '@/packages/index.d'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
|
||||
// 获取当前对象数据
|
||||
export const useTargetData = () => {
|
||||
const chartEditStore = useChartEditStore()
|
||||
const targetData: Ref<CreateComponentType> = computed(() => {
|
||||
const list = chartEditStore.getComponentList
|
||||
const targetIndex = chartEditStore.fetchTargetIndex()
|
||||
return list[targetIndex]
|
||||
})
|
||||
return { targetData, chartEditStore }
|
||||
}
|
||||
Reference in New Issue
Block a user