Skip to content

Instantly share code, notes, and snippets.

@EnderKilledYou
Created July 18, 2022 02:55
Show Gist options
  • Save EnderKilledYou/4961a5199c430148f32885a8511a5fe0 to your computer and use it in GitHub Desktop.
Save EnderKilledYou/4961a5199c430148f32885a8511a5fe0 to your computer and use it in GitHub Desktop.
Vue Store
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
FaceResult: {
FaceId : '',
Gender : '',
Age : 0,
}
},
mutations: {
setFaceResult(state,faceResult){
state.FaceResult.FaceId = faceResult.facialId
state.FaceResult.Gender = faceResult.gender
state.FaceResult.Age = faceResult.age
}
},
actions: {},
modules: {}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment