代码拉取完成,页面将自动刷新
<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>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。