账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    vue-router 跳转页面问题,请看详细描述
    59
    0

    vue-router,A页面跳转B页面。没有完全跳转,是把B页面内容追加到了A页面上,这是什么原因呢?

    A页面

    <template>
        <div class="profile_page">
            <header-top />
    
            <section>        
    
                <section class="profile-button-group">
                    <van-row gutter="10">
                        <van-col span="10" offset="1">
                            <router-link :to="{path: '/profile/recharge'}">
                                <van-button size="large" >跳转B页面</van-button>
                            </router-link>
                        </van-col>
                        
                    </van-row>
                </section>
            </section>
            <footer-guide />
    
            <transition name="router-slid" mode="out-in">
                <router-view></router-view>
            </transition>
        </div>
    </template>
    
    
    <script type="text/babel">
        export default {
            data(){
                return {
    
                }
            }
        }
    </script>
    

    B页面

    <template>
        <div class="recharge_page">
    
            <section>
    
                <section >
                    PAGE B
                </section>
    
    
            </section>
    
        </div>
    
    </template>
    
    
    <script type="text/babel">
    
        export default {
            data(){
                return {
    
                }
            },
            created(){
                console.log('page B created');
            }
        }
    </script>
    
    <style>
    
    </style>

    为什么页面没有完全跳转到 B.vue? 而是把B.vue的html追加到了A.vue呢?

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部