增加 blur API

This commit is contained in:
muwoo 2021-12-29 20:15:11 +08:00
parent 8ca01d900d
commit c69be6c24f
3 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "rubick", "name": "rubick",
"version": "2.0.1-beta.9", "version": "2.0.1-beta.10",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",

View File

@ -59,6 +59,9 @@ window.rubick = {
setSubInputValue(text) { setSubInputValue(text) {
ipcSendSync("setSubInputValue", { text }); ipcSendSync("setSubInputValue", { text });
}, },
subInputBlur() {
ipcSendSync("subInputBlur");
},
getPath(name) { getPath(name) {
return ipcSendSync("getPath", { name }); return ipcSendSync("getPath", { name });
}, },

View File

@ -70,6 +70,9 @@ const API: any = {
})})` })})`
); );
}, },
subInputBlur() {
runnerInstance.getView().webContents.focus()
},
sendSubInputChangeEvent({ data }) { sendSubInputChangeEvent({ data }) {
runnerInstance.executeHooks("SubInputChange", data); runnerInstance.executeHooks("SubInputChange", data);
}, },