vue跳转页面
1:this.$router.push()
功能快捷键
<template>
<div id='test'>
<button @click='goTo()'>点击跳转4</button>
</div>
</template>
<script>
export default{
name:'test',
methods:{
goTo(){
//直接跳转
this.$router.push('/testDemo');
//带参数跳转
this.$router.push({path:'/testDemo',query:{setid:123456}});
this.$router.push({name:'testDemo',params:{setid:111222}});
}
}
}
</script>
版权声明:本文为weixin_44871210原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。