mirror of
https://github.com/ZiuChen/ClipboardManager.git
synced 2025-12-28 05:59:33 +08:00
chore: 移除了插件内的二进制文件 恢复旧的监听机制 性能问题有待解决
This commit is contained in:
@@ -226,25 +226,17 @@ onMounted(() => {
|
||||
updateShowList(activeTab.value)
|
||||
|
||||
// 定期检查更新
|
||||
if (!utools.isMacOs) {
|
||||
window.listener.on('change', () => {
|
||||
let prev = {}
|
||||
setInterval(() => {
|
||||
const now = window.db.dataBase.data[0]
|
||||
if (prev?.id === now?.id) {
|
||||
} else {
|
||||
// 有更新
|
||||
list.value = window.db.dataBase.data
|
||||
updateShowList(activeTab.value)
|
||||
})
|
||||
} else {
|
||||
// macos
|
||||
let prev = {}
|
||||
setInterval(() => {
|
||||
const now = window.db.dataBase.data[0]
|
||||
if (prev?.id === now?.id) {
|
||||
} else {
|
||||
// 有更新
|
||||
list.value = window.db.dataBase.data
|
||||
updateShowList(activeTab.value)
|
||||
prev = now
|
||||
}
|
||||
}, 800)
|
||||
}
|
||||
prev = now
|
||||
}
|
||||
}, 800)
|
||||
|
||||
// 监听搜索框
|
||||
watch(filterText, (val) => updateShowList(activeTab.value))
|
||||
|
||||
Reference in New Issue
Block a user