minor(logs) make logs to show in dev mode only
This commit is contained in:
parent
021627caf8
commit
6a64f861ba
|
@ -2,6 +2,7 @@ import {useSystemStore} from "@/stores/useSystemStore";
|
||||||
import {registerModule} from "@/router/msgRouter";
|
import {registerModule} from "@/router/msgRouter";
|
||||||
import {type ApiJsonMsg, ControlEvent, type ControlMsg, ControlMsgType, WtModuleID} from "@/api";
|
import {type ApiJsonMsg, ControlEvent, type ControlMsg, ControlMsgType, WtModuleID} from "@/api";
|
||||||
import {type ISysFmInfo, wt_sys_get_fm_info, WtSytemCmd} from "@/api/apiSystem";
|
import {type ISysFmInfo, wt_sys_get_fm_info, WtSytemCmd} from "@/api/apiSystem";
|
||||||
|
import {isDevMode} from "@/composables/buildMode";
|
||||||
|
|
||||||
|
|
||||||
export function useSystemModule() {
|
export function useSystemModule() {
|
||||||
|
@ -30,8 +31,9 @@ export function useSystemModule() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (isDevMode()) {
|
||||||
console.log(msg);
|
console.log(msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
registerModule(WtModuleID.SYSTEM, {
|
registerModule(WtModuleID.SYSTEM, {
|
||||||
|
|
|
@ -184,10 +184,11 @@ function mouseResize(e: MouseEvent) {
|
||||||
win1Ref.value.style.minWidth = f + "px";
|
win1Ref.value.style.minWidth = f + "px";
|
||||||
win1Ref.value.style.maxWidth = f + "px";
|
win1Ref.value.style.maxWidth = f + "px";
|
||||||
} else {
|
} else {
|
||||||
|
if (isDevMode()) {
|
||||||
console.log("Row clientX", e.clientX, "clientY", e.clientY,
|
console.log("Row clientX", e.clientX, "clientY", e.clientY,
|
||||||
"layerX", e.layerX, "layerY", e.layerY, "offsetX", e.offsetX, "offsetY", e.offsetY,
|
"layerX", e.layerX, "layerY", e.layerY, "offsetX", e.offsetX, "offsetY", e.offsetY,
|
||||||
"pageX", e.pageX, "pageY", e.pageY, win2Ref.value.clientHeight);
|
"pageX", e.pageX, "pageY", e.pageY, win2Ref.value.clientHeight);
|
||||||
|
}
|
||||||
win2Ref.value.style.minWidth = document.body.scrollWidth - f - win2.borderSize + "px";
|
win2Ref.value.style.minWidth = document.body.scrollWidth - f - win2.borderSize + "px";
|
||||||
win2Ref.value.style.maxWidth = document.body.scrollWidth - f - win2.borderSize + "px";
|
win2Ref.value.style.maxWidth = document.body.scrollWidth - f - win2.borderSize + "px";
|
||||||
}
|
}
|
||||||
|
@ -198,9 +199,11 @@ function mouseResize(e: MouseEvent) {
|
||||||
win1Ref.value.style.minHeight = f - ctx.curHeightOffset + "px";
|
win1Ref.value.style.minHeight = f - ctx.curHeightOffset + "px";
|
||||||
win1Ref.value.style.maxHeight = f - ctx.curHeightOffset + "px";
|
win1Ref.value.style.maxHeight = f - ctx.curHeightOffset + "px";
|
||||||
} else {
|
} else {
|
||||||
console.log("Col clientX", e.clientX, "clientY", e.clientY,
|
if (isDevMode()) {
|
||||||
"layerX", e.layerX, "layerY", e.layerY, "offsetX", e.offsetX, "offsetY", e.offsetY,
|
console.log("Col clientX", e.clientX, "clientY", e.clientY,
|
||||||
"pageX", e.pageX, "pageY", e.pageY, curTarget.offsetWidth, ctx.curHeightOffset);
|
"layerX", e.layerX, "layerY", e.layerY, "offsetX", e.offsetX, "offsetY", e.offsetY,
|
||||||
|
"pageX", e.pageX, "pageY", e.pageY, curTarget.offsetWidth, ctx.curHeightOffset);
|
||||||
|
}
|
||||||
win2Ref.value.style.minHeight = ctx.curHeightOffset - f + "px";
|
win2Ref.value.style.minHeight = ctx.curHeightOffset - f + "px";
|
||||||
win2Ref.value.style.maxHeight = ctx.curHeightOffset - f + "px";
|
win2Ref.value.style.maxHeight = ctx.curHeightOffset - f + "px";
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,6 +70,7 @@ import {ControlEvent, ControlMsgType, WtModuleID} from "@/api";
|
||||||
import {registerModule, unregisterModule} from "@/router/msgRouter";
|
import {registerModule, unregisterModule} from "@/router/msgRouter";
|
||||||
import {useSystemStore} from "@/stores/useSystemStore";
|
import {useSystemStore} from "@/stores/useSystemStore";
|
||||||
import {wt_sys_reboot} from "@/api/apiSystem";
|
import {wt_sys_reboot} from "@/api/apiSystem";
|
||||||
|
import {isDevMode} from "@/composables/buildMode";
|
||||||
|
|
||||||
const sysStore = useSystemStore();
|
const sysStore = useSystemStore();
|
||||||
const showHidden = ref(false)
|
const showHidden = ref(false)
|
||||||
|
@ -150,7 +151,9 @@ const onClientMsg = (msg: ApiJsonMsg) => {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(msg);
|
if (isDevMode()) {
|
||||||
|
console.log(msg);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClientCtrl = (msg: ControlMsg) => {
|
const onClientCtrl = (msg: ControlMsg) => {
|
||||||
|
|
Loading…
Reference in New Issue