cilliandevops ecfd39bcc2
feat:add login box top owl animation effect (#162)
Co-authored-by: pany <939630029@qq.com>
Co-authored-by: pany <panyang@mafengwo.com>
2024-02-26 22:22:15 +08:00

18 lines
331 B
TypeScript

import { ref } from "vue"
export function useFocus() {
/** 是否有焦点 */
const isFocus = ref<boolean>(false)
/** 失去焦点 */
const handleBlur = () => {
isFocus.value = false
}
/** 获取焦点 */
const handleFocus = () => {
isFocus.value = true
}
return { isFocus, handleBlur, handleFocus }
}