chat-pc/src/hooks/useProvideUserModal.ts

22 lines
399 B
TypeScript
Raw Normal View History

2024-12-24 08:14:21 +00:00
import { ref, provide } from 'vue'
export function useProvideUserModal() {
const isShow = ref(false)
const uid = ref(0)
const euid=ref(0)
const show = (eid: number,id:number) => {
euid.value=eid
2024-12-24 08:14:21 +00:00
uid.value = id
isShow.value = true
}
const close = () => {
uid.value = 0
isShow.value = false
}
provide('$user', show)
return { isShow, uid, show, close ,euid}
2024-12-24 08:14:21 +00:00
}