Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

错误页面优化以及修复一个小问题 #1155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ export default {
/**
* @description 需要加载的插件
*/
/**
* @description 错误页面停留时长,秒单位
*/
error_page_stay_time: 5,

plugin: {
'error-store': {
showInHeader: true, // 设为false后不会在顶部显示错误日志徽标
Expand Down
8 changes: 6 additions & 2 deletions src/view/error-page/back-btn-group.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default {
name: 'backBtnGroup',
data () {
return {
second: 5,
second: this.$config.error_page_stay_time,
timer: null
}
},
Expand All @@ -22,7 +22,11 @@ export default {
})
},
backPrev () {
this.$router.go(-1)
window.history.length > 1
? this.$router.go(-1)
: this.$router.replace({
name: this.$config.homeName
})
}
},
mounted () {
Expand Down