两种路由模式
- hash:路径带#
- history:不带#
export default new VueRouter({
mode: 'history',
routes:[
]
});
404
<template>
<div>
<h1>404,页面不存在</h1>
</div>
</template>
<script>
export default {
name: "NotFound"
}
</script>
<style scoped>
</style>
导入组件
import NotFound from '../views/NotFound'
路由
{