File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
packages/coreui-vue/src/components Expand file tree Collapse file tree 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'
55
66const CDropdownMenu = defineComponent ( {
77 name : 'CDropdownMenu' ,
8+ inheritAttrs : false ,
89 props : {
910 /**
1011 * Component used for the root node. Either a string to use a HTML element or a component.
@@ -16,7 +17,7 @@ const CDropdownMenu = defineComponent({
1617 default : 'div' ,
1718 } ,
1819 } ,
19- setup ( props , { slots } ) {
20+ setup ( props , { attrs , slots } ) {
2021 const dropdownMenuRef = inject ( 'dropdownMenuRef' ) as Ref < HTMLElement >
2122 const config = inject ( 'config' ) as any // eslint-disable-line @typescript-eslint/no-explicit-any
2223 const visible = inject ( 'visible' ) as Ref < boolean >
@@ -35,10 +36,12 @@ const CDropdownMenu = defineComponent({
3536 h (
3637 props . component ,
3738 {
39+ ...attrs ,
3840 class : [
3941 'dropdown-menu' ,
4042 { show : visible . value } ,
4143 getAlignmentClassNames ( alignment ) ,
44+ attrs . class ,
4245 ] ,
4346 ...( ( typeof alignment === 'object' || ! popper ) && {
4447 'data-coreui-popper' : 'static' ,
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { getRTLPlacement } from '../../utils'
99
1010const CPopover = defineComponent ( {
1111 name : 'CPopover' ,
12+ inheritAttrs : false ,
1213 props : {
1314 /**
1415 * Apply a CSS fade transition to the popover.
@@ -25,9 +26,7 @@ const CPopover = defineComponent({
2526 * @since v5.0.0-beta.0
2627 */
2728 container : {
28- type : [ Object , String ] as PropType <
29- HTMLElement | ( ( ) => HTMLElement ) | string
30- > ,
29+ type : [ Object , String ] as PropType < HTMLElement | ( ( ) => HTMLElement ) | string > ,
3130 default : 'body' ,
3231 } ,
3332 /**
@@ -198,16 +197,17 @@ const CPopover = defineComponent({
198197 h (
199198 'div' ,
200199 {
200+ ...attrs ,
201201 class : [
202202 'popover' ,
203203 'bs-popover-auto' ,
204204 {
205205 fade : props . animation ,
206206 } ,
207+ attrs . class ,
207208 ] ,
208209 ref : popoverRef ,
209210 role : 'tooltip' ,
210- ...attrs ,
211211 } ,
212212 [
213213 h ( 'div' , { class : 'popover-arrow' } ) ,
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { getRTLPlacement } from '../../utils'
99
1010const CTooltip = defineComponent ( {
1111 name : 'CTooltip' ,
12+ // inheritAttrs: false,
1213 props : {
1314 /**
1415 * Apply a CSS fade transition to the tooltip.
@@ -194,16 +195,17 @@ const CTooltip = defineComponent({
194195 h (
195196 'div' ,
196197 {
198+ ...attrs ,
197199 class : [
198200 'tooltip' ,
199201 'bs-tooltip-auto' ,
200202 {
201203 fade : props . animation ,
202204 } ,
205+ attrs . class ,
203206 ] ,
204207 ref : tooltipRef ,
205208 role : 'tooltip' ,
206- ...attrs ,
207209 } ,
208210 [
209211 h ( 'div' , { class : 'tooltip-arrow' } ) ,
You can’t perform that action at this time.
0 commit comments