404.vue 565 Bytes
Newer Older
zhangsan's avatar
zhangsan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
<template>
  <div class="not-found">
    <h1>404</h1>
    <p>页面不存在</p>
    <van-button type="primary" @click="router.push('/')">返回首页</van-button>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()
</script>

<style lang="scss" scoped>
.not-found {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  
  h1 {
    font-size: 48px;
    margin-bottom: 16px;
  }
  
  p {
    margin-bottom: 24px;
    color: #666;
  }
}
</style>