add pinia
This commit is contained in:
25
frontend/src/stores/flowEditor.ts
Normal file
25
frontend/src/stores/flowEditor.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
export const useFlowEditorStore = defineStore('flowEditor', {
|
||||
state: () => ({
|
||||
counter: 0,
|
||||
flowNames: [],
|
||||
flowNames1: ''
|
||||
}),
|
||||
|
||||
getters: {
|
||||
doubleCount(state) {
|
||||
return state.counter * 2;
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
increment() {
|
||||
this.counter++;
|
||||
},
|
||||
|
||||
setDefaultFlow() {
|
||||
this.counter++
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user