135 lines
2.4 KiB
Vue
135 lines
2.4 KiB
Vue
<template>
|
|
<view class="item">
|
|
<view class="top">
|
|
<view class="type">
|
|
{{subject_type_text}}
|
|
</view>
|
|
<view class="score">
|
|
5分
|
|
</view>
|
|
<view class="fl1">
|
|
|
|
</view>
|
|
<view class="right">
|
|
<!-- <view class="right_text">展开</view>
|
|
<uv-icon class="arrow-icon" name="arrow-right"></uv-icon> -->
|
|
</view>
|
|
</view>
|
|
<view class="question_text">
|
|
{{subject_data.qnsContent}}
|
|
</view>
|
|
<view class="option_div">
|
|
|
|
</view>
|
|
|
|
</view>
|
|
</template>
|
|
<script setup>
|
|
import {
|
|
ref,
|
|
reactive,
|
|
onMounted,
|
|
nextTick,
|
|
computed,
|
|
toRaw
|
|
} from 'vue'
|
|
import radioSubjectItem from './radio-subject-item.vue'
|
|
import {
|
|
SUBJECT_TYPE
|
|
} from '@/enum.js'
|
|
const customStyle = {
|
|
borderRadius: '16rpx',
|
|
width: '292rpx',
|
|
backgroundColor: '#0066FF',
|
|
border: '1rpx solid rgb(12, 123, 245)',
|
|
}
|
|
const emit = defineEmits(['click_option'])
|
|
const props = defineProps({
|
|
item: {
|
|
type: Object,
|
|
required: true,
|
|
},
|
|
mode: {
|
|
type: String,
|
|
required: true,
|
|
}
|
|
});
|
|
|
|
const subject_data = reactive({
|
|
qnsId: '',
|
|
qnsContent: '',
|
|
qnsTyp: '',
|
|
})
|
|
Object.assign(subject_data, {
|
|
qnsId: props.item.qnsId,
|
|
qnsContent: props.item.qnsContent,
|
|
qnsTyp: props.item.qnsTyp,
|
|
})
|
|
// 题类型
|
|
const subject_type_text = computed(() => SUBJECT_TYPE.find(res => subject_data.qnsTyp === res.value)?.label || '')
|
|
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.item {
|
|
// height: 170rpx;
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding-bottom: 40rpx;
|
|
|
|
.top {
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
.type {
|
|
width: 108rpx;
|
|
height: 46rpx;
|
|
background: #267EFF;
|
|
border-radius: 8rpx;
|
|
font-family: PingFangSC;
|
|
font-weight: 500;
|
|
font-size: 25rpx;
|
|
color: #FFFFFF;
|
|
text-align: center;
|
|
line-height: 46rpx;
|
|
}
|
|
|
|
.score {
|
|
margin-left: 24rpx;
|
|
font-family: ArialMT;
|
|
font-size: 30rpx;
|
|
color: #333333;
|
|
text-align: left;
|
|
}
|
|
|
|
.right {
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
.right_text {
|
|
font-family: PingFangSC;
|
|
font-weight: 600;
|
|
font-size: 28rpx;
|
|
color: #333;
|
|
line-height: 40rpx;
|
|
text-align: left;
|
|
font-style: normal;
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
.question_text {
|
|
font-family: PingFangSC;
|
|
font-weight: 500;
|
|
font-size: 30rpx;
|
|
color: #333333;
|
|
line-height: 48rpx;
|
|
text-align: left;
|
|
font-style: normal;
|
|
margin-top: 20rpx;
|
|
}
|
|
}
|
|
</style> |