DB連動実装
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user