This commit is contained in:
Nukeap committed 2025-01-17 15:43:14 +03:00
1 parent fae96e34ec
commit 8f243df36e
2 files changed
+22 -9

No files matched your search

@@ -1,5 +1,5 @@
<template> <template>
<v-container> <v-row class="pt-2">
<template v-if="isVoteCreated"> <template v-if="isVoteCreated">
<v-card class="text-center pa-8" flat> <v-card class="text-center pa-8" flat>
<v-icon color="success" size="48">mdi-check-circle</v-icon> <v-icon color="success" size="48">mdi-check-circle</v-icon>
@@ -8,7 +8,8 @@
</v-card> </v-card>
</template> </template>
<template v-else> <template v-else>
<v-stepper v-model="step" editable> <div class="v-col bg-red">
<v-stepper v-model="step" editable>
<v-stepper-header> <v-stepper-header>
<v-stepper-item :complete="step > 0" step="1">Основная информация</v-stepper-item> <v-stepper-item :complete="step > 0" step="1">Основная информация</v-stepper-item>
<v-divider></v-divider> <v-divider></v-divider>
@@ -243,8 +244,9 @@
</v-stepper-window> </v-stepper-window>
</v-stepper> </v-stepper>
</div>
</template> </template>
</v-container> </v-row>
</template> </template>
<script> <script>
+17 -6
View File
@@ -1,11 +1,13 @@
<template> <template>
<v-container class="pt-2"> <v-container fluid class="pt-2 d-flex flex-column">
<v-row class="flex-column">
<v-col cols="auto">
<v-tabs v-model="currentTab"> <v-tabs v-model="currentTab">
<v-tab value="current">Текущие голосования</v-tab> <v-tab v-for="x in tabs" :key="x.value" :value="x.value">{{ x.text }}</v-tab>
<v-tab value="completed">Завершенные голосования</v-tab>
<v-tab value="constructor">Создать новое голосование</v-tab>
</v-tabs> </v-tabs>
</v-col>
<v-col class="overflow-auto">
<v-tabs-window v-model="currentTab"> <v-tabs-window v-model="currentTab">
<!-- Текущие голосования --> <!-- Текущие голосования -->
<v-tabs-window-item value="current"> <v-tabs-window-item value="current">
@@ -68,7 +70,7 @@
<!-- Модальные окна --> <!-- Модальные окна -->
<v-dialog v-model="voteModal" @click:outside="closeModal"> <v-dialog v-model="voteModal" @click:outside="closeModal">
<CurrentVote :data="res" @closer="closeModal"/> <CurrentVote :data="res" @closer="closeModal"/>
@@ -99,6 +101,8 @@
</v-card-actions> </v-card-actions>
</v-card> </v-card>
</v-dialog> </v-dialog>
</v-col>
</v-row>
</v-container> </v-container>
</template> </template>
@@ -116,6 +120,12 @@ export default {
components: { CurrentVote, VoteConstructor, VoteCardVue }, components: { CurrentVote, VoteConstructor, VoteCardVue },
setup() { setup() {
const tabs=[
{value:"current", text:'Текущие голосования'},
{value:"completed", text:'Завершенные голосования'},
{value:"constructor", text:'Создать новое голосование'},
]
const currentTab = ref("current"); const currentTab = ref("current");
const votes = ref([]); const votes = ref([]);
const router = useRouter(); const router = useRouter();
@@ -223,6 +233,7 @@ export default {
deleteVoting, deleteVoting,
updating, updating,
res, res,
tabs
}; };
}, },
}; };