jnrhsnbt картинок, заглушек в голосованиях и результатах

This commit is contained in:
Denzel committed 2025-01-22 09:15:38 +03:00
1 parent 4c1145195c
commit 53c05dc0fd
2 files changed
+32 -4

No files matched your search

@@ -58,7 +58,7 @@
</v-list-item-action>
</template>
<template v-slot:append>
<v-avatar v-if="answer.file === null && answer.employee" :image="checkremote(`${spravURL()}${answer.employee.login}.jpg`)" />
<v-avatar v-if="answer.file === null && answer.employee" @click.stop="opendialog(checkremote(`${spravURL()}${answer.employee.login}.jpg`))" :image="checkremote(`${spravURL()}${answer.employee.login}.jpg`)" />
<v-avatar v-if="answer.file !== null" :image="answer.file" @click.stop="opendialog(answer)"></v-avatar>
</template>
</v-list-item>
@@ -103,7 +103,7 @@
</v-card-title>
<v-card-item>
<v-img :src="activepick.file" max-height="600"></v-img>
<v-img :src="activepick.file ?? activepick" max-height="600"></v-img>
</v-card-item>
</v-card>
</v-dialog>
+30 -2
View File
@@ -46,8 +46,8 @@
:key="answerIndex"
>
<p>
<v-avatar v-if="answer.file === null && answer.employee" :image="checkremote(`${spravURL()}${answer.employee.login}.jpg`)" />
<v-avatar v-if="answer.file !== null" :image="baseURL.slice(0, -1) + answer.file" />
<v-avatar class="cursor-pointer" v-if="answer.file === null && answer.employee" @click.stop="opendialog(checkremote(`${spravURL()}${answer.employee.login}.jpg`))" :image="checkremote(`${spravURL()}${answer.employee.login}.jpg`)" />
<v-avatar class="cursor-pointer" v-if="answer.file !== null" @click.stop="opendialog(answer)" :image="baseURL.slice(0, -1) + answer.file" />
<strong class="ml-4">{{ answer.employee ? answer.employee.fio : answer.name }}</strong>: {{ answer.count }}
{{ voteCount(answer.count) }}
<template v-if="answer.employee">
@@ -73,6 +73,24 @@
</v-tabs-window-item>
</v-tabs-window>
</v-container>
<v-dialog v-model="dialog" max-width="100vh">
<v-card max-height="800">
<v-card-title class="v-row">
<div class="v-col-auto">
{{ activepick.answer }}
</div>
<v-spacer></v-spacer>
<div>
<v-btn color="red-darken-1" density="compact" icon="mdi-close-thick" size="small" @click="dialog=false"/>
</div>
</v-card-title>
<v-card-item>
<v-img :src="activepick.file !== undefined ? baseURL.slice(0, -1) + activepick.file : activepick" max-height="600"></v-img>
</v-card-item>
</v-card>
</v-dialog>
</template>
<script>
@@ -140,7 +158,17 @@ export default {
return totalVotes > 0 ? (count / totalVotes) * 100 : 0;
};
const activepick = ref(null)
const dialog = ref(false)
const opendialog = (val) => {
dialog.value = true
activepick.value = val
}
return {
activepick,
opendialog,
dialog,
activeTab,
questions,
getWinner,