fix:手机端预览时隐藏顶部导航栏

This commit is contained in:
nextfu 2020-07-16 15:01:40 +08:00
parent fb69b09b35
commit 6bf3876262
4 changed files with 55 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# ccc-devtools v3.0.0
# ccc-devtools v3.0.1
Cocos Creator 网页调试工具,运行时查看、修改节点树,实时更新节点属性,可视化缓存资源。
## 功能

View File

@ -8,7 +8,7 @@
</style>
<v-app id="app">
<v-app-bar app clipped-left color="gray" dense v-if="true">
<v-app-bar app clipped-left color="gray" dense v-if="isShowTop">
<v-app-bar-nav-icon @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
<div id="recompiling"><span>Recompiling...</span></div>
<v-spacer></v-spacer>
@ -58,7 +58,51 @@
</div>
</v-app-bar>
<v-navigation-drawer v-model="drawer" app clipped fixed width="512">
<div v-if="!isShowTop">
<div id="recompiling"><span>Recompiling...</span></div>
<div class="toolbar">
<div class="item">
<select id="opts-device">
<option value="0">Default</option>
</select>
</div>
<div class="item">
<v-btn id="btn-rotate" small height="25"><span style="color: #aaa;">Rotate</span></v-btn>
</div>
<span style="font-size: small;display: none;" class="item">Debug Mode:</span>
<div class="item" style="display: none;">
<select id="opts-debug-mode">
<option value="0">None</option>
<option value="1">Info</option>
<option value="2">Warn</option>
<option value="3">Error</option>
<option value="4">Info For Web Page</option>
<option value="5">Warn For Web Page</option>
<option value="6">Error For Web Page</option>
</select>
</div>
<div class="item">
<v-btn id="btn-show-fps" small height="25"><span style="color: #aaa;">Show FPS</span></v-btn>
</div>
<div class="item">
<span style="font-size: small;color: #aaa;" class="item">FPS:</span><input id="input-set-fps"
type="number" />
</div>
<div style="margin-right: 0px;" class="item">
<v-btn id="btn-pause" small height="25"><span style="color: #aaa;">Pause</span></v-btn>
</div>
<div class="item">
<v-btn id="btn-step" style="display: none;" small height="25">
<span style="color: #aaa;">Step</span>
</v-btn>
</div>
<div class="item">
<v-btn id="btn-recompile" small height="25"><span style="color: #aaa;">Recompile</span></v-btn>
</div>
</div>
</div>
<v-navigation-drawer v-model="drawer" app clipped fixed width="512" v-if="isShowTop">
<v-container style="height: 50%;overflow: auto;">
<v-text-field v-model="treeSearchText" dense label="Search Node or Component" dark flat solo-inverted
hide-details clearable clear-icon="mdi-close-circle-outline"></v-text-field>

View File

@ -4,6 +4,7 @@ const app = new Vue({
theme: { dark: true }
}),
data: {
isShowTop: true,
drawer: false,
cacheDialog: false,
cacheTitle: '',
@ -27,8 +28,13 @@ const app = new Vue({
componentsSchema: [],
},
created() {
if (window.innerHeight === window.outerHeight) { // 手机端chrome device模式
this.isShowTop = false;
}
this.waitCCInit().then(() => {
this.startUpdateTree();
if (this.isShowTop) {
this.startUpdateTree();
}
initConsoleUtil();
});
},

View File

@ -1,6 +1,6 @@
{
"name": "ccc-devtools",
"version": "3.0.0",
"version": "3.0.1",
"author": "Next",
"repo": "https://github.com/potato47/ccc-devtools.git"
}