UNPKG

quasar-framework

Version:

Build responsive SPA, SSR, PWA, Hybrid Mobile Apps and Electron apps, all simultaneously using the same codebase

40 lines (37 loc) 940 B
export default { name: 'QPageContainer', inject: { layout: { default () { console.error('QPageContainer needs to be child of QLayout') } } }, provide: { pageContainer: true }, computed: { style () { const css = {} if (this.layout.header.space) { css.paddingTop = `${this.layout.header.size}px` } if (this.layout.right.space) { css[`padding${this.$q.i18n.rtl ? 'Left' : 'Right'}`] = `${this.layout.right.size}px` } if (this.layout.footer.space) { css.paddingBottom = `${this.layout.footer.size}px` } if (this.layout.left.space) { css[`padding${this.$q.i18n.rtl ? 'Right' : 'Left'}`] = `${this.layout.left.size}px` } return css } }, render (h) { return h('div', { staticClass: 'q-layout-page-container q-layout-transition', style: this.style }, this.$slots.default) } }