Fix state

This commit is contained in:
René Preuß committed 2022-10-30 14:27:53 +01:00
1 parent 11570c9832
commit ed44357418
5 files changed
+22 -7

No files matched your search

+2
View File
@@ -1 +1,3 @@
.idea
node_modules
package-lock.json
+1 -1
View File
@@ -29,8 +29,8 @@
</template>
<script>
import {useMenuStore} from "../stores/menu";
import {mapState} from "pinia";
import {useMenuStore} from "../stores/menu";
export default {
name: "ThirdLevelMenu",
+1 -1
View File
@@ -1,4 +1,4 @@
import {useMenuStore} from "~/stores/menu";
import {useMenuStore} from "../stores/menu";
export const useMenu = (data) => {
const menu = useMenuStore()
+4 -5
View File
@@ -2,10 +2,9 @@
"name": "@bitinflow/ui",
"version": "0.0.1",
"description": "Bitinflow UI Kit",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "René Preuß <rene@bitinflow.com>",
"license": "Apache-2.0"
"license": "Apache-2.0",
"dependencies": {
"pinia": "^2.0.23"
}
}
+14
View File
@@ -0,0 +1,14 @@
import {defineStore} from 'pinia';
export const useMenuStore = defineStore('menu', {
state: () => {
return {
thirdLevelLinks: []
}
},
actions: {
updateThirdLevelLinks(links) {
this.thirdLevelLinks = links;
},
},
})