Update VoteConstructor.vue

This commit is contained in:
Nukeap committed 2025-01-23 09:53:39 +03:00
1 parent 0dd25d0f97
commit ad7b603e8e
1 file changed
+11 -14
@@ -100,20 +100,20 @@
<div class="py-2 text-overline text-grey">Настройки вопроса</div> <div class="py-2 text-overline text-grey">Настройки вопроса</div>
<div class="v-row "> <div class="v-row ">
<v-col class="align-self-center font-weight-bold py-0"> <v-col cols="auto" class="align-self-center font-weight-bold py-0">
Тип ответа Тип ответа
</v-col> </v-col>
<v-col cols="3" class="py-0"> <v-col cols="3" class="py-0 align-self-center ">
<v-select density="compact" v-model="question.settings.choice" :items="questionTypes" <v-select density="compact" v-model="question.settings.choice" :items="questionTypes"
@update:model-value="question.answers=[]" @update:model-value="question.answers=[]"
:list-props="{density:'compact'}" :list-props="{density:'compact'}"
item-title="name" item-value="choice" label="" hide-details variant="outlined"></v-select> item-title="name" item-value="choice" label="" hide-details variant="outlined"></v-select>
<!-- choice --> <!-- choice -->
</v-col> </v-col>
</div> <v-spacer/>
<div class="v-row"> <v-col cols="auto" class="align-self-center font-weight-bold">
<v-col class="align-self-center font-weight-bold">
Число возможных ответов Число возможных ответов
</v-col> </v-col>
<v-col cols="1" class=""> <v-col cols="1" class="">
@@ -121,11 +121,13 @@
:rules="[rules.required && question.settings.multiChoice > 0]" hide-details type="number" :rules="[rules.required && question.settings.multiChoice > 0]" hide-details type="number"
min="1" variant="outlined"> min="1" variant="outlined">
<template v-slot:prepend> <template v-slot:prepend>
</template> </template>
</v-text-field> </v-text-field>
</v-col> </v-col>
</div> </div>
<div class="v-row">
</div>
<v-card-text class="px-0"> <v-card-text class="px-0">
<div v-if="question.settings.choice === 'free'"> <div v-if="question.settings.choice === 'free'">
@@ -141,6 +143,7 @@
</div> </div>
</transition-group> </transition-group>
<div class="d-flex justify-start"> <div class="d-flex justify-start">
<v-btn size="small" color="teal-darken-4" @click="addAnswer(index)">Добавить ответ</v-btn> <v-btn size="small" color="teal-darken-4" @click="addAnswer(index)">Добавить ответ</v-btn>
@@ -464,17 +467,11 @@ export default {
}); });
const selectedTimeStart = ref( const selectedTimeStart = ref(
`${form.value.startDate.getHours().toString().padStart(2, "0")}:${form.value.startDate `${(form.value.startDate.getHours()+1).toString().padStart(2, "0")}:00`
.getMinutes()
.toString()
.padStart(2, "0")}`
); );
const selectedTimeEnd = ref( const selectedTimeEnd = ref(
`${form.value.endDate.getHours().toString().padStart(2, "0")}:${form.value.endDate `${(form.value.endDate.getHours()+1).toString().padStart(2, "0")}:00`
.getMinutes()
.toString()
.padStart(2, "0")}`
); );
watch(form.value, () => { watch(form.value, () => {