最基础的跳转

This commit is contained in:
2021-07-06 16:36:32 +08:00
parent 5a12988db3
commit 727a943474
4 changed files with 13 additions and 4 deletions

View File

@@ -1,5 +1,7 @@
<template>
<div>这是bar</div>
<div>这是bar
<router-link to="/">到首页</router-link>
</div>
</template>
<style scoped>

View File

@@ -1,5 +1,7 @@
<template>
<div>这是foo</div>
<div>这是foo
<router-link to="/bar">到bar</router-link>
</div>
</template>
<style scoped>

View File

@@ -1,3 +1,8 @@
<template>
<div>这是首页</div>
<div>
这是首页
<!-- 不能用a标签 -->
<!-- <a href="/foo">到foo</a> -->
<router-link to="/foo">到foo</router-link>
</div>
</template>