diff --git a/README.md b/README.md
index 1a0f340a6cf247880355a1387aaf8a48eae756d0..6a9f87b3cda0f2aa1b9bdb06c19dbbab553af76d 100644
--- a/README.md
+++ b/README.md
@@ -115,5 +115,6 @@ npm run build -adapter=[chrome|edge|utools|firefox|web]
- [jwt-decode](https://www.npmjs.com/package/jwt-decode)
- [jian_fan](https://www.npmjs.com/package/jian_fan)
- [axios](https://www.npmjs.com/package/axios)
+- [monaco-editor](https://www.npmjs.com/package/monaco-editor)
> 当然项目中还使用很多不知道姓名的大神的代码, 在这里就不一一感谢
diff --git a/src/views/tool/code.vue b/src/views/tool/code.vue
index a46a174c9e060a6df16873a60febb823c7dc8f3a..1d3e663e0e8299d7a40e3f04494a2e0ffe4ce505 100644
--- a/src/views/tool/code.vue
+++ b/src/views/tool/code.vue
@@ -16,10 +16,18 @@
-
+
+
+
+
+
+
+
+
@@ -47,7 +55,7 @@ export default {
if (this.current.content) {
try {
this.current.lang = language;
- this.$refs.editor.format(language);
+ this.$refs.editor.format(language,{tab:this.current.tab});
this.$saveToolData(this.current);
return this.$Message.success('格式化完成');
}
@@ -65,6 +73,7 @@ export default {
current: {
content: "",
lang: "",
+ tab:4,
},
lang: [
"html",
@@ -82,6 +91,7 @@ export default {
"graphql",
"markdown",
"vue",
+ "angular",
],
};
},
diff --git a/src/views/tool/components/codeEditor.vue b/src/views/tool/components/codeEditor.vue
index 6e79914973b2e466131030f08dd36660387e7d91..e27fd73cb03fb4eeab30fd6d4d9f5548df33ed4d 100644
--- a/src/views/tool/components/codeEditor.vue
+++ b/src/views/tool/components/codeEditor.vue
@@ -21,6 +21,7 @@ const allowFormatterLanguage = {
xml: "xml",
yaml: "yaml",
vue: "vue",
+ angular: "angular",
}
export default {