提交 1d0c89fe 编写于 作者: D dolymood

update(example): add cube-view

上级 839c1a85
...@@ -12,14 +12,14 @@ ...@@ -12,14 +12,14 @@
</li> </li>
</ul> </ul>
</section> </section>
<transition name="move"> <cube-view></cube-view>
<router-view class="cube-view"></router-view>
</transition>
</div> </div>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import BScroll from 'better-scroll' import BScroll from 'better-scroll'
import CubeView from './components/cube-view.vue'
export default { export default {
data() { data() {
return { return {
...@@ -90,6 +90,9 @@ ...@@ -90,6 +90,9 @@
click: true click: true
}) })
}) })
},
components: {
CubeView
} }
} }
</script> </script>
...@@ -137,11 +140,4 @@ ...@@ -137,11 +140,4 @@
right: 0 right: 0
padding: 0 5px padding: 0 5px
color: #ccc color: #ccc
.cube-view
transition: all 0.3s
transform: translate3d(0, 0, 0)
&.move-enter-active, &.move-leave-active
transform: translate3d(100%, 0, 0)
</style> </style>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
.cube-page .cube-page
position: fixed position: fixed
z-index: 20 z-index: 10
top: 0 top: 0
left: 0 left: 0
width: 100% width: 100%
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
box-shadow: 0 1px 6px #ccc box-shadow: 0 1px 6px #ccc
-webkit-backface-visibility: hidden -webkit-backface-visibility: hidden
backface-visibility: hidden backface-visibility: hidden
z-index: 99 z-index: 5
h1 h1
font-size: 16px font-size: 16px
font-weight: 700 font-weight: 700
......
<template>
<transition name="page-move">
<router-view class="cube-view"></router-view>
</transition>
</template>
<script type="text/ecmascript-6">
export default {}
</script>
<style lang="stylus" rel="stylesheet/stylus">
.cube-view
transform: translate3d(0, 0, 0)
.page-move-enter, .page-move-leave-active
transform: translate3d(100%, 0, 0)
.page-move-enter-active, .page-move-leave-active
transition: transform .3s
</style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册