Skip to content

Commit

Permalink
固定app-main区域大小
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Oct 7, 2018
1 parent e98a2be commit 3c631fa
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
5 changes: 3 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ export default {
<style>
.app-container{
height:100%;
padding:15px;
}
.el-table{
height:100%;
height:calc(100% - 100px)!important;
overflow: auto;
}
</style>
2 changes: 1 addition & 1 deletion src/components/GithubCorner/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<a href="https://github.com/BoBoooooo" target="_blank" class="github-corner" aria-label="Follow me on Github" title="Follow me on Github">
<svg width="80" height="80" viewBox="0 0 250 250" style="fill:#40c9c6; color:#fff; position: absolute; top: 84px; border: 0; right: 0;"
<svg width="80" height="80" viewBox="0 0 250 250" style="fill:#40c9c6; color:#fff; position: absolute; top: 0; border: 0; right: 0;"
aria-hidden="true">
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
Expand Down
11 changes: 10 additions & 1 deletion src/styles/sidebar.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
#app {
// 主体区域
.main-container {
min-height: 100%;
height: 100%;
transition: margin-left .28s;
margin-left: 180px;
position: relative;
}


.content-container{
position:absolute;
top:84px;
bottom:0px;
left:0px;
right:0px;
}
// 侧边栏
.sidebar-container {
transition: width 0.28s;
Expand Down
4 changes: 2 additions & 2 deletions src/views/layout/components/AppMain.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export default {
<style scoped>
.app-main {
/*84 = navbar + tags-view = 50 +34 */
min-height: calc(100vh - 84px);
width: 100%;
position: relative;
overflow: hidden;
overflow: auto;
}
</style>

9 changes: 2 additions & 7 deletions src/views/system/menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<el-button @click="New()" type="primary" size="small" style="margin:10px 0px">新增</el-button>


<el-table :height="windowheight" :data="list" v-loading.body="listLoading" element-loading-text="拼命加载中" border fit highlight-current-row>
<el-table :data="list" v-loading.body="listLoading" element-loading-text="拼命加载中" border fit highlight-current-row>
<el-table-column align="center" label='ID' width="95">
<template slot-scope="scope">
{{scope.row.id}}
Expand Down Expand Up @@ -128,12 +128,7 @@
},
mounted(){
this.$nextTick(()=>{
this.windowheight =400
console.log(this.$refs.container.$el)
})
},
methods: {
fetchData() {
Expand Down

0 comments on commit 3c631fa

Please sign in to comment.