mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-04-16 07:01:03 +00:00
bug fix
This commit is contained in:
parent
95fa6ec276
commit
f7bd7790e1
@ -222,8 +222,10 @@ export default defineComponent({
|
|||||||
const picking = ref(false);
|
const picking = ref(false);
|
||||||
const rootEl = ref<HTMLDivElement>(null);
|
const rootEl = ref<HTMLDivElement>(null);
|
||||||
const showBtns = ref(true);
|
const showBtns = ref(true);
|
||||||
|
if (config.value.autoHide) {
|
||||||
|
showBtns.value = false;
|
||||||
|
}
|
||||||
let autoHideTimer = null;
|
let autoHideTimer = null;
|
||||||
let autoHide = toRaw(config.value.autoHide);
|
|
||||||
let isDraging = false;
|
let isDraging = false;
|
||||||
return {
|
return {
|
||||||
showBtns,
|
showBtns,
|
||||||
@ -241,13 +243,12 @@ export default defineComponent({
|
|||||||
const arr: IUiMenuItem[] = [
|
const arr: IUiMenuItem[] = [
|
||||||
{
|
{
|
||||||
name: "auto hide",
|
name: "auto hide",
|
||||||
selected: autoHide,
|
selected: config.value.autoHide,
|
||||||
callback: () => {
|
callback: () => {
|
||||||
autoHide = !autoHide;
|
config.value.autoHide = !config.value.autoHide;
|
||||||
config.value.autoHide = autoHide;
|
|
||||||
appStore().save();
|
appStore().save();
|
||||||
ga(GA_EventName.MouseMenu, "auto hide");
|
ga(GA_EventName.MouseMenu, "auto hide");
|
||||||
if (!autoHide) {
|
if (!config.value.autoHide) {
|
||||||
clearTimeout(autoHideTimer);
|
clearTimeout(autoHideTimer);
|
||||||
showBtns.value = true;
|
showBtns.value = true;
|
||||||
}
|
}
|
||||||
@ -260,7 +261,7 @@ export default defineComponent({
|
|||||||
if (isDraging) {
|
if (isDraging) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!autoHide) {
|
if (!config.value.autoHide) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
autoHideTimer = setTimeout(() => {
|
autoHideTimer = setTimeout(() => {
|
||||||
|
@ -102,9 +102,9 @@ export class Inspector extends InjectEvent {
|
|||||||
case Msg.RequestLogCustom: {
|
case Msg.RequestLogCustom: {
|
||||||
const logFunction = console.log;
|
const logFunction = console.log;
|
||||||
logFunction(pluginEvent.data);
|
logFunction(pluginEvent.data);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case Msg.ReqWriteClipboard: {
|
case Msg.ReqWriteClipboard: {
|
||||||
document.body.focus();
|
|
||||||
navigator.clipboard
|
navigator.clipboard
|
||||||
.writeText(pluginEvent.data)
|
.writeText(pluginEvent.data)
|
||||||
|
|
||||||
@ -343,7 +343,7 @@ export class Inspector extends InjectEvent {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (node instanceof type) {
|
if (type && node instanceof type) {
|
||||||
if (keys.find((v) => v === key)) {
|
if (keys.find((v) => v === key)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user