This commit is contained in:
nextfu
2022-08-04 16:24:52 +08:00
parent 77073f20d2
commit b65bd645a0
12 changed files with 21 additions and 64 deletions

View File

@@ -18,6 +18,7 @@ window.addEventListener('showProfiler', (e: any) => {
<el-card :body-style="{ padding: 0 }" style="margin: 10px;">
<TreePanel :show="true"></TreePanel>
</el-card>
<el-link type="primary" href="https://github.com/potato47/ccc-devtools" target="_blank" style="position:absolute;left: 5px;bottom: 5px;">ccc-devtools</el-link>
</template>
<style scoped>

View File

@@ -1,11 +1,11 @@
<template>
<div class="row">
<el-checkbox v-model="ccNode!.active" size="small" style="margin-right: 10px;" />
<span class="header-title" style="flex: 1;">Node</span>
<el-button size="small" @click="Utils.drawNodeRect(ccNode)">+</el-button>
<el-button size="small" @click="Utils.outputToConsole(ccNode)">></el-button>
</div>
<template v-if="ccNode!.name != 'PROFILER_NODE'">
<div class="row">
<el-checkbox v-model="ccNode!.active" size="small" style="margin-right: 10px;" />
<span class="header-title" style="flex: 1;">Node</span>
<el-button size="small" @click="Utils.drawNodeRect(ccNode)">+</el-button>
<el-button size="small" @click="Utils.outputToConsole(ccNode)">></el-button>
</div>
<PropItem v-for="prop in NodeModel.props" :key="prop.key" :model="NodeModel" :prop-name="prop.name"
:prop-key="prop.key" :update-key="updateKey!"></PropItem>
</template>

View File

@@ -18,12 +18,12 @@ const props = defineProps({
show: Boolean,
});
let updateKey = ref(1);
let items = ref<any[]>([]);
function refresh() {
if (props.show) {
updateKey.value = -updateKey.value;
// @ts-ignore
if (!cc || !cc.profiler || !cc.profiler._stats) {
return;
}
// @ts-ignore
const stats = cc.profiler._stats;