From 57f3105f8e1a126c9714655fab2e30c3f41a6b2f Mon Sep 17 00:00:00 2001 From: Next <1406099478@qq.com> Date: Fri, 14 Jun 2019 15:05:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D2.1=E4=BB=A5=E4=B8=8B?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E9=87=8D=E5=A4=8D=E7=82=B9=E5=87=BB=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- js/app.js | 30 +++++++++++++++--------------- version.json | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index e8f8686..6488b2a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ccc-devtools v2.3.0 +# ccc-devtools v2.3.1 Cocos Creator 网页调试工具,运行时查看、修改节点树,实时更新节点属性,可视化显示缓存资源。 ## 预览 diff --git a/js/app.js b/js/app.js index ad3605d..5fc8b51 100644 --- a/js/app.js +++ b/js/app.js @@ -89,9 +89,9 @@ let app = new Vue({ cacheDataLoading: false }, methods: { - api: function(url, cb) { + api: function (url, cb) { let xhr = new XMLHttpRequest(); - xhr.onreadystatechange = function() { + xhr.onreadystatechange = function () { if (xhr.readyState == 4 && (xhr.status >= 200 && xhr.status < 400)) { let response = xhr.responseText; cb(JSON.parse(xhr.responseText)); @@ -100,7 +100,7 @@ let app = new Vue({ xhr.open("GET", url, true); xhr.send(); }, - compareVersion: function(localVersion, remoteVersion) { + compareVersion: function (localVersion, remoteVersion) { let vL = localVersion.split('.'); let vR = remoteVersion.split('.'); for (let i = 0; i < vL.length; ++i) { @@ -120,7 +120,7 @@ let app = new Vue({ return false; } }, - checkVersion: function() { + checkVersion: function () { this.api('https://raw.githubusercontent.com/potato47/ccc-devtools/master/version.json', ( data) => { let remoteVersion = data.version; @@ -307,9 +307,9 @@ let app = new Vue({ openDevMode() { setTimeout(() => { if (!cc.Node.prototype.isLeaf) { - cc.js.getset(cc.Node.prototype, 'isLeaf', function() { + cc.js.getset(cc.Node.prototype, 'isLeaf', function () { return this.childrenCount === 0; - }, function(value) { + }, function (value) { }, false, true); } @@ -358,7 +358,7 @@ let app = new Vue({ }, handleChangeStats() { if (this.$data.isShowProfile) { - let addStats = function(stats) { + let addStats = function (stats) { stats.dom.style.position = 'relative'; stats.dom.style.float = 'right'; stats.dom.style.marginLeft = '10px'; @@ -417,9 +417,9 @@ let app = new Vue({ }, initConsoleUtil() { if (cc.tree) return; - cc.tree = function(key) { + cc.tree = function (key) { let index = key || 0; - let treeNode = function(node) { + let treeNode = function (node) { let nameStyle = `color: ${node.parent === null || node.activeInHierarchy ? 'green' : 'grey'}; font-size: 14px;font-weight:bold`; let propStyle = @@ -452,10 +452,10 @@ let app = new Vue({ } return '属性依次为x,y,width,height,scale.使用cc.cat(id)查看详细属性.'; } - cc.cat = function(key) { + cc.cat = function (key) { let index = 0; let target; - let sortId = function(node) { + let sortId = function (node) { if (target) return; if (cc.js.isNumber(key)) { if (key === index++) { @@ -481,9 +481,9 @@ let app = new Vue({ target['tempIndex'] = cc.js.isNumber(key) ? key : index; return target; } - cc.list = function(key) { + cc.list = function (key) { let targets = []; - let step = function(node) { + let step = function (node) { if (node.name.toLowerCase().indexOf(key.toLowerCase()) > -1) { targets.push(node); } @@ -501,7 +501,7 @@ let app = new Vue({ return targets; } } - cc.where = function(key) { + cc.where = function (key) { let target = key.name ? key : cc.cat(key); if (!target) { return null; @@ -542,7 +542,7 @@ let app = new Vue({ // console.log(val); } }, - created: function() { + created: function () { this.checkVersion(); document.body.insertBefore(document.getElementById('app'), document.body.firstChild); diff --git a/version.json b/version.json index 334e3ea..b91c0bf 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "name": "ccc-devtools", - "version": "2.3.0", + "version": "2.3.1", "author": "Next", "repo": "https://github.com/potato47/ccc-devtools.git" } \ No newline at end of file