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 = {
99}
1010
1111type VDraggableBinding = [
12- list : Ref < any [ ] > ,
12+ list : RefOrValue < any [ ] > ,
1313 options ?: RefOrValue < UseDraggableOptions < any > >
1414]
1515
1616const elementMap : WeakMap < HTMLElement , ( ) => void > = new WeakMap ( )
1717
1818export const vDraggable : ObjectDirective <
1919 HTMLElement ,
20- VDraggableBinding | Ref < any [ ] >
20+ VDraggableBinding | RefOrValue < any [ ] >
2121> = {
2222 [ directiveHooks . mounted ] ( el , binding ) {
2323 const params = isProxy ( binding . value ) ? [ binding . value ] : binding . value
2424
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 )
2628 elementMap . set ( el , state . destroy )
2729 } ,
2830 [ directiveHooks . unmounted ] ( el ) {
You can’t perform that action at this time.
0 commit comments