chore: 移除了插件内的二进制文件 恢复旧的监听机制 性能问题有待解决

This commit is contained in:
ZiuChen
2022-09-21 16:43:52 +08:00
parent b4dc9f803b
commit 8ee1572ea6
8 changed files with 25 additions and 166 deletions

View File

@@ -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))