feat: add function of async router and async menu; 🌟
新增:异步路由和菜单功能;
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<h1>{{config[type].title}}</h1>
|
||||
<div class="desc">{{config[type].desc}}</div>
|
||||
<div class="action">
|
||||
<a-button type="primary" >返回首页</a-button>
|
||||
<a-button type="primary" @click="backHome">返回首页</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -18,11 +18,19 @@ import Config from './typeConfig'
|
||||
|
||||
export default {
|
||||
name: 'ExceptionPage',
|
||||
props: ['type'],
|
||||
props: ['type', 'homeRoute'],
|
||||
data () {
|
||||
return {
|
||||
config: Config
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
backHome() {
|
||||
if (this.homeRoute) {
|
||||
this.$router.push(this.homeRoute)
|
||||
}
|
||||
this.$emit('backHome', this.type)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user