| 12345678910111213141516171819202122 |
- import { storeToRefs } from 'pinia';
- import { useUserStore } from '@/store/modules/user';
- const userStore = useUserStore();
- const { getUserInfo } = storeToRefs(userStore);
- /**
- * 获取登录账户信息
- */
- export const useUserInfoHook = () => {
- const userInfo = getUserInfo.value;
- const id = userInfo.id;
- const staffNo = userInfo.staffNo;
- const realname = userInfo.realname;
- const permissions = userInfo.permissions;
- return {
- id,
- realname,
- permissions,
- staffNo,
- };
- };
|