| | |
| | | <div class="pam-background"> |
| | | <UiGoToTop></UiGoToTop> |
| | | <BackActionBar></BackActionBar> |
| | | <Nuxt class="page-container"></Nuxt> |
| | | <Nuxt class="page-container" :style="{ height: pageHieght}" ref="pageContainer"></Nuxt> |
| | | <Footer ref="defaultLayoutFooter"></Footer> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component } from 'vue-property-decorator'; |
| | | |
| | | @Component |
| | | export default class DefaultLayout extends Vue { |
| | | pageHieght = ''; |
| | | |
| | | mounted() { |
| | | window.addEventListener('resize', this.handleResize); |
| | | this.handleResize(); |
| | | } |
| | | |
| | | handleResize(): void { |
| | | const pageContainer: any = this.$refs.pageContainer; |
| | | const footer: any = this.$refs.defaultLayoutFooter; |
| | | const pageAlignPadding = 80; |
| | | const deviceExtraHeight = 36; |
| | | if ((pageContainer.$el.clientHeight + footer.$el.clientHeight) < window.innerHeight) { |
| | | this.pageHieght = (window.innerHeight - footer.$el.clientHeight - pageAlignPadding - deviceExtraHeight) + 'px'; |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .pam-background { |
| | | background-color: #F8F9FA; |