added vuex to project

pull/44/head
A1Gard 6 months ago
parent 82504300cd
commit 5d2c2bd5eb

@ -1,4 +1,3 @@
{ {
"private": true, "private": true,
"type": "module", "type": "module",
@ -21,6 +20,7 @@
"remixicon": "^4.2.0", "remixicon": "^4.2.0",
"three": "0.150.0", "three": "0.150.0",
"vazirmatn": "^33.0.3", "vazirmatn": "^33.0.3",
"vue-toast-notification": "^3.1.2" "vue-toast-notification": "^3.1.2",
"vuex": "^4.0.2"
} }
} }

@ -0,0 +1,18 @@
import Vuex from 'vuex';
export default new Vuex.Store({
state: {
category: ''
},
mutations: {
UPDATE_CATEGORY(state, payload) {
state.category = payload;
}
},
actions:{
updateCategory(context,cat){
context.commit('UPDATE_CATEGORY',cat);
}
}
});

@ -264,6 +264,11 @@
"@vue/compiler-dom" "3.4.26" "@vue/compiler-dom" "3.4.26"
"@vue/shared" "3.4.26" "@vue/shared" "3.4.26"
"@vue/devtools-api@^6.0.0-beta.11":
version "6.6.3"
resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.6.3.tgz#b23a588154cba8986bba82b6e1d0248bde3fd1a0"
integrity sha512-0MiMsFma/HqA6g3KLKn+AGpL1kgKhFWszC9U29NfpWK5LE7bjeXxySWJrOJ77hBz+TBrBQ7o4QJqbPbqbs8rJw==
"@vue/reactivity@3.4.26": "@vue/reactivity@3.4.26":
version "3.4.26" version "3.4.26"
resolved "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.26.tgz" resolved "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.26.tgz"
@ -641,3 +646,10 @@ vue@^3.2.37:
"@vue/runtime-dom" "3.4.26" "@vue/runtime-dom" "3.4.26"
"@vue/server-renderer" "3.4.26" "@vue/server-renderer" "3.4.26"
"@vue/shared" "3.4.26" "@vue/shared" "3.4.26"
vuex@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/vuex/-/vuex-4.0.2.tgz#f896dbd5bf2a0e963f00c67e9b610de749ccacc9"
integrity sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==
dependencies:
"@vue/devtools-api" "^6.0.0-beta.11"

Loading…
Cancel
Save