比较好的建立站点,wordpress博客头图怎么改,设计师灵感网站,女生适合前端还是后端1、背景 前端开发经常遇到输入路径不存在的问题#xff0c;为此#xff0c;把之前项目的404拿出来供大家参考。代码很简单#xff0c;适合新手入手#xff0c;效果如下#xff1a; 2、代码引用的是element-plus框架
templatedivel-result icon…1、背景 前端开发经常遇到输入路径不存在的问题为此把之前项目的404拿出来供大家参考。代码很简单适合新手入手效果如下 2、代码引用的是element-plus框架
templatedivel-result iconwarning title404提示 sub-title你找的页面不存在点击下方按钮回家~template #extrael-button typeprimary click$router.push(/)回到home页/el-button/template/el-result/div
/template
3、路由配置
import { createRouter, createWebHashHistory } from vue-routerimport Index from ~/pages/index.vue
import NOTFOUND from ~/pages/404.vueconst routes [{path: /,component: Index,
}, {path: /:pathMatch(.*)*,name: NOTFOUND,component: NOTFOUND
}]const router createRouter({history: createWebHashHistory(),routes
})export default router