forked from didi/cube-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcube-ui.d.ts
178 lines (168 loc) · 5.08 KB
/
cube-ui.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
import Vue from 'vue'
import { CubeUIComponent } from './component'
/**
* CubeUI 组件
* CubeUI component common definition
*/
export type Component = CubeUIComponent
/**
* 版本
*
* The version of cube-ui
*/
export const version: string
/**
* 需通过 `Vue.use(Cube)` 来安装
*
* Call `Vue.use(Cube)` to install
*/
export function install (vue: typeof Vue): void
/**
* BetterScroll, https://github.com/ustbhuangyi/better-scroll
*/
export class BScroll {}
/**
* 可以通过 `createAPI` 创建自己的通过
* API 形式实例化的组件
*
* You use it to create your own API component
* more details: https://didi.github.io/cube-ui/#/en-US/docs/create-api
*/
export function createAPI (vue: typeof Vue, Component: CubeUIComponent, events?: string[], single?: boolean) : object
/** Local Module */
export class Locale {
install (vue: typeof Vue): void
use (lang: string, messages: object): void
}
/** Style Module */
export class Style {}
// basic
/** Button Component */
export class Button extends CubeUIComponent {}
/** Loading Component */
export class Loading extends CubeUIComponent {}
/** Tip Component */
export class Tip extends CubeUIComponent {}
/** Toolbar Component */
export class Toolbar extends CubeUIComponent {}
/** TabBar Component */
export class TabBar extends CubeUIComponent {}
/** TabPanels Component */
export class TabPanels extends CubeUIComponent {}
// form
/** Checkbox Component */
export class Checkbox extends CubeUIComponent {}
/** Checkbox Group Component */
export class CheckboxGroup extends CubeUIComponent {}
/** Checker Component */
export class Checker extends CubeUIComponent {}
/** Radio Component */
export class Radio extends CubeUIComponent {}
/** Radio Group Component */
export class RadioGroup extends CubeUIComponent {}
/** Input Component */
export class Input extends CubeUIComponent {}
/** Textarea Component */
export class Textarea extends CubeUIComponent {}
/** Select Component */
export class Select extends CubeUIComponent {}
/** Switch Component */
export class Switch extends CubeUIComponent {}
/** Rate Component */
export class Rate extends CubeUIComponent {}
/** Validator Component */
export class Validator extends CubeUIComponent {}
/** Upload Component */
export class Upload extends CubeUIComponent {}
/** Form Component */
export class Form extends CubeUIComponent {}
// popup
/** Popup Component */
export class Popup extends CubeUIComponent {
show(): any
hide(): any
remove(): any
static $create(options: object): Popup
}
/** Toast Component */
export class Toast extends Popup {
static $create(options: object): Toast
}
/** Picker Component */
export class Picker extends Popup {
static $create(options: object): Picker
}
/** Cascade Picker Component */
export class CascadePicker extends Popup {
static $create(options: object): CascadePicker
}
/** Date Picker Component */
export class DatePicker extends Popup {
static $create(options: object): DatePicker
}
/** Time Picker Component */
export class TimePicker extends Popup {
static $create(options: object): TimePicker
}
/** Segment Picker Component */
export class SegmentPicker extends Popup {
static $create(options: object): SegmentPicker
}
/** Dialog Component */
export class Dialog extends Popup {
static $create(options: object): Dialog
}
/** Action Sheet Component */
export class ActionSheet extends Popup {
static $create(options: object): ActionSheet
}
/** ImagePreview Component */
export class ImagePreview extends Popup {
static $create(options: object): ImagePreview
}
/** Drawer Component */
export class Drawer extends CubeUIComponent {
show(): void
hide(): void
static $create(options: object): Drawer
}
// scroll
/** Scroll Component */
export class Scroll extends CubeUIComponent {}
/** Slide Component */
export class Slide extends CubeUIComponent {}
/** Index List Component */
export class IndexList extends CubeUIComponent {}
/** Swipe Component */
export class Swipe extends CubeUIComponent {}
/** Sticky Component */
export class Sticky extends CubeUIComponent {}
/** ScrollNavBar Component */
export class ScrollNavBar extends CubeUIComponent {}
/** ScrollNav Component */
export class ScrollNav extends CubeUIComponent {}
/** RecycleList Component */
export class RecycleList extends CubeUIComponent {}
// Vue prototype $createXx
declare module 'vue/types/vue' {
interface Vue {
/** create Toast instance */
$createToast(options: object): Toast
/** create Picker instance */
$createPicker(options: object): Picker
/** create CascadePicker instance */
$createCascadePicker(options: object): CascadePicker
/** create DatePicker instance */
$createDatePicker(options: object): DatePicker
/** create TimePicker instance */
$createTimePicker(options: object): TimePicker
/** create SegmentPicker instance */
$createSegmentPicker(options: object): SegmentPicker
/** create Dialog instance */
$createDialog(options: object): Dialog
/** create ActionSheet instance */
$createActionSheet(options: object): ActionSheet
/** create ImagePreview instance */
$createImagePreview(options: object): ImagePreview
}
}