|
1 | 1 | import{defineComponent,h,PropType,ref,RendererElement,Teleport,Transition}from'vue' |
2 | 2 | import{createPopper,Placement}from'@popperjs/core' |
3 | 3 |
|
4 | | -importtype{Placements}from'../../types' |
| 4 | +importtype{Placements,Triggers}from'../../types' |
5 | 5 | import{executeAfterTransition}from'../../utils/transition' |
6 | 6 | import{getRTLPlacement}from'../../utils' |
7 | 7 |
|
@@ -53,9 +53,9 @@ const CTooltip = defineComponent({ |
53 | 53 | *@values 'click', 'focus', 'hover' |
54 | 54 | */ |
55 | 55 | trigger:{ |
56 | | -type:[String,Array]asPropType<string|string[]>, |
57 | | -default:'hover', |
58 | | -validator:(value:string|string[])=>{ |
| 56 | +type:[String,Array]asPropType<Triggers|Triggers[]>, |
| 57 | +default:()=>['hover','focus'], |
| 58 | +validator:(value:Triggers|Triggers[])=>{ |
59 | 59 | if(typeofvalue==='string'){ |
60 | 60 | return['click','focus','hover'].includes(value) |
61 | 61 | } |
|