-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
michael
committed
Nov 5, 2019
1 parent
5bdbccb
commit 3e283af
Showing
5 changed files
with
82 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<template> | ||
<div> | ||
<input @click="testclick" type="button" class="btn btn-primary" value="toggle" /> | ||
<transition> | ||
<leftsidemenu v-if="status"></leftsidemenu> | ||
</transition> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import Velocity from 'velocity-animate' | ||
import leftsidemenu from "@/components/leftsidemenu.vue"; | ||
// 這裡用 velocity-animated 去實現。 | ||
export default { | ||
components: { | ||
leftsidemenu | ||
}, | ||
data() { | ||
return { | ||
status: false | ||
}; | ||
}, | ||
methods: { | ||
// 這裡了解一下 velocity 去處理 transition hook | ||
testclick() { | ||
const vm = this; | ||
vm.status = !vm.status; | ||
}, | ||
beforeEnter(){ | ||
}, | ||
} | ||
}; | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<template> | ||
<div class="left-fix"> | ||
<ul class="ul-dec"> | ||
<li>item1</li> | ||
<li>item2</li> | ||
<li>item3</li> | ||
<li>item4</li> | ||
<li>item5</li> | ||
</ul> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default {}; | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
.left-fix { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
bottom: 0; | ||
background-color: #91c3b3; | ||
border-style: solid; | ||
border-width: 0; | ||
border-radius: 1rem; | ||
width: 15rem; | ||
padding: 1.5rem; | ||
} | ||
.ul-dec li { | ||
list-style: none; | ||
padding:.25rem; | ||
} | ||
</style> |