<div class="my-question">
    <el-tabs v-model="type">
        <el-tab-pane label="练习" name="1">
            <ul class="problem">
                <li v-for="item in paperList" :key="item.id" class="item">
                    <div class="title">{{ item.title }}</div>
                    <div class="message">
                        <span class="cell light">共{{ item.item_number }}题</span>
                        <span :class="{ light: item.number }" class="cell">{{ item.number ? '已完成' : '未完成' }}</span>
                    </div>
                    <div class="button-group">
                        <button v-if="item.number" class="button fill" @click="goProblemResult(item)">答题结果</button>
                        <button v-if="item.number" class="button" @click="answer(item.id)">再次答题</button>
                        <button v-else class="button fill" @click="answer(item.id)">开始答题</button>
                    </div>
                </li>
            </ul>
            <el-pagination :page-size="limit" :total="total" :current-page.sync="page" layout="prev, pager, next" prev-text="上一页" next-text="下一页" hide-on-single-page
                           @current-change="handleCurrentChange">
            </el-pagination>
            <el-empty v-if="!paperList.length && finished" description="暂无练习"></el-empty>
        </el-tab-pane>
        <el-tab-pane label="考试" name="2">
            <ul class="question">
                <li v-for="item in paperList" :key="item.id" class="item">
                    <div class="image"><img :src="item.image" alt=""></div>
                    <div class="text">
                        <div class="title">{{ item.title }}</div>
                        <div class="message">{{ item.number ? '已完成' : '未完成' }}</div>
                        <div class="button-group">
                            <button v-if="item.number" class="button fill" @click="goQuestionResult(item)">答题结果</button>
                            <button v-if="item.number" class="button" @click="answer(item.id)">再次答题</button>
                            <button v-else class="button fill" @click="answer(item.id)">开始答题</button>
                        </div>
                    </div>
                </li>
            </ul>
            <el-pagination :page-size="limit" :total="total" :current-page.sync="page" layout="prev, pager, next" prev-text="上一页" next-text="下一页" hide-on-single-page
                           @current-change="handleCurrentChange">
            </el-pagination>
            <el-empty v-if="!paperList.length && finished" description="暂无考试"></el-empty>
        </el-tab-pane>
    </el-tabs>
</div>