持续集成分支
This commit is contained in:
40
src/components/mainContent.vue
Normal file
40
src/components/mainContent.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<section class="mainContent">
|
||||
<ai-nav-tab :fixed="homePage" :routes="routes"/>
|
||||
<router-view v-if="refresh"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "mainContent",
|
||||
computed: {
|
||||
...mapState(['user', 'homePage']),
|
||||
routes: v => v.user.info?.menuSet?.map(e => ({...e, label: e.name, name: e.id}))
|
||||
},
|
||||
watch: {
|
||||
$route(v, old) {
|
||||
if (v.meta == old.meta && v.fullPath != old.fullPath) {
|
||||
this.refresh = false
|
||||
this.$nextTick(() => this.refresh = true)
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
refresh: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.mainContent {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user