|
|
@@ -1,13 +1,13 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
+ <div class="flex justify-center pt-30">
|
|
|
<h1 v-if="error.statusCode === 404">
|
|
|
{{ pageNotFound }}
|
|
|
</h1>
|
|
|
<div v-else>
|
|
|
- <h1>
|
|
|
+ <h1 class="text-center">
|
|
|
{{ otherError }}
|
|
|
</h1>
|
|
|
- <van-button type="primary" @click="refreshPage">主要按钮</van-button>
|
|
|
+ <v-btn type="submit" @click="refreshPage">重新加载页面</v-btn>
|
|
|
</div>
|
|
|
<!-- <NuxtLink to="/"> Home page </NuxtLink> -->
|
|
|
</div>
|
|
|
@@ -26,11 +26,11 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
pageNotFound: '404 Not Found',
|
|
|
- otherError: 'An error occurred',
|
|
|
+ otherError: '出现错误',
|
|
|
};
|
|
|
},
|
|
|
head() {
|
|
|
- console.log('tempErr',this.error)
|
|
|
+ console.log('tempErr',JSON.stringify(this.error))
|
|
|
const title =
|
|
|
this.error.statusCode === 404 ? this.pageNotFound : this.otherError;
|
|
|
return {
|