index.js 429 B

12345678910111213141516171819202122232425262728
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. Vue.use(Vuex)
  4. const store = new Vuex.Store({
  5. state: {
  6. yuyueData:'',
  7. },
  8. getters:{
  9. getyuyueData(state){
  10. return state.yuyueData
  11. },
  12. },
  13. mutations: {
  14. mutationsyuyueData(state,data){
  15. state.yuyueData=data
  16. },
  17. },
  18. actions: {
  19. actionsyuyueData(context,playload){
  20. context.commit('mutationsyuyueData',playload)
  21. },
  22. }
  23. })
  24. export default store