404.vue 776 B

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. <div class="error-page">
  3. <div class="img" :style="`background-image: url(${svg404});`" />
  4. <div class="content">
  5. <h1>404</h1>
  6. <div class="desc">
  7. 抱歉,你访问的页面不存在
  8. </div>
  9. <div class="actions">
  10. <el-button type="primary" block @click="goToHome">
  11. 返回首页
  12. </el-button>
  13. </div>
  14. </div>
  15. </div>
  16. </template>
  17. <script setup>
  18. import router from '~src/router/index'
  19. import svg404 from '~src/assets/view/404.svg'
  20. defineOptions({
  21. name: '404',
  22. })
  23. const goToHome = () => {
  24. router.push({ path: '/' })
  25. }
  26. </script>
  27. <style lang="scss" scoped>
  28. @import "../../styles/error/style.scss";
  29. </style>