| | |
| | | <script> |
| | | import ScrollPane from './ScrollPane' |
| | | import path from 'path' |
| | | import {mapState} from "vuex"; |
| | | |
| | | export default { |
| | | components: { ScrollPane }, |
| | |
| | | }, |
| | | theme() { |
| | | return this.$store.state.settings.theme; |
| | | } |
| | | }, |
| | | ...mapState({ |
| | | indexPage: state => state.permission.indexPage |
| | | }) |
| | | }, |
| | | watch: { |
| | | $route() { |
| | |
| | | }; |
| | | }, |
| | | isAffix(tag) { |
| | | return tag.meta && tag.meta.affix |
| | | if (tag.fullPath == this.indexPage) { |
| | | return true |
| | | } else { |
| | | return tag.meta && tag.meta.affix |
| | | } |
| | | }, |
| | | isFirstView() { |
| | | try { |
| | |
| | | // to reload home page |
| | | this.$router.replace({ path: '/redirect' + view.fullPath }) |
| | | } else { |
| | | this.$router.push('/') |
| | | this.$router.push(this.indexPage) |
| | | } |
| | | } |
| | | }, |