mirror of
https://github.com/iczer/vue-antd-admin
synced 2025-04-06 04:00:06 +08:00
refactor: drawer component
This commit is contained in:
parent
e3c5f57366
commit
7b7e878c24
@ -10,7 +10,18 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'Drawer',
|
name: 'Drawer',
|
||||||
props: ['openDrawer'],
|
props: {
|
||||||
|
openDrawer: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
placement: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: 'left'
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open () {
|
open () {
|
||||||
this.$emit('change', true)
|
this.$emit('change', true)
|
||||||
@ -39,15 +50,14 @@ export default {
|
|||||||
}
|
}
|
||||||
.drawer{
|
.drawer{
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 256px;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
transition: all 0.5s;
|
transition: all 0.5s;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
&.open{
|
&.open{
|
||||||
left: 0px;
|
left: 0;
|
||||||
}
|
}
|
||||||
&.close{
|
&.close{
|
||||||
left: -262px;
|
left: -100%;
|
||||||
}
|
}
|
||||||
.sider{
|
.sider{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user