diff --git a/src/components/common/Header.vue b/src/components/common/Header.vue index ff4f289..0fc04e0 100644 --- a/src/components/common/Header.vue +++ b/src/components/common/Header.vue @@ -1,5 +1,8 @@ + + + diff --git a/src/components/common/Sidebar.vue b/src/components/common/Sidebar.vue index 33df6cb..7b1ad87 100644 --- a/src/components/common/Sidebar.vue +++ b/src/components/common/Sidebar.vue @@ -1,12 +1,12 @@ @@ -101,16 +108,14 @@ .sidebar{ display: block; position: absolute; - width: 250px; left: 0; top: 70px; bottom:0; - background: #2E363F; + } + .sidebar-el-menu:not(.el-menu--collapse){ + width: 250px; } .sidebar > ul { height:100%; } - .sidebar i{ - margin-top: -4px; - } diff --git a/src/components/common/bus.js b/src/components/common/bus.js new file mode 100644 index 0000000..66c337b --- /dev/null +++ b/src/components/common/bus.js @@ -0,0 +1,6 @@ +import Vue from 'vue'; + +// 使用 Event Bus +const bus = new Vue(); + +export default bus; \ No newline at end of file diff --git a/static/css/main.css b/static/css/main.css index 1065cb7..b01f4a0 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -19,6 +19,11 @@ a{text-decoration: none} padding:40px; box-sizing: border-box; overflow-y: scroll; + -webkit-transition: left .3s ease-in-out; + transition: left .3s ease-in-out; +} +.content-collapse{ + left: 65px; } .container{ padding: 30px;