extraComponentInfo.ts
753 Bytes
import { CreateComponentType, CreateComponentGroupType } from "@/packages/index.d";
import { RequestConfigType } from "@/store/modules/chartEditStore/chartEditStore.d";
import { useChartEditStore } from "@/store/modules/chartEditStore/chartEditStore";
import { defineStore } from "pinia";
export interface ExternalRequestType {
test: string
}
export interface ECreateComponentType extends CreateComponentType {
request: RequestConfigType & ExternalRequestType
}
const chartEditStore = useChartEditStore()
export const useExternalChartEditStore = defineStore({
id: 'useExtraComponentInfo',
actions: {
updateComponentList(index: number, newData: CreateComponentType) {
chartEditStore.updateComponentList(index, newData)
},
}
})