|
@@ -6,6 +6,7 @@
|
|
v-model="slide"
|
|
v-model="slide"
|
|
navigation
|
|
navigation
|
|
infinite
|
|
infinite
|
|
|
|
+ height="540px"
|
|
:autoplay="2000"
|
|
:autoplay="2000"
|
|
arrows
|
|
arrows
|
|
transition-prev="slide-right"
|
|
transition-prev="slide-right"
|
|
@@ -14,21 +15,19 @@
|
|
@mouseleave="autoplay = true"
|
|
@mouseleave="autoplay = true"
|
|
>
|
|
>
|
|
<q-carousel-slide
|
|
<q-carousel-slide
|
|
- :name="1"
|
|
|
|
- img-src="https://cdn.quasar.dev/img/mountains.jpg"
|
|
|
|
- />
|
|
|
|
- <q-carousel-slide
|
|
|
|
- :name="2"
|
|
|
|
- img-src="https://cdn.quasar.dev/img/parallax1.jpg"
|
|
|
|
- />
|
|
|
|
- <q-carousel-slide
|
|
|
|
- :name="3"
|
|
|
|
- img-src="https://cdn.quasar.dev/img/parallax2.jpg"
|
|
|
|
- />
|
|
|
|
- <q-carousel-slide
|
|
|
|
- :name="4"
|
|
|
|
- img-src="https://cdn.quasar.dev/img/quasar.jpg"
|
|
|
|
- />
|
|
|
|
|
|
+ v-for="(item, index) in sliders"
|
|
|
|
+ :key="index"
|
|
|
|
+ :name="index"
|
|
|
|
+ :img-src="item.imageUrl"
|
|
|
|
+ class="cursor-pointer"
|
|
|
|
+ @click="goToBlog(item.linkToBlog)"
|
|
|
|
+ >
|
|
|
|
+ <div class="q-mt-xl q-ml-xl absolute-left custom-caption">
|
|
|
|
+ <div style="height: 100px"></div>
|
|
|
|
+ <div class="text-h1 text-weight-bolder">{{ item.title }}</div>
|
|
|
|
+ <div class="text-h5 text-weight-medium">{{ item.subTitle }}</div>
|
|
|
|
+ </div>
|
|
|
|
+ </q-carousel-slide>
|
|
</q-carousel>
|
|
</q-carousel>
|
|
</div>
|
|
</div>
|
|
</q-page>
|
|
</q-page>
|
|
@@ -44,6 +43,10 @@ export default defineComponent({
|
|
setup() {
|
|
setup() {
|
|
const sliders = ref([]);
|
|
const sliders = ref([]);
|
|
|
|
|
|
|
|
+ function goToBlog(url) {
|
|
|
|
+ window.location.href = url;
|
|
|
|
+ }
|
|
|
|
+
|
|
function loadHomeSliders() {
|
|
function loadHomeSliders() {
|
|
api
|
|
api
|
|
.get("/api/public/pagecontent/homesliders")
|
|
.get("/api/public/pagecontent/homesliders")
|
|
@@ -66,7 +69,15 @@ export default defineComponent({
|
|
return {
|
|
return {
|
|
slide: ref(1),
|
|
slide: ref(1),
|
|
autoplay: ref(true),
|
|
autoplay: ref(true),
|
|
|
|
+ sliders,
|
|
|
|
+ goToBlog,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
|
|
+<style lang="sass" scoped>
|
|
|
|
+.custom-caption
|
|
|
|
+ text-align: left
|
|
|
|
+ padding: 12px
|
|
|
|
+ color: white
|
|
|
|
+</style>
|