Vue中vuex状态管理用法

import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({

  state:{
     num:11
  },

  getters:{

  },

  mutations:{

  },

  actions:{

  }

})

export default store
posted @ 2025-12-27 13:28  学无边涯  阅读(7)  评论(0)    收藏  举报