tj
2025-06-05 bba272999cc546f65781bf3d20245a3f819af67f
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
34
35
36
37
38
39
40
41
42
<template>
  <div class="container" ref="container">
    <img class="page-404" src="../../assets/image/error-page/404.png" alt="" />
    <!-- <img class="page-logo" src="../../assets/image/error-page/logo.png" alt="" /> -->
  </div>
</template>
 
<script type="text/ecmascript-6">
import { getCurrentInstance, onMounted } from 'vue'
 
export default {
  setup() {
    onMounted(() => {
      const headerHeight = 72
      const { clientHeight } = document.body
 
      const ctx = getCurrentInstance()
      ctx.refs.container.style.height = `${clientHeight - headerHeight}px`
    })
  }
}
</script>
 
<style scoped lang="scss">
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  .page-404 {
    width: 349px;
    height: 190px;
  }
  .page-logo {
    position: absolute;
    right: 40px;
    bottom: 40px;
    width: 60px;
    height: 98px;
  }
}
</style>