index-view-layout-left.vue 1.8 KB
<template>
    <layout class="index-view-layout index-view-layout--left" id="movebox">
        <sider class="index-view-sider" :width="collapseChange ? 64 : 200" hide-trigger id="left_move">
            <div class="index-view-sider__top">
                <slot name="siderTop" />
            </div>
            <slot name="siderContent" />
        </sider>
        <div v-show="!collapseChange" class="index-view-split" id="move_axis"></div>
        <layout id="right_move">
            <header class="index-view-header">
                <div class="index-view-header__left">
                    <slot name="headerLeft" />
                </div>
                <div class="index-view-header__center">
                    <slot name="headerCenter" />
                </div>
                <div class="index-view-header__right">
                    <slot name="headerRight" />
                </div>   
            </header>
            <content :class="{ 'index-view-content': true, 'index-view-content--tab': Object.is(navModel,'tab') ? true : false, 'index-view-content--route': Object.is(navModel,'route') ? true : false }">
                <slot name="tabPageExp" />
                <slot name="navPos" />
            </content>
        </layout>
    </layout>
</template>
<script lang="ts">
import { Vue, Component, Prop } from 'vue-property-decorator';

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

    /**
     * 导航模式
     * 
     * @memberof AppIndexViewLayoutLeft
     */
    @Prop({ default: 'tab' })
    public navModel!: string;

    /**
     * 是否折叠
     * 
     * @memberof AppIndexViewLayoutLeft
     */
    @Prop({ default: false })
    public collapseChange!: boolean;
}
</script>

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