imgs
This commit is contained in:
1 parent
b245c1a2a3
commit
f4dafe703f
2 files changed
+15
-9
No files matched your search
@@ -2,3 +2,4 @@ from django.contrib import admin
|
|||||||
from .models import *
|
from .models import *
|
||||||
|
|
||||||
admin.site.register(Vote)
|
admin.site.register(Vote)
|
||||||
|
admin.site.register(Question)
|
||||||
@@ -7,10 +7,11 @@
|
|||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col>
|
<v-col>
|
||||||
|
|
||||||
<v-carousel show-arrows="hover" hide-delimiters cycle height="200">
|
<v-carousel show-arrows="hover" hide-delimiters cycle height="200">
|
||||||
<v-carousel-item v-for="(picture, index) in ['https://cdn.vuetifyjs.com/images/parallax/material.jpg', 'https://cdn.vuetifyjs.com/images/carousel/squirrel.jpg']"
|
<v-carousel-item v-for="(picture, index) in images"
|
||||||
:key="index"
|
:key="index"
|
||||||
:src="picture">
|
:src="`${baseURL.slice(0, -1)}${picture}`">
|
||||||
</v-carousel-item>
|
</v-carousel-item>
|
||||||
</v-carousel>
|
</v-carousel>
|
||||||
</v-col>
|
</v-col>
|
||||||
@@ -38,7 +39,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TimerUI from '../secret/TimerUI.vue';
|
import TimerUI from '../secret/TimerUI.vue';
|
||||||
import { ref } from 'vue'
|
import { baseURL } from "@/utils/axios-api";
|
||||||
|
import { ref, computed } from 'vue'
|
||||||
export default {
|
export default {
|
||||||
components: { TimerUI },
|
components: { TimerUI },
|
||||||
emits: ['openVoteModal', 'openEditVoteModal', 'deleteVoting'],
|
emits: ['openVoteModal', 'openEditVoteModal', 'deleteVoting'],
|
||||||
@@ -48,20 +50,23 @@ export default {
|
|||||||
default: () => {
|
default: () => {
|
||||||
return {
|
return {
|
||||||
id: 0,
|
id: 0,
|
||||||
name: "Допустим, здесь могла быть ваша реклама",
|
name: "",
|
||||||
description: "Но таких денег у вас нет, чтобы получить ее на нашем прекрасном голосовании",
|
description: "",
|
||||||
pictures: ["https://cdn.vuetifyjs.com/images/parallax/material.jpg", "https://cdn.vuetifyjs.com/images/carousel/squirrel.jpg"],
|
files: [],
|
||||||
dateend: new Date(new Date().getTime() + 600000),
|
dateend: new Date(new Date().getTime() + 600000),
|
||||||
is_passed: true,
|
is_passed: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setup() {
|
setup(props) {
|
||||||
const timeChange = ref(false)
|
const timeChange = ref(false)
|
||||||
|
const images = computed(()=>{
|
||||||
return { timeChange }
|
return props.voteCard.files.length>0? props.voteCard.files:['/media/defaultimg/vote.png']
|
||||||
|
})
|
||||||
|
return { timeChange, baseURL ,images}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
Reference in new issue
Block a user