index.vue 896 B

12345678910111213141516171819202122232425262728
  1. <template>
  2. <div :style="bgColor" class="flex flex-col w-full">
  3. <img :src="notFound" class="w-full sm:w-3/5 m-auto" />
  4. <div class="mr-auto w-full bottom-0 m-auto">
  5. <div class="w-full text-center text-base text-gray-400">抱歉,您访问的页面不存在</div>
  6. <div @click="push('/')" class="text-center w-full mt-2">
  7. <el-button type="primary">回到首页</el-button>
  8. </div>
  9. </div>
  10. </div>
  11. </template>
  12. <script setup lang="ts">
  13. import { useRouter } from 'vue-router'
  14. import { useAppStore } from '/admin/stores/modules/app'
  15. import { computed } from 'vue'
  16. import notFound from '/admin/assets/404.png'
  17. const { push } = useRouter()
  18. const dark: string = '#161d31;'
  19. const light: string = 'rgb(241,245,249);'
  20. const appStore = useAppStore()
  21. const bgColor = computed(() => {
  22. return 'background-color:' + (appStore.getIsDarkMode ? dark : light)
  23. })
  24. </script>