Преглед изворни кода

新增 ts模块以及鹰眼调整

YaolongHan пре 4 година
родитељ
комит
d46ffd3fc7

+ 2 - 2
docs/.vuepress/components/tDInsert/addPicture.vue

@@ -134,8 +134,8 @@ export default {
             url: require("./../../public/assets/img/mark.png"),
           };
           // vuepress 报错 暂时注掉
-          const aaa = new MarkItem(null, mark);
-          this.scene.addItem(aaa);
+          // const aaa = new MarkItem(null, mark);
+          // this.scene.addItem(aaa);
         }
       });
     },

+ 3 - 3
docs/.vuepress/components/tDInsert/partChange.vue

@@ -137,9 +137,9 @@ export default {
             url: require("./../../public/assets/img/mark.png"),
           };
           // vuepress 报错 暂时注掉
-          const aaa = new MarkItem(null, mark);
-          aaa.connect("onMouseDown", this, this.equipDown);
-          this.scene.addItem(aaa);
+          // const aaa = new MarkItem(null, mark);
+          // aaa.connect("onMouseDown", this, this.equipDown);
+          // this.scene.addItem(aaa);
         }
       });
     },

+ 1 - 0
docs/guides/index.js

@@ -108,6 +108,7 @@ const content = [
             ["/guides/tuopuInsert/brief.md", "简介"],
             ["/guides/tuopuInsert/install.md", "安装"],
             ["/guides/tuopuInsert/get-start.md", "快速上手"],
+            ["/guides/tuopuInsert/no-Ts.md", "非TS环境开发"],
             ["/guides/tuopuInsert/addEvent.md", "添加事件"],
             ["/guides/tuopuInsert/dragScene.md", "画布拖动"],
             ["/guides/tuopuInsert/viewColor.md", "画布颜色"],

+ 41 - 0
docs/guides/tuopuInsert/no-Ts.md

@@ -0,0 +1,41 @@
+## 非TS环境如何开发
+注:开发过程中,底层包有时候不能满足当前需求,需要开发同事基于当前引擎包二次开发;
+由于底层包开发时通过typeScript开发,所以如何让非TS项目开发引入开发尤为重要;
+(不需要二次拓展的忽略此模块)
+### 步骤一 全局安装 typeScript
+
+```js
+  npm install -g typescript
+```
+### 步骤二 在脚手架 package.json 同级目录 添加 tsconfig.json文件
+
+```js
+  {
+    "compilerOptions": {
+        "target": "es6",
+        "module": "es2015",
+        "moduleResolution": "node",
+        "allowSyntheticDefaultImports": true,
+        "experimentalDecorators": true,
+        "lib": [
+            "dom",
+            "es5",
+            "es2015",
+            "es2015.promise"
+        ],
+        "strict": true
+    },
+    "include": [
+        "src/**/*.ts",
+    ],
+    "exclude": [
+        "node_modules"
+    ]
+}
+```
+
+### 步骤三 该项目下启动实时编译
+
+ ```js
+ tsc -w
+ ```