From d20585a3f92c0f1d38c915fa8fc6032d0beadb9c Mon Sep 17 00:00:00 2001 From: Pan Date: Fri, 17 Nov 2017 17:51:41 +0800 Subject: [PATCH] refactor:foramt views/component-demo --- src/components/GithubCorner/index.vue | 2 +- src/components/JsonEditor/index.vue | 5 +- src/components/MarkdownEditor/index.vue | 9 +- src/components/Screenfull/index.vue | 14 +- src/components/SplitPane/Pane.vue | 44 ------ src/components/SplitPane/Resizer.vue | 72 ---------- src/components/SplitPane/index.vue | 111 --------------- src/components/Tinymce/index.vue | 4 +- src/icons/index.js | 6 +- src/mock/login.js | 7 - src/permission.js | 2 +- src/router/index.js | 23 +-- src/store/modules/app.js | 2 +- src/store/modules/user.js | 2 +- src/styles/index.scss | 13 ++ src/utils/clipboard.js | 2 +- src/views/components-demo/avatarUpload.vue | 11 +- src/views/components-demo/backToTop.vue | 1 + src/views/components-demo/countTo.vue | 49 ++++--- src/views/components-demo/dndList.vue | 1 + src/views/components-demo/dropzone.vue | 3 +- src/views/components-demo/jsonEditor.vue | 3 +- src/views/components-demo/markdown.vue | 11 +- src/views/components-demo/mixin.vue | 17 +-- src/views/components-demo/splitpane.vue | 29 ++-- src/views/components-demo/sticky.vue | 1 + src/views/components-demo/tinymce.vue | 9 +- .../dashboard/admin/components/BarChart.vue | 1 + .../dashboard/admin/components/PanelGroup.vue | 131 ++++++++++++++++++ src/views/dashboard/admin/index.vue | 122 +--------------- src/views/dashboard/editor/index.vue | 4 +- src/views/layout/components/Navbar.vue | 2 +- .../layout/components/Sidebar/SidebarItem.vue | 2 +- src/views/login/index.vue | 8 +- src/views/svg-icons/index.vue | 12 +- 35 files changed, 289 insertions(+), 446 deletions(-) delete mode 100644 src/components/SplitPane/Pane.vue delete mode 100644 src/components/SplitPane/Resizer.vue delete mode 100644 src/components/SplitPane/index.vue create mode 100644 src/views/dashboard/admin/components/PanelGroup.vue diff --git a/src/components/GithubCorner/index.vue b/src/components/GithubCorner/index.vue index 63177403..8f09e9de 100644 --- a/src/components/GithubCorner/index.vue +++ b/src/components/GithubCorner/index.vue @@ -1,6 +1,6 @@ @@ -57,7 +57,6 @@ export default { .CodeMirror { height: 100%; } - .json-editor .cm-s-rubyblue span.cm-string { color: #F08047; } diff --git a/src/components/MarkdownEditor/index.vue b/src/components/MarkdownEditor/index.vue index 5dacf4a3..cbec69a0 100644 --- a/src/components/MarkdownEditor/index.vue +++ b/src/components/MarkdownEditor/index.vue @@ -1,6 +1,6 @@ @@ -15,8 +15,7 @@ export default { props: { value: String, id: { - type: String, - default: 'markdown-editor' + type: String }, autofocus: { type: Boolean, @@ -52,7 +51,7 @@ export default { }, mounted() { this.simplemde = new SimpleMDE({ - element: document.getElementById(this.id), + element: document.getElementById(this.id || 'markdown-editor-' + +new Date()), autoDownloadFontAwesome: false, autofocus: this.autofocus, toolbar: this.toolbar, diff --git a/src/components/Screenfull/index.vue b/src/components/Screenfull/index.vue index 89d25817..56de914e 100644 --- a/src/components/Screenfull/index.vue +++ b/src/components/Screenfull/index.vue @@ -1,6 +1,16 @@ diff --git a/src/components/SplitPane/Pane.vue b/src/components/SplitPane/Pane.vue deleted file mode 100644 index d13d1286..00000000 --- a/src/components/SplitPane/Pane.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - - - diff --git a/src/components/SplitPane/Resizer.vue b/src/components/SplitPane/Resizer.vue deleted file mode 100644 index 07b6fb3b..00000000 --- a/src/components/SplitPane/Resizer.vue +++ /dev/null @@ -1,72 +0,0 @@ - - - - - diff --git a/src/components/SplitPane/index.vue b/src/components/SplitPane/index.vue deleted file mode 100644 index 477405b6..00000000 --- a/src/components/SplitPane/index.vue +++ /dev/null @@ -1,111 +0,0 @@ - - - - - diff --git a/src/components/Tinymce/index.vue b/src/components/Tinymce/index.vue index dadac94b..a06f00c8 100644 --- a/src/components/Tinymce/index.vue +++ b/src/components/Tinymce/index.vue @@ -1,6 +1,6 @@