<template>
    <div
            class="pt-4 pl-4 pr-4"
    >
        <v-card
                class="mb-4"
                tile
        >
            <v-card-title>
                文件审阅
            </v-card-title>
            <v-divider></v-divider>
            <v-list three-line subheader>
                <v-list-item
                        v-for="(item, i) in files"
                        :key="i"
                        @click="jump('FileShow', {id: item.id})"
                >
                    <v-list-item-content>
                        <v-list-item-title>{{ item.title }}</v-list-item-title>
                        <v-list-item-subtitle>{{ item.desc }}</v-list-item-subtitle>
                    </v-list-item-content>
                    <v-list-item-action v-if="item.is">
                        <v-icon
                                color="red"
                        >
                            mdi-check
                        </v-icon>
                    </v-list-item-action>
                </v-list-item>
            </v-list>
        </v-card>
        <v-btn
                absolute
                dark
                fab
                right
                color="#1f3c84"
                style="bottom: 16px"
                @click="jump('Index')"
        >
            <v-icon>mdi-home</v-icon>
        </v-btn>
    </div>
</template>

<script>
    export default {
        name: "index",
        data() {
            return {
                files: [],
            }
        },
        mounted() {
            this.$api.article.index().then(result => {
                this.files = result.files
            });
        }
    }
</script>

<style scoped>

</style>