ref: plugin 支持 type over

This commit is contained in:
muwoo 2021-07-12 17:09:51 +08:00
parent 781411c454
commit fbecd3bc71
2 changed files with 16 additions and 2 deletions

View File

@ -96,6 +96,21 @@ new Vue({
}
});
}
if (cmd.type === 'over') {
this.targetOptions.push({
type: 'ext',
name: cmd.label,
icon: plugin.icon,
click: () => {
ipcRenderer.send('superPanel-openPlugin', {
cmd: cmd,
plugin: plugin,
feature: fe,
data: word
})
}
});
}
})
});
});

View File

@ -173,8 +173,7 @@ window.utools = window.rubick = {
},
get(key) {
const dbData = getData(dbPath) || [];
return dbData.find(d => d._id === key);
return dbData.find(d => d._id === key) || '';
},
remove(key) {
key = typeof key === 'object' ? key._id : key;