index.js 423 B

123456789101112131415161718192021222324
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. Vue.use(Vuex)
  4. export default new Vuex.Store({
  5. state: {},
  6. mutations: {
  7. setState(state, [key, val]) {
  8. state[key] = val
  9. }
  10. },
  11. actions: {
  12. // getWorkerList({ commit }) {
  13. // reqWorkerList({
  14. // searchStr: '',
  15. // pageSize: 1000,
  16. // pageNum: 1
  17. // }).then(res => {
  18. // commit('setState', ['workerList', res.content])
  19. // })
  20. // },
  21. },
  22. })