index.ts 492 B

12345678910111213141516171819202122232425262728293031323334
  1. import { createStore } from 'vuex'
  2. export default createStore({
  3. state: {
  4. sysConfig: {
  5. autoNext: true,
  6. autoRead: false,
  7. autoRed: false
  8. }
  9. },
  10. getters: {
  11. },
  12. mutations: {
  13. SET_SYSCONFIG(store, sysConfig: {
  14. autoNext: boolean,
  15. autoRead: boolean,
  16. autoRed: boolean
  17. }) {
  18. store.sysConfig = sysConfig
  19. return store
  20. }
  21. },
  22. actions: {
  23. LoginOut() {
  24. localStorage.setItem('token', '')
  25. }
  26. },
  27. modules: {
  28. }
  29. })