index.js 430 B

12345678910111213141516171819202122
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. Vue.use(Vuex)
  4. export default new Vuex.Store({
  5. state: {
  6. weaterRes: {},
  7. windowWidth: 1920 + 1080,
  8. },
  9. mutations: {
  10. changClient(state, val) {
  11. state.windowWidth = val
  12. },
  13. changWeater(state, val) {
  14. state.weaterRes = val
  15. console.log(state.weaterRes)
  16. }
  17. },
  18. actions: {},
  19. modules: {}
  20. })