You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.3 KiB

6 years ago
<template>
<main class="app-main">
<div v-show="!showIframe" class="scroll-container">
6 years ago
<page-view :include="cachedViews" :transition-name="transitionName"/>
<page-footer/>
</div>
6 years ago
<!--跨域iframe无法调整高度只能使用原生滚动条-->
<iframe
6 years ago
v-for="src in iframeList"
v-show="showIframe && src === currentIframe"
:id="src"
:key="src"
:src="src"
frameborder="0"
height="100%"
width="100%"
6 years ago
/>
6 years ago
<back-to-top :render="showBackToTop"/>
6 years ago
</main>
</template>
<script>
6 years ago
import {mapState} from 'vuex'
6 years ago
import BackToTop from "./component/BackToTop"
import PageView from "./component/PageView"
import PageFooter from "./component/PageFooter"
6 years ago
6 years ago
export default {
name: 'AppMain',
6 years ago
components: {BackToTop, PageView, PageFooter},
6 years ago
computed: {
...mapState('setting', ['showBackToTop']),
6 years ago
...mapState('tagsView', ['cachedViews', 'transitionName']),
6 years ago
...mapState('iframe', {
showIframe: state => state.show,
currentIframe: state => state.current,
iframeList: state => state.list
})
6 years ago
}
6 years ago
}
6 years ago
</script>
<style lang="scss" src="./style.scss"></style>