Skip to content

Commit

Permalink
feat: container
Browse files Browse the repository at this point in the history
  • Loading branch information
FairyEver committed Apr 23, 2020
1 parent c1057da commit a93852b
Show file tree
Hide file tree
Showing 19 changed files with 65 additions and 62 deletions.
21 changes: 21 additions & 0 deletions src/components/container/com.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<style lang="scss">
.container {
background-color: #FFF;
margin: 30px auto;
padding: 20px;
max-width: 1000px;
border-radius: 2px;
}
</style>

<template>
<div class="container">
<slot/>
</div>
</template>

<script>
export default {
name: 'container'
}
</script>
15 changes: 0 additions & 15 deletions src/components/demo/com.vue

This file was deleted.

27 changes: 12 additions & 15 deletions src/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@
.layout-main {
height: 100%;
.layout-main--side {
width: 200px;
width: 260px;
background-color: #051428;
user-select: none;
cursor: pointer;
.overlay {
height: 100%;
}
.el-menu {
border-right: none;
.el-menu-item {
Expand All @@ -18,6 +15,12 @@
}
}
}
.layout-main--body {
background-color: #F0F2F5;
}
.overlay {
height: 100%;
}
}
</style>

Expand All @@ -37,15 +40,7 @@ export default {
const node =
<div class="layout-main" flex="dir:left">
<div class="layout-main--side" flex-box="0">
<overlay-scrollbars
class="overlay os-theme-light"
options={
{
scrollbars: {
autoHide: 'scroll'
}
}
}>
<overlay-scrollbars class="overlay os-theme-light" options={ { scrollbars: { autoHide: 'scroll' } } }>
<el-menu
default-active={ this.$route.path }
background-color="#051428"
Expand All @@ -56,8 +51,10 @@ export default {
</el-menu>
</overlay-scrollbars>
</div>
<div flex-box="1">
<router-view/>
<div class="layout-main--body" flex-box="1">
<overlay-scrollbars class="overlay" options={ { scrollbars: { autoHide: 'scroll' } } }>
<router-view/>
</overlay-scrollbars>
</div>
</div>
return node
Expand Down
4 changes: 2 additions & 2 deletions src/pages/demo1/1.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</route-meta>

<template>
<div>
<container>
{{ $route.name }}
</div>
</container>
</template>
4 changes: 2 additions & 2 deletions src/pages/demo1/2.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</route-meta>

<template>
<div>
<container>
{{ $route.name }}
</div>
</container>
</template>
4 changes: 2 additions & 2 deletions src/pages/demo1/3.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</route-meta>

<template>
<div>
<container>
{{ $route.name }}
</div>
</container>
</template>
4 changes: 2 additions & 2 deletions src/pages/demo1/4.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</route-meta>

<template>
<div>
<container>
{{ $route.name }}
</div>
</container>
</template>
4 changes: 2 additions & 2 deletions src/pages/demo1/5.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</route-meta>

<template>
<div>
<container>
{{ $route.name }}
</div>
</container>
</template>
4 changes: 2 additions & 2 deletions src/pages/demo2/1.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</route-meta>

<template>
<div>
<container>
{{ $route.name }}
</div>
</container>
</template>
4 changes: 2 additions & 2 deletions src/pages/demo2/2.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</route-meta>

<template>
<div>
<container>
{{ $route.name }}
</div>
</container>
</template>
4 changes: 2 additions & 2 deletions src/pages/demo2/3.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</route-meta>

<template>
<div>
<container>
{{ $route.name }}
</div>
</container>
</template>
4 changes: 2 additions & 2 deletions src/pages/demo2/4.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</route-meta>

<template>
<div>
<container>
{{ $route.name }}
</div>
</container>
</template>
4 changes: 2 additions & 2 deletions src/pages/demo2/5.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</route-meta>

<template>
<div>
<container>
{{ $route.name }}
</div>
</container>
</template>
4 changes: 2 additions & 2 deletions src/pages/demo3/1.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</route-meta>

<template>
<div>
<container>
{{ $route.name }}
</div>
</container>
</template>
4 changes: 2 additions & 2 deletions src/pages/demo3/2.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</route-meta>

<template>
<div>
<container>
{{ $route.name }}
</div>
</container>
</template>
4 changes: 2 additions & 2 deletions src/pages/demo3/3.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</route-meta>

<template>
<div>
<container>
{{ $route.name }}
</div>
</container>
</template>
4 changes: 2 additions & 2 deletions src/pages/demo3/4.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</route-meta>

<template>
<div>
<container>
{{ $route.name }}
</div>
</container>
</template>
4 changes: 2 additions & 2 deletions src/pages/demo3/5.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</route-meta>

<template>
<div>
<container>
{{ $route.name }}
</div>
</container>
</template>
4 changes: 2 additions & 2 deletions src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</route-meta>

<template>
<div>
<container>
home
</div>
</container>
</template>

0 comments on commit a93852b

Please sign in to comment.