From 15a7d074d2fdc0aa085497518da794532f41020b Mon Sep 17 00:00:00 2001 From: Pan Date: Tue, 18 Apr 2017 21:38:49 +0800 Subject: [PATCH] add view --- src/assets/iconfont/iconfont.js | 6 ++ src/components/Charts/keyboard2.vue | 149 ++++++++++++++++++++++++++ src/components/Hamburger/index.vue | 4 +- src/router/index.js | 23 +++- src/styles/index.scss | 64 ++++++----- src/views/charts/keyboard.vue | 29 +++++ src/views/charts/keyboard2.vue | 29 +++++ src/views/charts/markdown.vue | 22 ++++ src/views/charts/tinymce.vue | 28 +++++ src/views/components/404.vue | 61 ----------- src/views/components/dndlist.vue | 29 +++++ src/views/components/jsoneditor.vue | 28 +++++ src/views/dashboard/default/index.vue | 3 +- src/views/error/401.vue | 4 +- 14 files changed, 385 insertions(+), 94 deletions(-) create mode 100644 src/components/Charts/keyboard2.vue create mode 100644 src/views/charts/keyboard.vue create mode 100644 src/views/charts/keyboard2.vue create mode 100644 src/views/charts/markdown.vue create mode 100644 src/views/charts/tinymce.vue delete mode 100644 src/views/components/404.vue create mode 100644 src/views/components/dndlist.vue create mode 100644 src/views/components/jsoneditor.vue diff --git a/src/assets/iconfont/iconfont.js b/src/assets/iconfont/iconfont.js index b3394628..67079a93 100644 --- a/src/assets/iconfont/iconfont.js +++ b/src/assets/iconfont/iconfont.js @@ -1,6 +1,12 @@ ;(function(window) { var svgSprite = '' + + '' + + '' + + '' + + '' + + '' + + '' + '' + '' + '' + diff --git a/src/components/Charts/keyboard2.vue b/src/components/Charts/keyboard2.vue new file mode 100644 index 00000000..8ba50545 --- /dev/null +++ b/src/components/Charts/keyboard2.vue @@ -0,0 +1,149 @@ +
+ + diff --git a/src/components/Hamburger/index.vue b/src/components/Hamburger/index.vue index 5361dd51..fc330374 100644 --- a/src/components/Hamburger/index.vue +++ b/src/components/Hamburger/index.vue @@ -1,8 +1,6 @@ diff --git a/src/router/index.js b/src/router/index.js index 0768f3c4..2e5bd97d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -19,6 +19,12 @@ import reset from '../views/login/reset'; /* components*/ const Tinymce = resolve => require(['../views/components/tinymce'], resolve); const Markdown = resolve => require(['../views/components/markdown'], resolve); +const Jsoneditor = resolve => require(['../views/components/jsoneditor'], resolve); + +/* charts*/ +const KeyboardChart = resolve => require(['../views/charts/keyboard'], resolve); +const KeyboardChart2 = resolve => require(['../views/charts/keyboard2'], resolve); + /* admin*/ // const AdminCreateUser = resolve => require(['../views/admin/createUser'], resolve); @@ -52,14 +58,27 @@ export default new Router({ ] }, { - path: '/admin', + path: '/components', component: Layout, redirect: 'noredirect', name: '组件', icon: 'zujian', children: [ { path: 'tinymce', component: Tinymce, name: '富文本编辑器' }, - { path: 'markdown', component: Markdown, name: 'Markdown' } + { path: 'markdown', component: Markdown, name: 'Markdown' }, + { path: 'jsoneditor', component: Jsoneditor, name: 'json编辑器' } + + ] + }, + { + path: '/charts', + component: Layout, + redirect: 'noredirect', + name: '图表', + icon: 'tubiaoleixingzhengchang', + children: [ + { path: 'keyboard', component: KeyboardChart, name: '键盘图表' }, + { path: 'keyboard2', component: KeyboardChart2, name: '键盘图表2' } ] }, diff --git a/src/styles/index.scss b/src/styles/index.scss index c6beb1d3..d04b5dff 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,17 +1,17 @@ @import './btn.scss'; // @import './editor.scss'; @import "./mixin.scss"; - body { //height: 100%; //overflow-y: scroll; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; - font-family: Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Arial,sans-serif; + font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; //@include scrollBar; } -label{ + +label { font-weight: 700; } @@ -19,7 +19,9 @@ html { box-sizing: border-box; } -*, *:before, *:after { +*, +*:before, +*:after { box-sizing: inherit; } @@ -68,21 +70,29 @@ a:hover { display: block; } -.components-container{ +.components-container { margin: 30px 50px; + position: relative; } -code{ - background: #eef1f6; - padding: 20px 10px; - margin-bottom: 20px; - display: block; +.editor-container .CodeMirror { + height: 100%!important; } -.fade-enter-active, .fade-leave-active { + +code { + background: #eef1f6; + padding: 20px 10px; + margin-bottom: 20px; + display: block; +} + +.fade-enter-active, +.fade-leave-active { transition: all .2s ease } -.fade-enter, .fade-leave-active { +.fade-enter, +.fade-leave-active { opacity: 0; } @@ -101,7 +111,6 @@ code{ // margin: 0 auto; // } //} - //main-container全局样式 .app-container { padding: 20px; @@ -139,7 +148,6 @@ code{ .el-upload { float: left; width: 100px; - } .el-upload-list { float: left; @@ -190,15 +198,18 @@ code{ } } -.link-type,.link-type:focus { +.link-type, +.link-type:focus { color: #337ab7; cursor: pointer; - &:hover{ + &:hover { color: rgb(32, 160, 255); } } -.publishedTag, .draftTag, .deletedTag { +.publishedTag, +.draftTag, +.deletedTag { color: #fff; background-color: $panGreen; line-height: 1; @@ -242,7 +253,7 @@ code{ .el-checkbox { margin: 0 20px 15px 0; } - .el-checkbox + .el-checkbox { + .el-checkbox+.el-checkbox { margin-left: 0px; } } @@ -272,8 +283,8 @@ code{ p { display: inline-block; } - .el-collapse-item__content{ - padding-right:0px; + .el-collapse-item__content { + padding-right: 0px; } } @@ -328,12 +339,14 @@ code{ margin-right: 8px; } } -.small-padding{ - .cell{ + +.small-padding { + .cell { padding-left: 8px; padding-right: 8px; } } + .status-col { .cell { padding: 0 10px; @@ -348,7 +361,10 @@ code{ // margin-left: 0px!important; //} .no-border { - .el-input-group__prepend, .el-input__inner, .el-date-editor__editor, .multiselect__tags { + .el-input-group__prepend, + .el-input__inner, + .el-date-editor__editor, + .multiselect__tags { border: none; } } @@ -384,7 +400,7 @@ code{ } //暂时性解决diolag 问题 https://github.com/ElemeFE/element/issues/2461 -.el-dialog{ +.el-dialog { transform: none; left: 0; position: relative; diff --git a/src/views/charts/keyboard.vue b/src/views/charts/keyboard.vue new file mode 100644 index 00000000..c5dd06e8 --- /dev/null +++ b/src/views/charts/keyboard.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/views/charts/keyboard2.vue b/src/views/charts/keyboard2.vue new file mode 100644 index 00000000..f459ac7b --- /dev/null +++ b/src/views/charts/keyboard2.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/views/charts/markdown.vue b/src/views/charts/markdown.vue new file mode 100644 index 00000000..3bf5e1ac --- /dev/null +++ b/src/views/charts/markdown.vue @@ -0,0 +1,22 @@ + + + + diff --git a/src/views/charts/tinymce.vue b/src/views/charts/tinymce.vue new file mode 100644 index 00000000..a88bd91c --- /dev/null +++ b/src/views/charts/tinymce.vue @@ -0,0 +1,28 @@ + + + + diff --git a/src/views/components/404.vue b/src/views/components/404.vue deleted file mode 100644 index d2b3ce3c..00000000 --- a/src/views/components/404.vue +++ /dev/null @@ -1,61 +0,0 @@ - - - - - diff --git a/src/views/components/dndlist.vue b/src/views/components/dndlist.vue new file mode 100644 index 00000000..bc84361d --- /dev/null +++ b/src/views/components/dndlist.vue @@ -0,0 +1,29 @@ + + + + diff --git a/src/views/components/jsoneditor.vue b/src/views/components/jsoneditor.vue new file mode 100644 index 00000000..ca8142a5 --- /dev/null +++ b/src/views/components/jsoneditor.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/src/views/dashboard/default/index.vue b/src/views/dashboard/default/index.vue index 745afa99..97b05fa6 100644 --- a/src/views/dashboard/default/index.vue +++ b/src/views/dashboard/default/index.vue @@ -19,13 +19,12 @@