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

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. }
  10. },
  11. // actions
  12. actions: {
  13. updateOperUser(operUser) {
  14. this.operUser = operUser
  15. },
  16. updateUserList(userList) {
  17. this.allUserList = userList
  18. },
  19. },
  20. getters: {
  21. userList: state => {
  22. const arr = state.allUserList.filter(item => item.permission_level == 3)
  23. return arr
  24. },
  25. },
  26. })