File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { Vue } from '../../vue'
2
2
import { NAME_POPOVER } from '../../constants/components'
3
3
import { EVENT_NAME_CLICK } from '../../constants/events'
4
4
import { PROP_TYPE_ARRAY_STRING , PROP_TYPE_STRING } from '../../constants/props'
5
+ import { SLOT_NAME_TITLE } from '../../constants/slots'
5
6
import { makeProp , makePropsConfigurable } from '../../utils/props'
6
7
import { BTooltip , props as BTooltipProps } from '../tooltip/tooltip'
7
8
import { BVPopover } from './helpers/bv-popover'
@@ -37,8 +38,8 @@ export const BPopover = /*#__PURE__*/ Vue.extend({
37
38
// Popover: Default slot is `content`, `title` slot is title
38
39
// We pass a scoped slot function references by default (Vue v2.6x)
39
40
// And pass the title prop as a fallback
40
- this . setContent ( this . $scopedSlots . default || this . content )
41
- this . setTitle ( this . $scopedSlots . title || this . title )
41
+ this . setContent ( this . normalizeSlot ( ) || this . content )
42
+ this . setTitle ( this . normalizeSlot ( SLOT_NAME_TITLE ) || this . title )
42
43
}
43
44
}
44
45
// Render function provided by BTooltip
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import { getScopeId } from '../../utils/get-scope-id'
27
27
import { isUndefinedOrNull } from '../../utils/inspect'
28
28
import { pick } from '../../utils/object'
29
29
import { makeProp , makePropsConfigurable } from '../../utils/props'
30
+ import { normalizeSlotMixin } from '../../mixins/normalize-slot'
30
31
import { BVTooltip } from './helpers/bv-tooltip'
31
32
32
33
// --- Constants ---
@@ -81,6 +82,7 @@ export const props = makePropsConfigurable(
81
82
// @vue /component
82
83
export const BTooltip = /*#__PURE__*/ Vue . extend ( {
83
84
name : NAME_TOOLTIP ,
85
+ mixins : [ normalizeSlotMixin ] ,
84
86
inheritAttrs : false ,
85
87
props,
86
88
data ( ) {
@@ -234,7 +236,7 @@ export const BTooltip = /*#__PURE__*/ Vue.extend({
234
236
// Popover: Default slot is `content`, `title` slot is title
235
237
// We pass a scoped slot function reference by default (Vue v2.6x)
236
238
// And pass the title prop as a fallback
237
- this . setTitle ( this . $scopedSlots . default || this . title )
239
+ this . setTitle ( this . normalizeSlot ( ) || this . title )
238
240
} ,
239
241
// Helper methods for `updateContent()`
240
242
setTitle ( value ) {
You can’t perform that action at this time.
0 commit comments