<template>
    <div class="container">
        <v-header :title="'我的资源'" :is-show-prev-page="false"></v-header>
        <nav-menu :menus="menus"></nav-menu>
        <keep-alive>
            <router-view></router-view>
        </keep-alive>
    </div>
</template>

<script>

export default {
    name: 'Index',
    components: {
        VHeader: () => import('@/common/header/VHeader'),
        NavMenu: () => import('@/common/navMenu/NavMenu')
    },
    data () {
        return {
            isShowPrevPage: true,
            menus: [
                {
                    name: '我上传的',
                    id: 'tab_1',
                    permission: true,
                    path: '/education/myResources/index'
                },
                {
                    name: '收藏/分享',
                    id: 'tab_2',
                    permission: true,
                    path: '/education/myResources/favorShare'
                },
                {
                    name: '我管理的',
                    id: 'tab_3',
                    permission: true,
                    path: '/education/myResources/myManage'
                }
            ]
        }
    },
    mounted () {
        // this.getFolderList()
    },
    // created () {
    //     this.initDataFromRoute(this.$route)
    // },
    watch: {
        // $route (to, from) {
        //     this.initDataFromRoute(to)
        // }
    },
    methods: {
        // initDataFromRoute (route) {
        //     /* 根据路由参数来显示对应数据 */
        //     if (route.query.parent_id) { // 有参数说明不是首页，显示返回上一页
        //         this.isShowPrevPage = true
        //     } else {
        //         this.isShowPrevPage = false
        //     }
        // }
    }
}
</script>

<style lang="less" scoped>
.container {
    height: 100%;
    min-height: 100%;
}
</style>
