output node handler in console

This commit is contained in:
Next 2018-12-28 10:20:31 +08:00
parent 6beff39c3d
commit 8f3e9f9b1c
2 changed files with 29 additions and 8 deletions

View File

@ -56,6 +56,9 @@
<el-col :span="20"> <el-col :span="20">
<el-input v-model="node.name" size="mini"></el-input> <el-input v-model="node.name" size="mini"></el-input>
</el-col> </el-col>
<el-col :span="2">
<el-button icon="el-icon-search" @click="outputNodeHandler" size="mini" circle></el-button>
</el-col>
</el-row> </el-row>
<Collapse simple value="1"> <Collapse simple value="1">
<Panel name="1"> <Panel name="1">
@ -152,15 +155,18 @@
</Split> </Split>
</div> </div>
</Split> </Split>
<el-tooltip :content="'ccc-devtools@Next v1.1.0 https://github.com/potato47/ccc-devtools'" placement="top" style="position: absolute;bottom:10px;left:10px;width: 100;background:#333333;"> <div style="position: absolute;bottom:10px;left:10px;width: 200px;">
<el-switch <el-switch
v-model="isDevMode" v-model="isDevMode"
@change="handleChangeMode" @change="handleChangeMode"
active-color="#13ce66" active-color="#13ce66"
inactive-color="gray"> inactive-color="gray">
</el-switch> </el-switch>
<el-tooltip :content="'ccc-devtools@Next v1.2.0'" placement="top">
<Icon type="logo-github" size="24" @click="openGithub"/>
</el-tooltip> </el-tooltip>
</div> </div>
</div>
</div> </div>
<!-- <script type="text/javascript" charset="utf-8" src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> --> <!-- <script type="text/javascript" charset="utf-8" src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> -->
@ -212,6 +218,21 @@
handleColorChange(data) { handleColorChange(data) {
this.$data.node.color = new cc.Color().fromHEX(data); this.$data.node.color = new cc.Color().fromHEX(data);
}, },
outputNodeHandler(target) {
let i = 1;
while(window['temp'+i] !== undefined) {
i++;
}
window['temp'+i] = this.$data.node;
console.log('temp' + i);
console.log(window['temp'+i]);
},
outputComponentHandler(target) {
// TODO
},
openGithub() {
window.open('https://github.com/potato47/ccc-devtools');
},
filterNode(value, node) { filterNode(value, node) {
if (!value) return true; if (!value) return true;
return node.name.toLowerCase().indexOf(value.toLowerCase()) !== -1; return node.name.toLowerCase().indexOf(value.toLowerCase()) !== -1;

BIN
screenshots/t5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB