<template>
  <div class="page-container">
    <div class="center-box">
      <div class="text-center">
        <img src="~@/assets/images/exception/404.png" alt="" />
        <div class="sub-wrap">
          <h2 class="text-base text-gray-500">404</h2>
          <p>抱歉，你访问的页面不存在</p>
          <n-button class="subBtn" type="info" @click="goHome">回到首页</n-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { useRoute, useRouter } from 'vue-router'
import { useTabsViewStore } from '@/store/modules/tabsView'
const tabsViewStore = useTabsViewStore()
const router = useRouter()
const route = useRoute()
function goHome() {
  tabsViewStore.closeCurrentTab(route)
  router.push('/')
}
</script>

<style lang="less" scoped>
.page-container {
  // width: 100%;
  border-radius: 4px;
  padding: 50px 0;
  height: 100vh;
  background: #f0f2f5;
  .center-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    .text-center {
      display: flex;
      flex-direction: row;
      align-items: flex-end;

      h2 {
        color: #666;
        padding: 20px 0;
        font-weight: 600;
        color: #434e59;
        line-height: 108px;
        font-size: 77px;
      }
      p {
        height: 23px;
        font-size: 17px;
        font-weight: 400;
        color: rgba(0, 0, 0, 0.45);
        line-height: 23px;
        margin-bottom: 13px;
      }
      .subBtn {
        margin-bottom: 44px;
      }
    }
  }

  img {
    width: 585px;
  }
}
</style>
