大空间消毒机
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.

33 lines
701 B

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. import { defineStore } from 'pinia'
  2. export const useUserStore = defineStore({
  3. id: 'user', // id必填,且需要唯一
  4. // state
  5. state: () => {
  6. return {
  7. allUserList: [],
  8. operUser: '',
  9. loginUser: '',
  10. loginUserPermission: 3,
  11. }
  12. },
  13. // actions
  14. actions: {
  15. updatePermission(loginUserPermission) {
  16. this.loginUserPermission = loginUserPermission
  17. },
  18. updateLoginUser(loginUser) {
  19. this.loginUser = loginUser
  20. },
  21. updateOperUser(operUser) {
  22. this.operUser = operUser
  23. },
  24. updateUserList(userList) {
  25. this.allUserList = userList
  26. },
  27. },
  28. getters: {
  29. userList: state => {
  30. return state.allUserList
  31. },
  32. },
  33. })