mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-09 02:46:48 +08:00
update : add delCookie
This commit is contained in:
@@ -16,6 +16,10 @@ export function getCookie(name) {
|
|||||||
return document.cookie?.split(";").find(e => e.includes(name))?.replace(`${name}=`, '') || ''
|
return document.cookie?.split(";").find(e => e.includes(name))?.replace(`${name}=`, '') || ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function delCookie(name){
|
||||||
|
setCookie(name, "", -1)
|
||||||
|
}
|
||||||
|
|
||||||
export function useUserInfo(id) {
|
export function useUserInfo(id) {
|
||||||
const userInfo = ref({})
|
const userInfo = ref({})
|
||||||
watch(id, () => {
|
watch(id, () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user