import { computed } from 'vue';
import { useChartEditStore } from '@/store/modules/chart/chartEditStore';

// 获取当前对象数据
export const useTargetData = () => {
  const chartEditStore = useChartEditStore();
  const targetData = computed(() => {
    const list = chartEditStore.getComponentList;
    const targetIndex = chartEditStore.fetchTargetIndex();
    return list[targetIndex];
  });
  return { targetData, chartEditStore };
};
