鸿宇研学生前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

61 lines
1.2 KiB

<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>