Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Damon
study
Commits
2a95b5f2
Commit
2a95b5f2
authored
Jul 19, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: 更新答题卡组件文档
parent
6e125020
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
6 deletions
+32
-6
readme.md
src/components/answer-sheet/readme.md
+32
-6
No files found.
src/components/answer-sheet/readme.md
View file @
2a95b5f2
...
@@ -10,17 +10,32 @@
...
@@ -10,17 +10,32 @@
| 属性名 | 类型 | 默认值 | 可选值 | 说明 |
| 属性名 | 类型 | 默认值 | 可选值 | 说明 |
| :--------: | :-----: | :----: | :--------: | :---------------------: |
| :--------: | :-----: | :----: | :--------: | :---------------------: |
| type | String | wrong | right | 答对还是答错 |
| multiple | Boolean | false | true/false | 是否支持多选 |
| multiple | Boolean | false | true/false | 是否支持多选 |
| answerList | Array |
[]
| - | 答案列表
**格式见下文**
|
| answerList | Array |
[]
| - | 答案列表
**格式见下文**
|
| rightKey | Array |
[]
| - | 正确答案
[
'A'
]
|
### answerList 格式
### answerList 格式
```
json
```
json
[
[
{
{
"text"
:
""
//
答案描述
sort
:
'A'
,
}
text
:
'影响'
,
checked
:
'
true
'
//
默认勾选
confirm
:
'
true
'
//
确认勾选,确认后不可重新勾选,会显示该答案正确还是错误
},
{
sort
:
'B'
,
text
:
'影响很小'
,
},
{
sort
:
'C'
,
text
:
'影响很大'
,
},
{
sort
:
'D'
,
text
:
'无影响'
,
},
]
]
```
```
...
@@ -46,6 +61,7 @@
...
@@ -46,6 +61,7 @@
<answer-sheet
<answer-sheet
:answerList=
"lists"
:answerList=
"lists"
:multiple=
"true"
:multiple=
"true"
:rightKey=
"rightKey"
@
change=
"answerChange"
@
change=
"answerChange"
></answer-sheet>
></answer-sheet>
```
```
...
@@ -60,15 +76,25 @@ export default {
...
@@ -60,15 +76,25 @@ export default {
return
{
return
{
lists
:
[
lists
:
[
{
{
text
:
'A.系好安全带'
,
sort
:
'A'
,
text
:
'影响'
,
checked
:
'true'
// 默认勾选
confirm
:
'true'
// 确认勾选,确认后不可重新勾选,会显示该答案正确还是错误
},
{
sort
:
'B'
,
text
:
'影响很小'
,
},
},
{
{
text
:
'B.穿好工作服'
,
sort
:
'C'
,
text
:
'影响很大'
,
},
},
{
{
text
:
'C.换上绝缘服'
,
sort
:
'D'
,
text
:
'无影响'
,
},
},
],
],
rightKey
:
[
'B'
,
'C'
]
}
}
},
},
methods
:
{
methods
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment