DB連動実装

This commit is contained in:
2023-09-27 14:35:24 +09:00
parent 418f45f997
commit 4c6b2ea844
16 changed files with 688 additions and 24 deletions

View File

@@ -1,25 +1,33 @@
import { defineStore } from 'pinia';
import { ActionFlow,AppInfo } from 'src/types/ActionTypes';
export const useFlowEditorStore = defineStore('flowEditor', {
state: () => ({
counter: 0,
flowNames: [],
flowNames1: ''
}),
export interface FlowEditorState{
flowNames1:string;
appInfo?:AppInfo;
flows?:ActionFlow[];
selectedFlow?:ActionFlow|undefined;
}
export const useFlowEditorStore = defineStore("flowEditor",{
state: ():FlowEditorState => ({
flowNames1: '',
appInfo:undefined,
flows:undefined,
selectedFlow:undefined
}),
getters: {
doubleCount(state) {
return state.counter * 2;
currentFlow():ActionFlow|undefined{
return this.selectedFlow;
}
},
actions: {
increment() {
this.counter++;
setFlows(flows:ActionFlow[]){
this.flows=flows;
},
setDefaultFlow() {
this.counter++
selectFlow(flow:ActionFlow){
this.selectedFlow=flow;
}
}
});