frontend/teacher/src/components/SingleSelect/index.vue
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<template>
<div id='single-select'>
<el-button @click="addQuestion"
type="primary">添加题目</el-button>
<el-button @click="delQuestionSelect"
type="warning">删除题目</el-button>
<el-button @click="delAllQuestion"
type="danger">清空题目</el-button>
<el-table ref="questionTable"
v-loading="loading"
:data="questionItems"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55">
</el-table-column>
<el-table-column label="题目">
<template slot-scope="scope">{{ scope.row.question }}</template>
</el-table-column>
<el-table-column label="分值">
<template slot-scope="scope">{{ scope.row.score }}</template>
</el-table-column>
<el-table-column label="操作"
width="200">
<template slot-scope="scope">
<el-button size="mini"
@click="setScore(scope.$index)">设置分值</el-button>
<el-button size="mini"
type="danger"
@click="delQuestion(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="questionList.length>0"
:total="questionList.length"
:page.sync="questionIndex"
:limit.sync="questionSize"
@pagination="searchQuestion" />
<el-dialog :visible.sync="showDialog"
width="70%">
<el-table v-loading="loadingQuestion"
:data="items"
@selection-change="handleSelectionQuestionChange"
border
fit
highlight-current-row
style="width: 100%">
<el-table-column type="selection"
width="35"></el-table-column>
<el-table-column prop="question"
label="题目"
min-width="200" />
<el-table-column prop="optionA"
label="选项A" />
<el-table-column prop="optionB"
label="选项B" />
<el-table-column prop="optionC"
后面还有 175 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。