js 跳转传值
This commit is contained in:
parent
40784994d1
commit
b64bd050bd
@ -4,14 +4,18 @@
|
|||||||
<!-- 不能用a标签 -->
|
<!-- 不能用a标签 -->
|
||||||
<!-- <a href="/foo">到foo</a> -->
|
<!-- <a href="/foo">到foo</a> -->
|
||||||
<!-- <router-link to="/foo">到foo</router-link> -->
|
<!-- <router-link to="/foo">到foo</router-link> -->
|
||||||
<button>用js跳转</button>
|
<button @click="tiaozhuan">用js跳转</button>
|
||||||
<router-link :to="{path:'/foo',query:{name:123,age:234,asda:1411}}">到foo</router-link>
|
<router-link :to="{path:'/foo',query:{name:123,age:234,asda:1411}}">到foo</router-link>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
methods:{
|
methods:{
|
||||||
|
tiaozhuan(){
|
||||||
|
// js this.$router.push
|
||||||
|
|
||||||
|
this.$router.push({path:'/foo',query:{name:123,age:234,asda:1411}})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
Loading…
x
Reference in New Issue
Block a user