Files
aurora-admin/site/sources/exceptionvariants/vue2.txt
T
aurora-admin c65a69c34e
Deploy to GitHub Pages / deploy (push) Failing after 16s
Regression / regression (push) Failing after 15m2s
feat(P4): precompute移植+app.js sources双向回填+回归1003/1003+验收体积/文件/data.json
2026-09-12 14:18:41 +08:00

41 lines
1.5 KiB
Plaintext

<template>
<div class="aa-exception">
<div class="aa-exception-emoji">{{ resolved.emoji }}</div>
<div class="aa-exception-title">{{ resolved.title }}</div>
<div class="aa-exception-desc" v-if="resolved.desc">{{ resolved.desc }}</div>
<div class="aa-exception-actions">
<button class="aa-exception-btn primary" @click="$emit('home')">返回首页</button>
<button class="aa-exception-btn" @click="$emit('retry')">重试</button>
</div>
</div>
</template>
<script>
export default {
name: 'AaExceptionVariants',
props: {
type: { type: String, default: '404' },
emoji: { type: String, default: '' },
title: { type: String, default: '' },
desc: { type: String, default: '' }
},
computed: {
resolved: function () {
var p = {
'403': { emoji: '🔒', title: '403 禁止访问', desc: '抱歉,你没有权限访问此页面。' },
'404': { emoji: '🔍', title: '404 页面不存在', desc: '你访问的页面已被移除或从未存在。' },
'500': { emoji: '⚙️', title: '500 服务器错误', desc: '服务器开小差了,请稍后再试。' },
'502': { emoji: '🔌', title: '502 网关错误', desc: '网关无响应,请检查网络后重试。' }
}[this.type] || {};
return {
emoji: this.emoji || p.emoji || '⚠️',
title: this.title || p.title || '出错了',
desc: this.desc || p.desc || ''
};
}
}
};
</script>
<style src="./ExceptionVariants.css"></style>