Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-learn
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-learn
Commits
7b1fc8aa
提交
7b1fc8aa
authored
10月 20, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
exam组件提供slot
上级
86e3e6c3
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
30 行增加
和
5 行删除
+30
-5
examCard.vue
src/components/exam/examCard.vue
+9
-3
questionList.vue
src/components/exam/questionList.vue
+3
-1
questionListItem.vue
src/components/exam/questionListItem.vue
+1
-0
questionNumbers.vue
src/components/exam/questionNumbers.vue
+1
-0
questionDetails.vue
src/pages/exam/myExam/questionDetails.vue
+16
-1
没有找到文件。
src/components/exam/examCard.vue
浏览文件 @
7b1fc8aa
...
...
@@ -12,6 +12,9 @@
<div
class=
"left"
>
<question-list
:data=
"currentQuestionGroup"
:index=
"currentPage"
:disabled=
"disabled"
:hasResult=
"hasResult"
>
<template
#
index
>
{{
currentPage
+
1
}}
/
{{
questionGroups
.
length
}}
</
template
>
<
template
v-slot:default=
"data"
>
<slot
name=
"question-item"
v-bind=
"data"
></slot>
</
template
>
</question-list>
</div>
<div
class=
"right"
>
...
...
@@ -20,7 +23,9 @@
:list=
"questionGroups"
:data=
"currentQuestionGroup"
@
page-change=
"handlePageChange"
></question-numbers>
>
<slot
name=
"students"
v-bind=
"{ data: currentQuestionGroup }"
></slot>
</question-numbers>
</div>
</div>
<div
class=
"foot"
id=
"foot-h"
>
...
...
@@ -155,15 +160,16 @@ export default {
prev
()
{
if
(
this
.
currentPage
<=
0
)
return
this
.
currentPage
--
this
.
$emit
(
'page-change'
,
this
.
currentQuestionGroup
,
this
.
questionGroups
)
this
.
handlePageChange
(
this
.
currentPage
)
},
// 下一题
next
()
{
const
total
=
this
.
questionGroups
.
length
if
(
this
.
currentPage
+
1
>=
total
)
return
this
.
currentPage
++
this
.
$emit
(
'page-change'
,
this
.
currentQuestionGroup
,
this
.
questionGroups
)
this
.
handlePageChange
(
this
.
currentPage
)
},
// 翻页
handlePageChange
(
index
)
{
this
.
currentPage
=
index
this
.
$emit
(
'page-change'
,
this
.
currentQuestionGroup
,
this
.
questionGroups
)
...
...
src/components/exam/questionList.vue
浏览文件 @
7b1fc8aa
...
...
@@ -14,7 +14,9 @@
:key=
"item.id"
v-bind=
"$attrs"
v-on=
"$listeners"
/>
>
<slot
v-bind=
"
{ item, data }">
</slot>
</question-list-item>
</div>
</div>
</
template
>
...
...
src/components/exam/questionListItem.vue
浏览文件 @
7b1fc8aa
...
...
@@ -35,6 +35,7 @@
:disabled="disabled"
>
</el-input>
</
template
>
<slot></slot>
</div>
<div
class=
"question-list-item-ft"
v-if=
"hasResult"
>
<h3
class=
"question-list-item-ft__title"
>
答案解析
</h3>
...
...
src/components/exam/questionNumbers.vue
浏览文件 @
7b1fc8aa
...
...
@@ -16,6 +16,7 @@
</ul>
</div>
</div>
<slot></slot>
<ul
class=
"flag-tips"
v-if=
"true"
>
<li>
<div
class=
"circle1"
></div>
...
...
src/pages/exam/myExam/questionDetails.vue
浏览文件 @
7b1fc8aa
...
...
@@ -13,7 +13,22 @@
@
delete=
"deleteQuestion"
ref=
"exam"
v-if=
"Object.keys(data).length"
></exam-card>
>
<template
v-slot:question-item=
"
{ item, data }">
<div>
单个试题
</div>
{{
item
}}
<div>
整页数据,也就是一组
</div>
{{
data
}}
<div
class=
"div"
>
13123
</div>
</
template
>
<
template
v-slot:students=
"{ data }"
>
{{
data
}}
</
template
>
</exam-card>
</template>
<
script
>
import
*
as
api
from
'@/api/exam.js'
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论