Skip to content

Commit 3be1428

Browse files
committed
fix(CPopover, CTooltip): inline styles attribute don't work
1 parent ec17c7b commit 3be1428

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/coreui-vue/src/components/popover/CPopover.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const CPopover = defineComponent({
7979
*/
8080
'show',
8181
],
82-
setup(props, { slots, emit }) {
82+
setup(props, { attrs, slots, emit }) {
8383
const togglerRef = ref()
8484
const popoverRef = ref()
8585
const popper = ref()
@@ -149,6 +149,7 @@ const CPopover = defineComponent({
149149
class: 'popover fade bs-popover-auto',
150150
ref: popoverRef,
151151
role: 'tooltip',
152+
...attrs,
152153
},
153154
[
154155
h('div', { class: 'popover-arrow', 'data-popper-arrow': '' }),

packages/coreui-vue/src/components/tooltip/CTooltip.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const CTooltip = defineComponent({
3030
*/
3131
offset: {
3232
type: Array,
33-
default: () => [0, 0],
33+
default: () => [0, 6],
3434
},
3535
/**
3636
* Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property.
@@ -75,7 +75,7 @@ const CTooltip = defineComponent({
7575
*/
7676
'show',
7777
],
78-
setup(props, { slots, emit }) {
78+
setup(props, { attrs, slots, emit }) {
7979
const togglerRef = ref()
8080
const tooltipRef = ref()
8181
const popper = ref()
@@ -145,6 +145,7 @@ const CTooltip = defineComponent({
145145
class: 'tooltip fade bs-tooltip-auto',
146146
ref: tooltipRef,
147147
role: 'tooltip',
148+
...attrs,
148149
},
149150
[
150151
h('div', { class: 'tooltip-arrow', 'data-popper-arrow': '' }),

0 commit comments

Comments
 (0)