Files
PORTAL_COD2/src/front/src/components/vote/ConstructorVote/QuestionSettings.vue
T

64 lines
1.4 KiB
Vue

<template>
<div class="py-2 text-overline text-grey">Настройки вопроса</div>
<div class="v-row">
<v-col class="align-self-center font-weight-bold py-0" cols="auto">
Тип ответа
</v-col>
<v-col class="py-0 align-self-center" cols="3">
<v-select
v-model="question.settings.choice"
:items="questionTypes"
:list-props="{ density: 'compact' }"
density="compact"
hide-details
item-title="name"
item-value="choice"
label=""
variant="outlined"
@update:model-value="resetAnswers"
></v-select>
</v-col>
<v-spacer />
<v-col class="align-self-center font-weight-bold" cols="auto" >
Число возможных ответов
</v-col>
<v-col cols="1" >
<v-text-field
v-model="question.settings.multiChoice"
:rules="[rules.required && question.settings.multiChoice > 0]"
density="compact"
hide-details
min="1"
type="number"
variant="outlined"
></v-text-field>
</v-col>
</div>
</template>
<script>
export default {
props: {
question: {
type: Object,
required: true,
},
rules: {
type: Object,
required: true,
},
questionTypes: {
type: Array,
required: true,
},
resetAnswers:{
type: Function,
}
}
}
</script>
<style scoped>
</style>