mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-07-18 16:56:25 +08:00
获取CSS选择器功能添加浏览器实例是否启用的提示
This commit is contained in:
parent
c44016a5ca
commit
fec8eb3f09
@ -12,10 +12,15 @@ export default defineComponent({
|
||||
emits: ["emitValue"],
|
||||
methods: {
|
||||
async inspectElement() {
|
||||
window.utools.hideMainWindow();
|
||||
const selectElement = await quickcomposer.browser.getSelector();
|
||||
window.utools.showMainWindow();
|
||||
this.$emit("emitValue", "str", selectElement || "");
|
||||
try {
|
||||
const tab = await quickcomposer.browser.getCurrentTab();
|
||||
window.utools.hideMainWindow();
|
||||
const selectElement = await quickcomposer.browser.getSelector(tab);
|
||||
window.utools.showMainWindow();
|
||||
this.$emit("emitValue", "str", selectElement || "");
|
||||
} catch (error) {
|
||||
quickcommand.showMessageBox(error.toString(), "error");
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user