我的搜索页在点击搜索框进入时没有动画效果,但是返回时有动画效果,如何解决
<template> <transition name="search"> <div class="search"> <header class="g-header-container"> <search-header/> </header> <div class="g-content-container"> <me-scroll> <search-hot></search-hot> </me-scroll> </div> </div> </transition> </template> <script> import MeScroll from 'base/scroll'; // import MeConfirm from 'base/confirm'; import SearchHeader from './header'; import SearchHot from './hot'; // import SearchHistory from './history'; // import SearchResult from './result'; export default { name: 'Search', components: { MeScroll, // MeConfirm, SearchHeader, SearchHot // SearchHistory, // SearchResult } }; </script> <style lang="scss" scoped> @import "~assets/scss/mixins"; .search { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: $search-z-index; background-color: $bgc-theme; } .search-enter-active, .search-leave-active { transition: all 0.3s; } .search-enter, .search-leave-to { transform: translate3d(100%, 0, 0); } </style>
17
收起
正在回答 回答被采纳积分+1
3回答
4.Vue与React高级框架开发
- 参与学习 人
- 提交作业 239 份
- 解答问题 10739 个
本阶段带你深入前端开发的肌理,通过ES6基础知识和前端主流高级框架的学习,助你快速构建企业级移动webAPP应用,进入职场的终极battle
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星