Comments (3)
I have solved my error by using this approach instead.
<b-carousel id="infoscreen-carousel" :interval="3000" :indicators="false" :controls="false">
<b-slide v-for="n in 10">
<template v-if="events[n]">
<div class="carousel-image">
<img v-if="events[n].image" v-bind:src="events[n].image.raw" v-bind:alt="events[n].title" v-bind:title="events[n].title">
</div>
<div class="carousel-desc">
<h2><a v-bind:href="events[n].url">{{ events[n].title | truncate(88) }}</a></h2>
<p>
<span>{{ events[n].all_oist_category }}</span>
<span v-if="events[n].location">{{ events[n].location }}</span>
<span>{{ events[n].start_date | unixToString }}</span>
</p>
<p>{{ events[n].summary | cleanString | truncate(176) }}</p>
</div>
</template>
</b-slide>
</b-carousel>
Any comments would still be appreciate as to the correct approach.
Thank you
from bootstrap-vue.
Closing this as is a little old. Official carousel component support will be in next releases :)
from bootstrap-vue.
I tried to do the same by taking the carousal from the documentation and put the image links in the data section.
<template>
<b-row>
<b-col>
<b-carousel id="carousel1"
style="text-shadow: 1px 1px 2px #333;"
controls
indicators
background="#ababab"
:interval="4000"
img-width="1024"
img-height="480"
v-model="slide"
@sliding-start="onSlideStart"
@sliding-end="onSlideEnd"
>
<b-carousel-slide v-for="image in images" v-bind:img-src="image"></b-carousel-slide>
</b-carousel>
<p class="mt-4">
Slide #: {{ slide }}<br>
Sliding: {{ sliding }}
</p>
<div v-for="image in images">{{image}}</div>
</b-col>
</b-row>
</template>
<script>
export default {
data () {
return {
images:
[ 'https://lorempixel.com/1024/480/technics/2/'
, 'https://lorempixel.com/1024/480/technics/8/'
, 'https://lorempixel.com/1024/480/technics/5/'
]
}
}
}
</script>
<style scoped>
</style>
The v-for
works fine for this line <div v-for="image in images">{{image}}</div>
but with the b-carousel-slide
tag i get
(Emitted value instead of an instance of Error) <b-carousel-slide v-for="image in images">: component lists rendered with v-for should have explicit keys. See https://vuejs.org/guide/list.html#key for more info.
Is there something in the carousel component that i need explicit keys now? (the carousel works though) How is this different than a regular div?
edit: changing
img-width="1024"
img-height="480"
to smaller sizes seems to have no effect
from bootstrap-vue.
Related Issues (20)
- handling Punctuation in sorting HOT 2
- I'm trying to setup bootstrap-vue/nuxt but i got this error "Cannot restart nuxt: Cannot read properties of undefined (reading 'hook')" HOT 3
- Support for Tree View Component HOT 2
- the b-nav not switching tabs when clicking
- TS support for @vue/compat usage with vue3/optionsApi HOT 1
- Update to nuxt 3
- Set attributes on b-dropdown-group header
- vue 3.3.5+ in compat mode throws errors HOT 1
- b-form-checkbox assign is not a function HOT 16
- [Mobile devies] Cannot open tooltip again when call `this.$root.$emit("bv::hide::tooltip")`
- Sortable does not show HOT 1
- B-form-spinbutton : how to add two features : default value, and direction (+/-) on @change event HOT 3
- @row-selected in b-table not fired after calling multiple selectRow function
- -
- disabled buttons style radio-group displays the checked option as not checked
- can i get the source of web site "https://bootstrap-vue.org/" HOT 1
- b-form-radio-group Issue : Not able to Get the Id and Text on v-model for b-form-radio-group HOT 2
- nb
- b-form-select throws error el[assignKey] is not a function HOT 2
- Bootstrap-vue doesn't work with latest VUE + VITE
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootstrap-vue.