|
@@ -1,11 +1,11 @@
|
|
|
import { computed, Ref } from 'vue'
|
|
import { computed, Ref } from 'vue'
|
|
|
-import { CreateComponentType } from '@/packages/index.d'
|
|
|
|
|
|
|
+import { CreateComponentType, CreateComponentGroupType } from '@/packages/index.d'
|
|
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
|
|
|
|
|
|
|
// 获取当前对象数据
|
|
// 获取当前对象数据
|
|
|
export const useTargetData = () => {
|
|
export const useTargetData = () => {
|
|
|
const chartEditStore = useChartEditStore()
|
|
const chartEditStore = useChartEditStore()
|
|
|
- const targetData: Ref<CreateComponentType> = computed(() => {
|
|
|
|
|
|
|
+ const targetData: Ref<CreateComponentType | CreateComponentGroupType> = computed(() => {
|
|
|
const list = chartEditStore.getComponentList
|
|
const list = chartEditStore.getComponentList
|
|
|
const targetIndex = chartEditStore.fetchTargetIndex()
|
|
const targetIndex = chartEditStore.fetchTargetIndex()
|
|
|
return list[targetIndex]
|
|
return list[targetIndex]
|