最基础的跳转

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

View File

@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"start": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},

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>