Vue webAPP首页开发(五)
接上篇 https://www.cnblogs.com/chenyingying0/p/12635369.html 返回顶部组件 base/backtop/index.vue <template> <transition name="mine-backtop"> <a href="javascript:;" class="mine-backtop" v-show="visible" @click="backToTop"> <i class="iconfont icon-backtop"></i> </a> </transition> </template> <script> export default { name:"MeBacktop", props:{ visible:{ type:Boolean, default:false } }, methods:{ backToTop(){ this.$emit("backtop");//基础组件,与业务无关,具体实现去页面里 } } } </script> <style lang="scss" scoped> @import '~assets/scss/mixins'; .mine-backtop{ overflow:hidden; @include flex-center(); width:45px; height:45px;