Feature(custom): refactor all main ipc event

This commit is contained in:
Kuingsmile
2024-06-12 23:38:17 +08:00
parent 106290f868
commit 5ddc182bd1
91 changed files with 1924 additions and 1806 deletions

View File

@@ -1,13 +1,14 @@
import { onMounted, onUnmounted } from 'vue'
import { openURL } from '@/utils/common'
import { sendRPC } from '@/utils/common'
import { IRPCActionType } from 'root/src/universal/types/enum'
export function useATagClick () {
const handleATagClick = (e: MouseEvent) => {
if (e.target instanceof HTMLAnchorElement) {
if (e.target.href) {
e.preventDefault()
openURL(e.target.href)
sendRPC(IRPCActionType.OPEN_URL, e.target.href)
}
}
}