|
|
- <template>
- <view class="flex card">
- <view class="radio" v-if="showRadio">
- <uv-radio :name="data.id"></uv-radio>
- </view>
- <view class="info">
- <view class="title">{{ typeDesc }}</view>
- <view class="row">
- <view class="row-label">绑定人:</view>
- <view class="row-content">{{ data.name }}</view>
- </view>
- <view class="row">
- <view class="row-label">申请人ID:</view>
- <view class="row-content">{{ data.userId }}</view>
- </view>
- </view>
- </view>
- </template>
-
- <script>
- const TYPE_AND_DESC_MAPPING = {
- 0: '学生',
- 1: '家长',
- }
-
- export default {
- props: {
- data: {
- type: Object,
- default() {
- return {}
- }
- },
- value: {
- type: String,
- default: null,
- },
- showRadio: {
- type: Boolean,
- default: false
- },
- },
- data() {
- return {
- }
- },
- computed: {
- typeDesc() {
- const { type } = this.data
-
- return TYPE_AND_DESC_MAPPING[type] || ''
- },
- },
- methods: {
- },
- }
- </script>
-
- <style scoped lang="scss">
- @import './card.scss';
- </style>
|