艺易修小程序24.08.21
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.

26 lines
441 B

8 months ago
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. Vue.use(Vuex); //vue的插件机制
  4. import api from '@/api/api.js'
  5. //Vuex.Store 构造器选项
  6. const store = new Vuex.Store({
  7. state: {
  8. configList: [], //配置列表
  9. },
  10. getters: {},
  11. mutations: {
  12. // 初始化配置
  13. initConfig(state){
  14. api('getConfig', res => {
  15. if(res.code == 200){
  16. state.configList = res.result
  17. }
  18. })
  19. },
  20. },
  21. actions: {},
  22. })
  23. export default store