You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
288 B

8 months ago
  1. //引用Vuex
  2. import Vue from 'vue'
  3. import Vuex from 'vuex'
  4. Vue.use(Vuex)
  5. //实例store对象
  6. const store = new Vuex.Store({
  7. state: {
  8. count: 6
  9. },
  10. mutations: {
  11. /*......*/
  12. }
  13. })
  14. //导出store对象
  15. export default store
  16. //export default const store或者export const store会报错