mirror of
https://github.com/ZiuChen/ClipboardManager.git
synced 2025-06-06 21:34:08 +08:00
fix: 清空剪贴板数据时视图未更新
This commit is contained in:
parent
afe74350e5
commit
dcdeb734d2
@ -101,8 +101,10 @@ export default function initPlugin() {
|
||||
this.updateDataBaseLocal()
|
||||
}
|
||||
emptyDataBase() {
|
||||
this.dataBase.data = []
|
||||
window.db.dataBase.data = []
|
||||
this.updateDataBaseLocal(this.defaultDB)
|
||||
listener.emit('change')
|
||||
}
|
||||
filterDataBaseViaId(id) {
|
||||
return this.dataBase.data.filter((item) => item.id === id)
|
||||
|
@ -230,7 +230,14 @@ onMounted(() => {
|
||||
updateShowList(activeTab.value)
|
||||
})
|
||||
} else {
|
||||
// macOS且监听器启动失败时
|
||||
// macOS或监听器启动失败时
|
||||
// 进程虽然没有启动 但是可以接收emit
|
||||
window.listener.on('change', () => {
|
||||
// 检查到change事件 更新展示数据
|
||||
list.value = window.db.dataBase.data
|
||||
updateShowList(activeTab.value)
|
||||
})
|
||||
|
||||
let prev = {}
|
||||
setInterval(() => {
|
||||
const now = window.db.dataBase.data[0]
|
||||
|
Loading…
x
Reference in New Issue
Block a user