<template>
  <div class="errorPage">
    <div class="error">
      <div>您访问的页面不存在!</div>
      <ElButton type="primary" @click="handleGoHome">返回首页</ElButton>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from "vue-router"
import { ElButton } from "element-plus"
const router = useRouter()

function handleGoHome() {
  router.push({
    path: "/"
  })
}
</script>

<style lang="scss" scoped>
.errorPage {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  .error {
    width: 600px;
    height: 160px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    & > div:first-child {
      font-size: 16px;
      color: #ccc;
      margin-bottom: 10px;
    }
  }
}
</style>
