diff --git a/package.json b/package.json index 496029bb8801c6fb51fbfd1f685d3d26e878c392..d9812847d051021538808ca126f242b5799822ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "c-tool", - "version": "1.10.0", + "version": "1.10.1", "private": true, "scripts": { "serve": "vue-cli-service serve --port 8081", diff --git a/src/i18n/locales/en/diffs.i18n.json5 b/src/i18n/locales/en/diffs.i18n.json5 index 18b8fdf117c81c1e5f33186f0e5e7882e07f153f..8cefb777d99076e4d40542eda9c7ab6b79e307a0 100644 --- a/src/i18n/locales/en/diffs.i18n.json5 +++ b/src/i18n/locales/en/diffs.i18n.json5 @@ -1,4 +1,5 @@ { "more": "More Languages", - "collapse":"Collapse Identical" + "collapse":"Collapse Identical", + "beautify":"Beautify" } diff --git a/src/i18n/locales/zh_CN/diffs.i18n.json5 b/src/i18n/locales/zh_CN/diffs.i18n.json5 index ded7f31404ba91ba493999e7e8a053d33b833f99..3152c7d3d1f31c50a779beada156e81cde6d640e 100644 --- a/src/i18n/locales/zh_CN/diffs.i18n.json5 +++ b/src/i18n/locales/zh_CN/diffs.i18n.json5 @@ -1,4 +1,5 @@ { "more": "更多语言", - "collapse":"折叠相同" + "collapse":"折叠相同", + "beautify":"格式化" } diff --git a/src/views/tool/code.vue b/src/views/tool/code.vue index b10c524c88e697121e6b254534ca79ee54de978a..3fb1c62ec0a4f55b6ffd43a84d8b898690c87649 100644 --- a/src/views/tool/code.vue +++ b/src/views/tool/code.vue @@ -52,6 +52,13 @@ export default { return data } }, + watch:{ + "current.isCompress"(){ + if (this.current.lang){ + this.handle(this.current.lang) + } + } + }, created() { this.$initToolData('content') }, @@ -77,6 +84,12 @@ export default { } } }, + isCompressChange(value){ + if (this.current.lang){ + console.log(value) + this.handle(this.current.lang) + } + } }, data() { return { diff --git a/src/views/tool/components/diffEditor.vue b/src/views/tool/components/diffEditor.vue index a2a0deeae3a32bafada2ed6b11130cf74f4cb23a..c9d27982446e58a04216baf869544da06dd1f5e1 100644 --- a/src/views/tool/components/diffEditor.vue +++ b/src/views/tool/components/diffEditor.vue @@ -1,8 +1,8 @@ + + diff --git a/src/views/tool/diffs.vue b/src/views/tool/diffs.vue index 1218a906befcbd96ca6de6a66c2af84779796541..4abfbd5575dd69c3ba9a4c4aaf182e85fbd4d2b0 100644 --- a/src/views/tool/diffs.vue +++ b/src/views/tool/diffs.vue @@ -1,47 +1,48 @@