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