+14
-3
lines changedFilter options
+14
-3
lines changed Original file line number Diff line number Diff line change
@@ -36,10 +36,12 @@ export const BCard = /*#__PURE__*/ Vue.extend({
36
36
props,
37
37
render(h, { props, data, slots, scopedSlots }) {
38
38
const {
39
+
imgSrc,
39
40
imgLeft,
40
41
imgRight,
41
42
imgStart,
42
43
imgEnd,
44
+
imgBottom,
43
45
header,
44
46
headerHtml,
45
47
footer,
@@ -55,12 +57,12 @@ export const BCard = /*#__PURE__*/ Vue.extend({
55
57
56
58
let $imgFirst = h()
57
59
let $imgLast = h()
58
-
if (props.imgSrc) {
60
+
if (imgSrc) {
59
61
const $img = h(BCardImg, {
60
62
props: pluckProps(cardImgProps, props, unprefixPropName.bind(null, 'img'))
61
63
})
62
64
63
-
if (props.imgBottom) {
65
+
if (imgBottom) {
64
66
$imgLast = $img
65
67
} else {
66
68
$imgFirst = $img
@@ -82,9 +84,18 @@ export const BCard = /*#__PURE__*/ Vue.extend({
82
84
83
85
let $content = normalizeSlot(SLOT_NAME_DEFAULT, slotScope, $scopedSlots, $slots)
84
86
85
-
// Wrap content in <card-body> when `noBody` prop set
87
+
// Wrap content in `<card-body>` when `noBody` prop set
86
88
if (!props.noBody) {
87
89
$content = h(BCardBody, { props: pluckProps(bodyProps, props) }, $content)
90
+
91
+
// When the `overlap` prop is set we need to wrap the `<b-card-img>` and `<b-card-body>`
92
+
// into a relative positioned wrapper to don't distract a potential header or footer
93
+
if (props.overlay && imgSrc) {
94
+
$content = h('div', { staticClass: 'position-relative' }, [$imgFirst, $content, $imgLast])
95
+
// Reset image variables since they are already in the wrapper
96
+
$imgFirst = h()
97
+
$imgLast = h()
98
+
}
88
99
}
89
100
90
101
let $footer = h()
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4