From 0e04f8b7083c3f97ce4a3d4044e3822014b2c625 Mon Sep 17 00:00:00 2001 From: xuyanfeng Date: Thu, 22 Apr 2021 19:09:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/src/devtools/data.ts | 4 +- source/src/devtools/execute.ts | 18 +++ source/src/devtools/global.less | 9 +- source/src/devtools/index.vue | 133 ++++++++------- source/src/{inject.js => devtools/inject.ts} | 161 ++++++++++++------- source/src/devtools/propertys.vue | 19 --- source/src/devtools/register-panel.ts | 27 +++- source/src/devtools/type.ts | 26 +++ source/src/devtools/ui-prop.vue | 2 +- source/src/manifest.json | 3 +- source/vue.config.js | 3 +- 11 files changed, 258 insertions(+), 147 deletions(-) create mode 100644 source/src/devtools/execute.ts rename source/src/{inject.js => devtools/inject.ts} (71%) diff --git a/source/src/devtools/data.ts b/source/src/devtools/data.ts index bebc5ef..6fe20ce 100644 --- a/source/src/devtools/data.ts +++ b/source/src/devtools/data.ts @@ -64,10 +64,10 @@ export class StringData extends Info { } export class NumberData extends Info { - constructor() { + constructor(data: number) { super(); this.type = DataType.Number; - this.data = 1; + this.data = data; } } diff --git a/source/src/devtools/execute.ts b/source/src/devtools/execute.ts new file mode 100644 index 0000000..ee0abed --- /dev/null +++ b/source/src/devtools/execute.ts @@ -0,0 +1,18 @@ +interface ICCInspector extends Object { + devPageCallEntry(para: string): void; + + init(): void; +} + +declare interface Window { + CCInspector: ICCInspector; + CCInspectorPara: string; +} +debugger +if (window.hasOwnProperty('CCInspector')) { + if (window.CCInspector.hasOwnProperty('devPageCallEntry')) { + window.CCInspector.devPageCallEntry(window.CCInspectorPara); + } else { + console.log("脚本inject.js未注入") + } +} diff --git a/source/src/devtools/global.less b/source/src/devtools/global.less index 373b9c4..644baa5 100644 --- a/source/src/devtools/global.less +++ b/source/src/devtools/global.less @@ -11,8 +11,13 @@ } } } -.el-input{ - input{ + +.el-input { + input { text-align: left !important; } } + +.el-tree { + width: 100%; +} diff --git a/source/src/devtools/index.vue b/source/src/devtools/index.vue index 8e50fcc..97fd6fa 100644 --- a/source/src/devtools/index.vue +++ b/source/src/devtools/index.vue @@ -43,10 +43,9 @@