Compare commits
No commits in common. "b64bd050bdf2c03f47dedd8b38cd949604115f2e" and "5a12988db3801e4fcd3578f00e585755d860fa4c" have entirely different histories.
b64bd050bd
...
5a12988db3
@ -3,7 +3,7 @@
|
|||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
"build": "vue-cli-service build",
|
"build": "vue-cli-service build",
|
||||||
"lint": "vue-cli-service lint"
|
"lint": "vue-cli-service lint"
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>这是bar
|
<div>这是bar</div>
|
||||||
<router-link to="/">到首页</router-link>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
|
@ -1,20 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>这是foo
|
<div>这是foo</div>
|
||||||
<router-link to="/bar">到bar</router-link>
|
|
||||||
<button @click="getzhi">获取传值</button>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
methods:{
|
|
||||||
getzhi(){
|
|
||||||
// 如何获取url传值
|
|
||||||
let zhi = this.$route.query
|
|
||||||
console.log(zhi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
@ -1,21 +1,3 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>这是首页</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>
|
|
||||||
</template>
|
</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