mirror of
https://github.com/ZiuChen/ClipboardManager.git
synced 2025-06-07 13:54:05 +08:00
fix: 修复listener挂载在window上的问题
This commit is contained in:
parent
1e408a5770
commit
7418788f67
@ -293,4 +293,5 @@ export default function initPlugin() {
|
||||
window.createFile = createFile
|
||||
window.focus = focus
|
||||
window.toTop = toTop
|
||||
window.listener = listener
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ onMounted(() => {
|
||||
updateShowList(activeTab.value)
|
||||
|
||||
// 定期检查更新
|
||||
if (!utools.isMacOs() && window.listener?.listening) {
|
||||
if (!utools.isMacOs() && window.listener.listening) {
|
||||
// 非macOS系统且监听器开启时
|
||||
window.listener.on('change', () => {
|
||||
list.value = window.db.dataBase.data
|
||||
|
@ -183,7 +183,7 @@ const handleRestoreBtnClick = () => {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
listenStatus.value = window.listener?.listening
|
||||
listenStatus.value = window.listener.listening
|
||||
})
|
||||
</script>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user