2020
10-10
10-10
vue中实现弹出层动画效果的示例代码
1<template><divclass="home"><!--首先将要过渡的元素用transition包裹,并设置过渡的name--><transitionname="mybox"><divclass="box"v-show="boxshow"></div></transition><button@click="togglebox">按钮</button></div></template>2data(){return{boxshow:false,};},3methods:{togglebox:function(){this.boxshow=!this.boxshow;},},样式:<stylelang="scss"scoped>.box{...
继续阅读 >