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.

18 lines
342 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;
}
function setUserId(id) {
userId.value = id;
}
return { userInfo, userId, setUserInfo, setUserId };
})