8000 Update carousel-slide.js · bootstrap-vue/bootstrap-vue@da963db · GitHub
[go: up one dir, main page]

Skip to content

Commit da963db

Browse files
committed
Update carousel-slide.js
1 parent 0baa352 commit da963db

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/components/carousel/carousel-slide.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import Vue from '../../utils/vue'
2-
import idMixin from '../../mixins/id'
3-
import normalizeSlotMixin from '../../mixins/normalize-slot'
2+
import pluckProps from '../../utils/pluck-props'
3+
import unPrefixPropName from '../../utils/unprefix-prop-name'
44
import { hasTouchSupport } from '../../utils/env'
55
import { htmlOrText } from '../../utils/html'
6+
import idMixin from '../../mixins/id'
7+
import normalizeSlotMixin from '../../mixins/normalize-slot'
68
import { BImg } from '../image/img'
79

810
// --- Props ---
911

10-
export const props = {
12+
const imgProps = {
1113
imgSrc: {
1214
type: String
1315
// default: undefined
@@ -31,7 +33,11 @@ export const props = {
3133
imgBlankColor: {
3234
type: String,
3335
default: 'transparent'
34-
},
36+
}
37+
}
38+
39+
export const props = {
40+
...imgProps,
3541
contentVisibleUp: {
3642
type: String
3743
},
@@ -110,14 +116,11 @@ export const BCarouselSlide = /*#__PURE__*/ Vue.extend({
110116

111117
$img = h(BImg, {
112118
props: {
113-
fluidGrow: true,
114-
block: true,
115-
src: this.imgSrc,
116-
blank: this.imgBlank,
117-
blankColor: this.imgBlankColor,
119+
...pluckProps(imgProps, this.$props, unPrefixPropName.bind(null, 'img')),
118120
width: this.computedWidth,
119121
height: this.computedHeight,
120-
alt: this.imgAlt
122+
fluidGrow: true,
123+
block: true
121124
},
122125
on
123126
})

0 commit comments

Comments
 (0)
0