<template>
    <layout :class="layoutClassName">
        <header class="view-header">
            <div class="view-header__top">
                <slot name="headerTop" />
            </div>
            <div class="view-header__content">
                <slot name="headerContent" />
            </div>
            <div class="view-header__bottom">
                <slot name="headerBottom" />
            </div>   
        </header>
        <content class="view-content content-container">
            <slot />
        </content>
        <footer  class="view-footer">
            <slot name="footer" />
        </footer>
    </layout>
</template>
<script lang="ts">
import { Vue, Component, Watch, Prop } from 'vue-property-decorator';

@Component({})
export default class AppGridViewLayout extends Vue {

    /**
     * 视图默认使用
     *
     * @type {boolean}
     * @memberof AppGridViewLayout
     */
    @Prop({ default: true }) public viewDefaultUsage?: boolean;

    /**
     * 布局类名
     *
     * @memberof AppGridViewLayout
     */
    get layoutClassName(){
      return {'grid-view-layout':true, 
        'view-layout': true, 
        'view-default-usage': this.viewDefaultUsage ? true :false}
    }

}
</script>

<style lang="scss">
@import "./grid-view-layout.scss";
</style>
