-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
60 lines (48 loc) · 1.03 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// eslint-disable-next-line import/no-extraneous-dependencies
import Vue from 'vue'
declare interface ScrollData {
x: number
y: number
}
export interface VueScrollbarProps {
/**
* If the env is mobile, the component use the native scrollbar
*
* Require
* */
isMobile: boolean
/**
* maxHeight of scroll wrap
*
* Require
* */
maxHeight: number | string
/**
* Set scrollLeft or scrollTop of scroll wrap
*
* Value range: 0 ~ 1
* */
scrollTo?: number | ScrollData
/**
* Set margin of the scrollbar relative to scroll wrap
*
* Default to 5
* */
marginToWrap?: number
}
declare class VueScrollbar extends Vue implements VueScrollbarProps {
isMobile: boolean
maxHeight: number | string
/** Synchronous effect */
scrollTo?: number | ScrollData
marginToWrap?: number
/**
* Update height of parent element and this.$el
* */
updateHeight(): void
/**
* Async scroll callback
* */
$scrollTo(val: number | ScrollData): void
}
export default VueScrollbar