<template>
  <div class="container">
        <search-fold></search-fold>
        <file-list :mode="'myUpload'" :list="fileList" @handleClickItem="toggleShowBtn" @handleOpen="openFile" @handleShare="shareFile"></file-list>
  </div>
</template>

<script>

export default {
    name: 'MyUploadFileLevel',
    components: {
        FileList: () => import('./components/FileList'),
        SearchFold: () => import('./components/SearchFold')
    },
    data () {
        return {
            fileList: [
                {
                    name: '德育负责人操作手册.docx',
                    icon: 'document',
                    showFunBtn: false
                },
                {
                    name: '德育负责人账号.docx',
                    icon: 'document',
                    showFunBtn: false
                },
                {
                    name: '功能模板说明文档.docx',
                    icon: 'document',
                    showFunBtn: false
                }
            ]
        }
    },
    methods: {
        toggleShowBtn (item) {
            /* 显示功能按钮 */
            item.showFunBtn = !item.showFunBtn
        },
        openFile (item) {
            /* 打开文档 */
            this.$router.push({
                path: '/education/documentDetail'
            })
        },
        shareFile (item) {
            /* 分享文档 */
            this.$router.push({
                path: '/education/share'
            })
        }
    },
    created () {
    },
    mounted () {
    }
}
</script>

<style lang="less" scoped>
</style>
