index-view-layout-left.vue 1.8 KB
Newer Older
zhangpingchuan's avatar
zhangpingchuan committed
1
<template>
2
    <layout class="index-view-layout index-view-layout--left" id="movebox">
Shine-zwj's avatar
Shine-zwj committed
3 4
        <sider class="index-view-sider" :width="collapseChange ? 64 : 200" hide-trigger id="left_move">
            <div class="index-view-sider__top">
zhangpingchuan's avatar
zhangpingchuan committed
5 6 7 8
                <slot name="siderTop" />
            </div>
            <slot name="siderContent" />
        </sider>
Shine-zwj's avatar
Shine-zwj committed
9
        <div v-show="!collapseChange" class="index-view-split" id="move_axis"></div>
zhangpingchuan's avatar
zhangpingchuan committed
10
        <layout id="right_move">
Shine-zwj's avatar
Shine-zwj committed
11 12
            <header class="index-view-header">
                <div class="index-view-header__left">
zhangpingchuan's avatar
zhangpingchuan committed
13 14
                    <slot name="headerLeft" />
                </div>
Shine-zwj's avatar
Shine-zwj committed
15
                <div class="index-view-header__center">
zhangpingchuan's avatar
zhangpingchuan committed
16 17
                    <slot name="headerCenter" />
                </div>
Shine-zwj's avatar
Shine-zwj committed
18
                <div class="index-view-header__right">
zhangpingchuan's avatar
zhangpingchuan committed
19 20 21
                    <slot name="headerRight" />
                </div>   
            </header>
Shine-zwj's avatar
Shine-zwj committed
22
            <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 }">
zhangpingchuan's avatar
zhangpingchuan committed
23 24 25 26 27 28 29
                <slot name="tabPageExp" />
                <slot name="navPos" />
            </content>
        </layout>
    </layout>
</template>
<script lang="ts">
Shine-zwj's avatar
Shine-zwj committed
30
import { Vue, Component, Prop } from 'vue-property-decorator';
zhangpingchuan's avatar
zhangpingchuan committed
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55

@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>