+25
-21
lines changedFilter options
+25
-21
lines changed Original file line number Diff line number Diff line change
@@ -165,11 +165,11 @@
165
165
"slots": [
166
166
{
167
167
"name": "title",
168
-
"description": "Optional slot for title (HTML supported)"
168
+
"description": "Optional slot for title (HTML/components supported)"
169
169
},
170
170
{
171
171
"name": "default",
172
-
"description": "Slot for content (HTML supported)"
172
+
"description": "Slot for content (HTML/components supported)"
173
173
}
174
174
]
175
175
}
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ export const BPopover = /*#__PURE__*/ Vue.extend({
47
47
default: () => getComponentConfig(NAME, 'boundary')
48
48
},
49
49
boundaryPadding: {
50
-
type: Number,
50
+
type: [Number, String],
51
51
default: () => getComponentConfig(NAME, 'boundaryPadding')
52
52
}
53
53
},
@@ -59,7 +59,7 @@ export const BPopover = /*#__PURE__*/ Vue.extend({
59
59
updateContent() {
60
60
// Tooltip: Default slot is `title`
61
61
// Popover: Default slot is `content`, `title` slot is title
62
-
// We pass a scoped slot function by default (v2.6x)
62
+
// We pass a scoped slot function references by default (Vue v2.6x)
63
63
// And pass the title prop as a fallback
64
64
this.setContent(this.$scopedSlots.default || this.content)
65
65
this.setTitle(this.$scopedSlots.title || this.title)
Original file line number Diff line number Diff line change
@@ -285,11 +285,12 @@ export const BVTooltip = /*#__PURE__*/ Vue.extend({
285
285
html: this.html,
286
286
placement: this.placement,
287
287
fallbackPlacement: this.fallbackPlacement,
288
-
offset: this.offset,
289
-
arrowPadding: this.arrowPadding,
290
-
boundaryPadding: this.boundaryPadding,
288
+
target: this.getPlacementTarget(),
291
289
boundary: this.getBoundary(),
292
-
target: this.getPlacementTarget()
290
+
// Ensure the following are integers
291
+
offset: parseInt(this.offset, 10) || 0,
292
+
arrowPadding: parseInt(this.arrowPadding, 10) || 0,
293
+
boundaryPadding: parseInt(this.boundaryPadding, 10) || 0
293
294
}
294
295
}))
295
296
// We set the initial reactive data (values that can be changed while open)
Original file line number Diff line number Diff line change
@@ -165,7 +165,7 @@
165
165
"slots": [
166
166
{
167
167
"name": "default",
168
-
"description": "Slot for tooltip content (HTML supported)"
168
+
"description": "Slot for tooltip content (HTML/components supported)"
169
169
}
170
170
]
171
171
}
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ export const BTooltip = /*#__PURE__*/ Vue.extend({
66
66
default: () => getComponentConfig(NAME, 'boundary')
67
67
},
68
68
boundaryPadding: {
69
-
type: Number,
69
+
type: [Number, String],
70
70
default: () => getComponentConfig(NAME, 'boundaryPadding')
71
71
},
72
72
offset: {
@@ -122,6 +122,7 @@ export const BTooltip = /*#__PURE__*/ Vue.extend({
122
122
customClass: this.customClass,
123
123
container: this.container,
124
124
boundary: this.boundary,
125
+
boundaryPadding: this.boundaryPadding,
125
126
delay: this.delay,
126
127
offset: this.offset,
127
128
noFade: this.noFade,
@@ -244,19 +245,21 @@ export const BTooltip = /*#__PURE__*/ Vue.extend({
244
245
// Overridden by BPopover
245
246
// Tooltip: Default slot is `title`
246
247
// Popover: Default slot is `content`, `title` slot is title
247
-
// We pass a scoped slot function by default (v2.6x)
248
+
// We pass a scoped slot function reference by default (Vue v2.6x)
248
249
// And pass the title prop as a fallback
249
250
this.setTitle(this.$scopedSlots.default || this.title)
250
251
},
251
252
// Helper methods for `updateContent()`
252
253
setTitle(val) {
253
254
val = isUndefinedOrNull(val) ? '' : val
255
+
// We only update the value if it has changed
254
256
if (this.localTitle !== val) {
255
257
this.localTitle = val
256
258
}
257
259
},
258
260
setContent(val) {
259
261
val = isUndefinedOrNull(val) ? '' : val
262
+
// We only update the value if it has changed
260
263
if (this.localContent !== val) {
261
264
this.localContent = val
262
265
}
Original file line number Diff line number Diff line change
@@ -5,8 +5,8 @@ import { getComponentConfig } from '../../utils/config'
5
5
import { isBrowser } from '../../utils/env'
6
6
import {
7
7
isFunction,
8
-
isObject,
9
8
isNumber,
9
+
isPlainObject,
10
10
isString,
11
11
isUndefined,
12
12
isUndefinedOrNull
@@ -71,7 +71,7 @@ const parseBindings = (bindings, vnode) => /* istanbul ignore next: not easy to
71
71
} else if (isFunction(bindings.value)) {
72
72
// Content generator function
73
73
config.content = bindings.value
74
-
} else if (isObject(bindings.value)) {
74
+
} else if (isPlainObject(bindings.value)) {
75
75
// Value is config object, so merge
76
76
config = { ...config, ...bindings.value }
77
77
}
@@ -91,10 +91,10 @@ const parseBindings = (bindings, vnode) => /* istanbul ignore next: not easy to
91
91
}
92
92
93
93
// Normalize delay
94
-
if (!isObject(config.delay)) {
94
+
if (!isPlainObject(config.delay)) {
95
95
config.delay = {
96
-
show: config.delay,
97
-
hide: config.delay
96
+
show: parseInt(config.delay, 10) || 0,
97
+
hide: parseInt(config.delay, 10) || 0
98
98
}
99
99
}
100
100
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import { isBrowser } from '../../utils/env'
6
6
import {
7
7
isFunction,
8
8
isNumber,
9
-
isObject,
9
+
isPlainObject,
10
10
isString,
11
11
isUndefined,
12
12
isUndefinedOrNull
@@ -71,7 +71,7 @@ const parseBindings = (bindings, vnode) => /* istanbul ignore next: not easy to
71
71
} else if (isFunction(bindings.value)) {
72
72
// Title generator function
73
73
config.title = bindings.value
74
-
} else if (isObject(bindings.value)) {
74
+
} else if (isPlainObject(bindings.value)) {
75
75
// Value is config object, so merge
76
76
config = { ...config, ...bindings.value }
77
77
}
@@ -84,10 +84,10 @@ const parseBindings = (bindings, vnode) => /* istanbul ignore next: not easy to
84
84
}
85
85
86
86
// Normalize delay
87
-
if (!isObject(config.delay)) {
87
+
if (!isPlainObject(config.delay)) {
88
88
config.delay = {
89
-
show: config.delay,
90
-
hide: config.delay
89
+
show: parseInt(config.delay, 10) || 0,
90
+
hide: parseInt(config.delay, 10) || 0
91
91
}
92
92
}
93
93
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