Compare commits
No commits in common. "b64bd050bdf2c03f47dedd8b38cd949604115f2e" and "5a12988db3801e4fcd3578f00e585755d860fa4c" have entirely different histories.
b64bd050bd
...
5a12988db3
@ -3,7 +3,7 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "vue-cli-service serve",
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
|
@ -1,7 +1,5 @@
|
||||
<template>
|
||||
<div>这是bar
|
||||
<router-link to="/">到首页</router-link>
|
||||
</div>
|
||||
<div>这是bar</div>
|
||||
</template>
|
||||
<style scoped>
|
||||
|
||||
|
@ -1,20 +1,11 @@
|
||||
<template>
|
||||
<div>这是foo
|
||||
<router-link to="/bar">到bar</router-link>
|
||||
<button @click="getzhi">获取传值</button>
|
||||
</div>
|
||||
<div>这是foo</div>
|
||||
</template>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
<script>
|
||||
export default {
|
||||
methods:{
|
||||
getzhi(){
|
||||
// 如何获取url传值
|
||||
let zhi = this.$route.query
|
||||
console.log(zhi)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
@ -1,21 +1,3 @@
|
||||
<template>
|
||||
<div>
|
||||
这是首页
|
||||
<!-- 不能用a标签 -->
|
||||
<!-- <a href="/foo">到foo</a> -->
|
||||
<!-- <router-link to="/foo">到foo</router-link> -->
|
||||
<button @click="tiaozhuan">用js跳转</button>
|
||||
<router-link :to="{path:'/foo',query:{name:123,age:234,asda:1411}}">到foo</router-link>
|
||||
</div>
|
||||
<div>这是首页</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
methods:{
|
||||
tiaozhuan(){
|
||||
// js this.$router.push
|
||||
|
||||
this.$router.push({path:'/foo',query:{name:123,age:234,asda:1411}})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user