mirror of
https://github.com/ZiuChen/ClipboardManager.git
synced 2025-09-27 05:43:21 +08:00
feat: 重新进入插件 清空输入框
This commit is contained in:
@@ -45,6 +45,14 @@ const clear = () => {
|
||||
emit('update:modelValue', '')
|
||||
nextTick(() => window.focus())
|
||||
}
|
||||
|
||||
utools.onPluginEnter(() => {
|
||||
// 如果输入框有内容 则清空 并且移除焦点
|
||||
if (filterText.value) {
|
||||
clear()
|
||||
nextTick(() => document.activeElement.blur())
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
Reference in New Issue
Block a user