|
@@ -35,7 +35,8 @@ const errorMap: {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
- type: propTypes.string.validate((v: string) => ['404', '500', '403'].includes(v)).def('404')
|
|
|
|
|
|
|
+ type: propTypes.string.validate((v: string) => ['404', '500', '403'].includes(v)).def('404'),
|
|
|
|
|
+ showButton: propTypes.bool.def(true)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const emit = defineEmits(['errorClick'])
|
|
const emit = defineEmits(['errorClick'])
|
|
@@ -51,7 +52,9 @@ const btnClick = () => {
|
|
|
<img :src="errorMap[type].url" alt="" width="350" />
|
|
<img :src="errorMap[type].url" alt="" width="350" />
|
|
|
<div class="text-14px text-[var(--el-color-info)]">{{ errorMap[type].message }}</div>
|
|
<div class="text-14px text-[var(--el-color-info)]">{{ errorMap[type].message }}</div>
|
|
|
<div class="mt-20px">
|
|
<div class="mt-20px">
|
|
|
- <ElButton type="primary" @click="btnClick">{{ errorMap[type].buttonText }}</ElButton>
|
|
|
|
|
|
|
+ <ElButton type="primary" v-if="showButton" @click="btnClick">{{
|
|
|
|
|
+ errorMap[type].buttonText
|
|
|
|
|
+ }}</ElButton>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|