You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
311 B
JavaScript
15 lines
311 B
JavaScript
import { defineStore } from 'pinia';
|
|
import { ref } from 'vue'
|
|
|
|
export const useUserStore = defineStore('user', () => {
|
|
const userInfo = ref({});
|
|
const userId = ref(0);
|
|
|
|
function setUserInfo(info) {
|
|
userInfo.value = info;
|
|
userId.value = info.studentid
|
|
}
|
|
|
|
return { userInfo, userId, setUserInfo };
|
|
})
|