1 Star 0 Fork 0

Hooper/douban-nuxt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
error.vue 1.31 KB
一键复制 编辑 原始数据 按行查看 历史
hoap 提交于 2025-04-12 04:32 +08:00 . ai生成的v1
<template>
<div class="min-h-screen flex items-center justify-center">
<div class="text-center px-4 py-10">
<div class="flex justify-center mb-6">
<div class="bg-red-100 text-red-600 p-4 rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" class="h-16 w-16" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
</svg>
</div>
</div>
<h1 class="text-4xl font-bold text-gray-900 mb-4">{{ error.statusCode }}</h1>
<p class="text-xl text-gray-600 mb-8">{{ error.message || '发生了错误,请稍后再试' }}</p>
<div class="flex justify-center space-x-4">
<button @click="clearError" class="px-4 py-2 bg-primary-600 text-white rounded-md hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2">
返回首页
</button>
</div>
</div>
</div>
</template>
<script setup>
defineProps({
error: {
type: Object,
required: true
}
});
// 清除错误并返回首页
const clearError = () => {
clearNuxtError();
navigateTo('/');
};
</script>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hobk/douban-nuxt.git
git@gitee.com:hobk/douban-nuxt.git
hobk
douban-nuxt
douban-nuxt
master

搜索帮助