File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 33 "version" : " 0.0.0-development" ,
44 "description" : " Adds a directive that listens for click events and scrolls to elements." ,
55 "main" : " vue-scrollto.js" ,
6+ "types" : " vue-scrollto.d.ts" ,
67 "keywords" : [
78 " vue" ,
89 " vuejs" ,
Original file line number Diff line number Diff line change 1+ import Vue , { DirectiveOptions , PluginObject } from "vue"
2+
3+ type ElementDescriptor = Element | string
4+
5+ export interface ScrollOptions {
6+ container ?: ElementDescriptor
7+ duration ?: number
8+ easing ?: string
9+ offset ?: number
10+ force ?: boolean
11+ cancelable ?: boolean
12+ onStart ?: false | ( ( element : Element ) => any )
13+ onDone ?: false | ( ( element : Element ) => any )
14+ onCancel ?: false | ( ( event : Event , element : Element ) => any )
15+ x ?: boolean
16+ y ?: boolean
17+ }
18+
19+ type ScrollToFunction = (
20+ element : ElementDescriptor ,
21+ duration ?: number ,
22+ options ?: ScrollOptions ,
23+ ) => ( ) => void
24+
25+ declare const _default : PluginObject < ScrollOptions > &
26+ DirectiveOptions & {
27+ scrollTo : ScrollToFunction
28+ }
29+
30+ export default _default
31+
32+ declare module "vue/types/vue" {
33+ interface Vue {
34+ $scrollTo : ScrollToFunction
35+ }
36+ }
You can’t perform that action at this time.
0 commit comments