File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -9,20 +9,22 @@ const directiveHooks = {
9
9
}
10
10
11
11
type VDraggableBinding = [
12
- list : Ref < any [ ] > ,
12
+ list : RefOrValue < any [ ] > ,
13
13
options ?: RefOrValue < UseDraggableOptions < any > >
14
14
]
15
15
16
16
const elementMap : WeakMap < HTMLElement , ( ) => void > = new WeakMap ( )
17
17
18
18
export const vDraggable : ObjectDirective <
19
19
HTMLElement ,
20
- VDraggableBinding | Ref < any [ ] >
20
+ VDraggableBinding | RefOrValue < any [ ] >
21
21
> = {
22
22
[ directiveHooks . mounted ] ( el , binding ) {
23
23
const params = isProxy ( binding . value ) ? [ binding . value ] : binding . value
24
24
25
- const state = useDraggable ( el ! , ...( params as VDraggableBinding ) )
25
+ const [ list , options ] = params as VDraggableBinding
26
+
27
+ const state = useDraggable ( el ! , list as Ref , options )
26
28
elementMap . set ( el , state . destroy )
27
29
} ,
28
30
[ directiveHooks . unmounted ] ( el ) {
You can’t perform that action at this time.
0 commit comments