一、新建VUE页面(VUE动画效果页)
二、配置路由
三、主页增加链接
代码:
<template> <div> <div class="title" > <transition name="fade"> <p v-if="show">vue 动画</p> </transition> </div> <button v-on:click="change()">点击效果</button> </div> </template> <script> export default { name: 'Eoo', data () { return { show:false } }, methods:{ change:function(){ this.show = !this.show } } } </script> <style> .title{ height: 50px; width: 100px; line-height: 50px; border: 1px solid #EAEAEA; text-align: center; margin: 10px; } .fade-enter-active, .fade-leave-active { transition: opacity .5s; } .fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ { opacity: 0; } </style>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。