mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-04-12 05:01:03 +00:00
全局变量名字和Chrome的习惯保持一致
Some checks failed
Deploy static content to Pages / deploy (push) Has been cancelled
Some checks failed
Deploy static content to Pages / deploy (push) Has been cancelled
This commit is contained in:
parent
f2c04eadb2
commit
81d4beaed8
@ -111,8 +111,16 @@ export class Inspector extends InjectEvent {
|
||||
const value = getValue(this.inspectorGameMemoryStorage, data);
|
||||
// 直接写console.log会被tree shaking
|
||||
const logFunction = console.log;
|
||||
logFunction(value);
|
||||
window["c"] = value;
|
||||
for (let i = 0; ; i++) {
|
||||
const key = `temp${i}`;
|
||||
if (typeof window[key] === "undefined") {
|
||||
window[key] = value;
|
||||
// logFunction(key);
|
||||
// logFunction(window[key]);
|
||||
logFunction(key, window[key]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Msg.RequestOpenNodeTouchFuntion: {
|
||||
|
@ -8,7 +8,7 @@
|
||||
</template>
|
||||
<template v-slot:header>
|
||||
<div style="flex: 1"></div>
|
||||
<i style="" @click.stop="onLog" class="print iconfont icon_print" title="值会临时保存到window.c"></i>
|
||||
<i style="" @click.stop="onLog" class="print iconfont icon_print" title="值会临时保存到window.temp"></i>
|
||||
</template>
|
||||
<div style="padding-left: 6px">
|
||||
<UiProp v-for="(item, index) in group.data" :key="index" :name="item.name" :value="item.value"> </UiProp>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<img :src="data.data" alt="图片" @click="onClickImg" class="img" />
|
||||
</div>
|
||||
<div class="url" :title="data.desc">{{ data.desc }}</div>
|
||||
<i class="print iconfont icon_print" title="值会临时保存到window.c" @click="onShowValueInConsole"></i>
|
||||
<i class="print iconfont icon_print" title="值会临时保存到window.temp" @click="onShowValueInConsole"></i>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user