From cafa07b9827ada9cb2e2e479fdd838a349188c8e Mon Sep 17 00:00:00 2001 From: lin-xin <2981207131@qq.com> Date: Fri, 17 Feb 2017 16:31:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90markdown?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/components/common/sidebar.vue | 9 ++++-- src/components/page/Markdown.vue | 45 ++++++++++++++++++++++++++++ src/components/page/VueEditor.vue | 8 ----- src/router/index.js | 4 +++ static/css/main.css | 49 ++++++------------------------- 6 files changed, 65 insertions(+), 51 deletions(-) create mode 100644 src/components/page/Markdown.vue diff --git a/package.json b/package.json index 0a1e945..2f6408e 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "dependencies": { "element-ui": "^1.1.6", "vue": "^2.1.10", + "vue-markdown": "^2.1.3", "vue-quill-editor": "^1.1.1", "vue-router": "^2.2.0", "vue-tables-2": "^0.4.33" diff --git a/src/components/common/sidebar.vue b/src/components/common/sidebar.vue index 2127b91..e42763a 100644 --- a/src/components/common/sidebar.vue +++ b/src/components/common/sidebar.vue @@ -1,6 +1,6 @@ diff --git a/src/components/page/Markdown.vue b/src/components/page/Markdown.vue new file mode 100644 index 0000000..1474ed6 --- /dev/null +++ b/src/components/page/Markdown.vue @@ -0,0 +1,45 @@ + + + + + \ No newline at end of file diff --git a/src/components/page/VueEditor.vue b/src/components/page/VueEditor.vue index 5df30cb..5e75f19 100644 --- a/src/components/page/VueEditor.vue +++ b/src/components/page/VueEditor.vue @@ -55,12 +55,4 @@ .editor-btn{ margin-top: 20px; } - .plugins-tips{ - padding:10px; - margin-bottom: 20px; - background: #eef1f6; - } - .plugins-tips a{ - color: #20a0ff; - } \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 88a21f7..5589682 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -20,6 +20,10 @@ export default new Router({ { path: '/vueeditor', component: resolve => require(['../components/page/VueEditor.vue'], resolve) + }, + { + path: '/markdown', + component: resolve => require(['../components/page/Markdown.vue'], resolve) } ] }) diff --git a/static/css/main.css b/static/css/main.css index 675f5fb..db12e70 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -27,40 +27,15 @@ a{text-decoration: none} margin: 20px 0; text-align: right; } -.widget-box{ - max-width: 1200px; - background: none repeat scroll 0 0 #F9F9F9; - border-left: 1px solid #F0F8FF; - border-top: 2px solid #27a9e3; - border-right: 2px solid #cdcdcd; - clear: both; - margin:0 auto 30px; - position: relative; +.plugins-tips{ + padding:10px; + margin-bottom: 20px; + background: #eef1f6; } -.widget-box:hover{ - box-shadow: 0 2px 7px rgba(0,0,0,.15); -} -.widget-title{ - background: #efefef; - border-bottom: 1px solid #F0F8FF; - height: 40px; -} -.widget-title h5 { - color: #666; - padding: 12px; - margin: 0; - font-weight: normal; -} -.widget-content { - padding:25px; - border-bottom: 2px solid #cdcdcd; -} -.widget-box .el-select, -.widget-box .el-input, -.widget-box .el-upload, -.widget-box .el-tooltip{ - display: inline-block; +.plugins-tips a{ + color: #20a0ff; } + .el-button+.el-tooltip { margin-left: 10px; } @@ -70,15 +45,9 @@ a{text-decoration: none} .el-table tr:hover{ background: #f6faff; } -.page-box{ - margin-top: 20px; - text-align: right; -} -.page-box .el-pagination{ - background: #f9f9f9; -} + .mgb20{ - margin-bottom: 15px; + margin-bottom: 20px; } .mgb5{ margin-bottom: 5px;