Commit bedd2bb3 authored by Damon's avatar Damon

feat: 错题解释组件

parent 9a443144
<template>
<view class="card">
<u-card title="答错了" padding="10" :thumb="thumb">
<view class="u-flex content" slot="body">
<view class="lists">正确答案: {{ answer }}</view>
<view class="lists">解释说明:{{ explain }}</view>
</view>
</u-card>
</view>
</template>
<script>
export default {
name: 'answerSheet',
props: {
answer: {
type: String,
default: '',
},
explain: {
type: String,
default: '',
},
},
data() {
return {
thumb: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg',
}
},
created() {},
methods: {},
}
</script>
<style lang="scss">
.card {
.content {
flex-flow: column;
width: 100%;
padding-bottom: 20rpx;
.lists {
width: 100%;
text-align: left;
padding: 10rpx 0 0rpx 40rpx;
line-height: 50rpx;
}
}
}
</style>
## 错题解释
## API
### Props
| 属性名 | 类型 | 默认值 | 可选值 | 说明 |
| :-----: | :----: | :----: | :----: | :------: |
| answer | String | - | - | 正确答案 |
| explain | String | - | - | 解释说明 |
## 组件用法
### 基础用法
```html
<wrong-explanation answer="A" explain="无"></wrong-explanation>
```
```javascript
import wrongExplanation from '@/components/wrong-explanation/index.vue'
export default {
components: {
answerSheet,
},
data() {},
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