🐛 Fix: remove circular dependency

This commit is contained in:
萌萌哒赫萝
2023-09-02 07:38:04 -07:00
parent 0a02b96662
commit 9ef5136201
4 changed files with 79 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
import { isReactive, isRef, toRaw, unref } from 'vue'
import { sendToMain } from './dataSender'
import { ipcRenderer } from 'electron'
import { OPEN_URL } from '~/universal/events/constants'
/**
@@ -19,6 +19,11 @@ export const getRawData = (args: any): any => {
return args
}
function sendToMain (channel: string, ...args: any[]) {
const data = getRawData(args)
ipcRenderer.send(channel, ...data)
}
export const openURL = (url: string) => {
sendToMain(OPEN_URL, url)
}