We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b509a7 commit 262c9f5Copy full SHA for 262c9f5
src/components/Carousel/CCarouselItem.vue
@@ -1,9 +1,7 @@
1
<template>
2
<div :class="itemClasses">
3
<CImage
4
- v-if="image || imgSrc"
5
- :src="imgSrc"
6
- v-bind="image"
+ v-bind="computedImage"
7
class="c-d-block c-w-100 c-h-100 c-img-fluid"
8
/>
9
<slot>
@@ -23,8 +21,7 @@ export default {
23
21
CImage
24
22
},
25
props: {
26
- image: Object,
27
- imgSrc: String,
+ image: [String, Object],
28
caption: String,
29
text: String,
30
active: Boolean
@@ -53,6 +50,9 @@ export default {
53
50
'c-active': this.activated
54
51
}
55
52
]
+ },
+ computedImage () {
+ return typeof this.image === 'string' ? { src: this.image } : this.image
56
57
58
methods: {
0 commit comments