This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
cyber-narrator-cn-ui/src/components/layout/Container.vue

31 lines
687 B
Vue
Raw Normal View History

2021-06-07 18:35:16 +08:00
<template>
<div class="cn-container" :style="entityDetectionStyle" id="cnContainer">
<router-view :key="routerKey"/>
2021-06-07 18:35:16 +08:00
</div>
</template>
<script>
import { listScrollPath } from '@/utils/constants'
2021-06-07 18:35:16 +08:00
export default {
name: 'Container',
data () {
return {
}
},
computed: {
routerKey () {
return this.$route.name !== undefined ? this.$route.name + +new Date() : this.$route + +new Date()
},
entityDetectionStyle () {
const route = this.$route.name !== undefined ? this.$route.name : this.$route
if (listScrollPath.indexOf(route.path) > -1) {
return 'overflow:auto;'
} else {
return ''
}
}
2021-06-07 18:35:16 +08:00
}
}
</script>