File tree 3 files changed +11
-6
lines changed
packages/coreui-vue/src/components
3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { getAlignmentClassNames } from './utils'
5
5
6
6
const CDropdownMenu = defineComponent ( {
7
7
name : 'CDropdownMenu' ,
8
+ inheritAttrs : false ,
8
9
props : {
9
10
/**
10
11
* Component used for the root node. Either a string to use a HTML element or a component.
@@ -16,7 +17,7 @@ const CDropdownMenu = defineComponent({
16
17
default : 'div' ,
17
18
} ,
18
19
} ,
19
- setup ( props , { slots } ) {
20
+ setup ( props , { attrs , slots } ) {
20
21
const dropdownMenuRef = inject ( 'dropdownMenuRef' ) as Ref < HTMLElement >
21
22
const config = inject ( 'config' ) as any // eslint-disable-line @typescript-eslint/no-explicit-any
22
23
const visible = inject ( 'visible' ) as Ref < boolean >
@@ -35,10 +36,12 @@ const CDropdownMenu = defineComponent({
35
36
h (
36
37
props . component ,
37
38
{
39
+ ...attrs ,
38
40
class : [
39
41
'dropdown-menu' ,
40
42
{ show : visible . value } ,
41
43
getAlignmentClassNames ( alignment ) ,
44
+ attrs . class ,
42
45
] ,
43
46
...( ( typeof alignment === 'object' || ! popper ) && {
44
47
'data-coreui-popper' : 'static' ,
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { getRTLPlacement } from '../../utils'
9
9
10
10
const CPopover = defineComponent ( {
11
11
name : 'CPopover' ,
12
+ inheritAttrs : false ,
12
13
props : {
13
14
/**
14
15
* Apply a CSS fade transition to the popover.
@@ -25,9 +26,7 @@ const CPopover = defineComponent({
25
26
* @since v5.0.0-beta.0
26
27
*/
27
28
container : {
28
- type : [ Object , String ] as PropType <
29
- HTMLElement | ( ( ) => HTMLElement ) | string
30
- > ,
29
+ type : [ Object , String ] as PropType < HTMLElement | ( ( ) => HTMLElement ) | string > ,
31
30
default : 'body' ,
32
31
} ,
33
32
/**
@@ -198,16 +197,17 @@ const CPopover = defineComponent({
198
197
h (
199
198
'div' ,
200
199
{
200
+ ...attrs ,
201
201
class : [
202
202
'popover' ,
203
203
'bs-popover-auto' ,
204
204
{
205
205
fade : props . animation ,
206
206
} ,
207
+ attrs . class ,
207
208
] ,
208
209
ref : popoverRef ,
209
210
role : 'tooltip' ,
210
- ...attrs ,
211
211
} ,
212
212
[
213
213
h ( 'div' , { class : 'popover-arrow' } ) ,
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { getRTLPlacement } from '../../utils'
9
9
10
10
const CTooltip = defineComponent ( {
11
11
name : 'CTooltip' ,
12
+ // inheritAttrs: false,
12
13
props : {
13
14
/**
14
15
* Apply a CSS fade transition to the tooltip.
@@ -194,16 +195,17 @@ const CTooltip = defineComponent({
194
195
h (
195
196
'div' ,
196
197
{
198
+ ...attrs ,
197
199
class : [
198
200
'tooltip' ,
199
201
'bs-tooltip-auto' ,
200
202
{
201
203
fade : props . animation ,
202
204
} ,
205
+ attrs . class ,
203
206
] ,
204
207
ref : tooltipRef ,
205
208
role : 'tooltip' ,
206
- ...attrs ,
207
209
} ,
208
210
[
209
211
h ( 'div' , { class : 'tooltip-arrow' } ) ,
You can’t perform that action at this time.
0 commit comments