Commit 2a95b5f2 authored by Damon's avatar Damon

docs: 更新答题卡组件文档

parent 6e125020
......@@ -10,17 +10,32 @@
| 属性名 | 类型 | 默认值 | 可选值 | 说明 |
| :--------: | :-----: | :----: | :--------: | :---------------------: |
| type | String | wrong | right | 答对还是答错 |
| multiple | Boolean | false | true/false | 是否支持多选 |
| answerList | Array | [] | - | 答案列表 **格式见下文** |
| rightKey | Array | [] | - | 正确答案 ['A'] |
### answerList 格式
```json
[
{
"text": "" // 答案描述
}
sort: 'A',
text: '影响',
checked: 'true' // 默认勾选
confirm: 'true' // 确认勾选,确认后不可重新勾选,会显示该答案正确还是错误
},
{
sort: 'B',
text: '影响很小',
},
{
sort: 'C',
text: '影响很大',
},
{
sort: 'D',
text: '无影响',
},
]
```
......@@ -46,6 +61,7 @@
<answer-sheet
:answerList="lists"
:multiple="true"
:rightKey="rightKey"
@change="answerChange"
></answer-sheet>
```
......@@ -60,15 +76,25 @@ export default {
return {
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: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment