From be7ec4c0ff8c462ab0e45e1bab640bd2e72767b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E8=A3=A4=E8=A1=A9?= Date: Tue, 16 Apr 2019 11:20:13 +0800 Subject: [PATCH] docs: improve code comments (#1911) --- mock/article.js | 2 +- src/components/BackToTop/index.vue | 7 +--- src/components/JsonEditor/index.vue | 4 +-- src/components/Kanban/index.vue | 1 + src/components/ThemePicker/index.vue | 1 - .../Tinymce/components/EditorImage.vue | 10 +++--- src/components/Upload/SingleImage.vue | 1 - src/directive/el-table/adaptive.js | 1 - src/directive/el-table/index.js | 1 - src/directive/permission/permission.js | 1 - src/filters/index.js | 2 +- src/lang/en.js | 3 ++ src/lang/es.js | 3 ++ src/lang/zh.js | 3 ++ src/main.js | 18 ++++++---- src/router/modules/components.js | 2 +- src/router/modules/nested.js | 2 +- src/router/modules/table.js | 2 +- src/store/modules/permission.js | 4 +-- src/styles/element-ui.scss | 2 +- src/styles/index.scss | 28 +++++---------- src/styles/sidebar.scss | 6 ++-- src/styles/transition.scss | 8 ++--- src/styles/variables.scss | 4 +-- src/utils/error-log.js | 4 +-- src/utils/request.js | 36 ++++++++++--------- src/views/components-demo/avatar-upload.vue | 4 +-- src/views/components-demo/back-to-top.vue | 8 ++--- src/views/components-demo/count-to.vue | 8 ++--- src/views/components-demo/dnd-list.vue | 4 +-- src/views/components-demo/dropzone.vue | 4 +-- src/views/components-demo/json-editor.vue | 4 +-- src/views/components-demo/markdown.vue | 4 +-- src/views/components-demo/split-pane.vue | 4 +-- src/views/components-demo/sticky.vue | 2 +- src/views/components-demo/tinymce.vue | 4 +-- src/views/error-log/index.vue | 4 +-- .../example/components/ArticleDetail.vue | 20 +++++------ .../example/components/Dropdown/Comment.vue | 6 ++-- .../example/components/Dropdown/Platform.vue | 2 +- .../example/components/Dropdown/SourceUrl.vue | 6 ++-- src/views/example/components/Warning.vue | 9 +++-- src/views/guide/index.vue | 4 +-- src/views/pdf/index.vue | 2 +- src/views/permission/directive.vue | 4 +-- src/views/svg-icons/index.vue | 4 +-- src/views/table/complex-table.vue | 6 ++-- src/views/theme/index.vue | 2 +- vue.config.js | 1 + 49 files changed, 134 insertions(+), 138 deletions(-) diff --git a/mock/article.js b/mock/article.js index 45b75296..bc236eb9 100644 --- a/mock/article.js +++ b/mock/article.js @@ -3,7 +3,7 @@ import Mock from 'mockjs' const List = [] const count = 100 -const baseContent = '

我是测试数据我是测试数据

' +const baseContent = '

I am testing data, I am testing data.

' const image_uri = 'https://wpimg.wallstcn.com/e4558086-631c-425c-9430-56ffb46e70b3' for (let i = 0; i < count; i++) { diff --git a/src/components/BackToTop/index.vue b/src/components/BackToTop/index.vue index c094037f..36522f4a 100644 --- a/src/components/BackToTop/index.vue +++ b/src/components/BackToTop/index.vue @@ -1,12 +1,7 @@ diff --git a/src/components/JsonEditor/index.vue b/src/components/JsonEditor/index.vue index 81715f5d..07b282e4 100644 --- a/src/components/JsonEditor/index.vue +++ b/src/components/JsonEditor/index.vue @@ -25,8 +25,8 @@ export default { }, watch: { value(value) { - const editor_value = this.jsonEditor.getValue() - if (value !== editor_value) { + const editorValue = this.jsonEditor.getValue() + if (value !== editorValue) { this.jsonEditor.setValue(JSON.stringify(this.value, null, 2)) } } diff --git a/src/components/Kanban/index.vue b/src/components/Kanban/index.vue index c2cb4691..82f7dd7e 100644 --- a/src/components/Kanban/index.vue +++ b/src/components/Kanban/index.vue @@ -15,6 +15,7 @@ +