File tree 3 files changed +18
-3
lines changed
3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vue-tippy" ,
3
- "version" : " 6.1.1 " ,
3
+ "version" : " 6.1.2 " ,
4
4
"main" : " index.js" ,
5
5
"module" : " dist/vue-tippy.mjs" ,
6
6
"unpkg" : " dist/vue-tippy.iife.js" ,
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
3
<tippy content =" Choose an aggregation for this area" :tag =" null" >
4
- <button class =" text-sm py-2 px-3 bg-gray-900 text-white rounded-lg" >Aggregation #1</button >
4
+ <button class =" text-sm py-2 px-3 bg-gray-900 text-white rounded-lg" >Aggregation #1</button >
5
+ </tippy >
6
+
7
+ <tippy content =" View Android device page" :tag =" null" >
8
+ <RouterLink to =" /" aria-label =" View Android device page" >
9
+ Link
10
+ </RouterLink >
5
11
</tippy >
6
12
</div >
7
13
</template >
Original file line number Diff line number Diff line change @@ -13,6 +13,15 @@ declare module '@vue/runtime-core' {
13
13
interface ComponentCustomProperties extends UnwrapNestedRefs < ReturnType < typeof useTippy > > { }
14
14
}
15
15
16
+ function toValue ( r : any ) : any {
17
+ return typeof r === 'function'
18
+ ? ( r as any ) ( )
19
+ : unref ( r )
20
+ }
21
+ function unrefElement ( elRef : any ) : any {
22
+ const plain = toValue ( elRef )
23
+ return ( plain as any ) ?. $el ?? plain
24
+ }
16
25
17
26
const TippyComponent = defineComponent ( {
18
27
props : {
@@ -95,7 +104,7 @@ const TippyComponent = defineComponent({
95
104
return options
96
105
}
97
106
98
- let target : any = ( ) => elem . value
107
+ let target : any = ( ) => unrefElement ( elem )
99
108
100
109
if ( props . to ) {
101
110
if ( typeof Element !== 'undefined' && props . to instanceof Element ) {
You can’t perform that action at this time.
0 commit comments