⬆️ Upgrade: upgrade deps

This commit is contained in:
萌萌哒赫萝
2023-08-27 07:48:08 -07:00
parent e15aa846e5
commit bfbfef17b2
10 changed files with 2531 additions and 486 deletions

View File

@@ -0,0 +1,19 @@
import { openURL } from '@/utils/common'
import { onMounted, onUnmounted } from 'vue'
export function useATagClick () {
const handleATagClick = (e: MouseEvent) => {
if (e.target instanceof HTMLAnchorElement) {
if (e.target.href) {
e.preventDefault()
openURL(e.target.href)
}
}
}
onMounted(() => {
document.addEventListener('click', handleATagClick)
})
onUnmounted(() => {
document.removeEventListener('click', handleATagClick)
})
}