forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQScrollArea.json
More file actions
333 lines (310 loc) · 10.9 KB
/
QScrollArea.json
File metadata and controls
333 lines (310 loc) · 10.9 KB
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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
{
"meta": {
"docsUrl": "https://v1.quasar.dev/vue-components/scroll-area"
},
"props": {
"dark": {
"extends": "dark",
"addedIn": "v1.9.0"
},
"bar-style": {
"type": [ "Array", "String", "Object"],
"desc": "Object with CSS properties and values for custom styling the scrollbars (both vertical and horizontal)",
"examples": [ ":bar-style=\"{ borderRadius: '5px', background: 'red', opacity: 1 }\"" ],
"category": "style",
"addedIn": "v1.5.0"
},
"vertical-bar-style": {
"type": [ "Array", "String", "Object"],
"desc": "Object with CSS properties and values for custom styling the vertical scrollbar; Is applied on top of 'bar-style' prop",
"examples": [ ":bar-style=\"{ right: '4px', borderRadius: '5px', background: 'red', width: '10px', opacity: 1 }\"" ],
"category": "style",
"addedIn": "v1.17"
},
"horizontal-bar-style": {
"type": [ "Array", "String", "Object"],
"desc": "Object with CSS properties and values for custom styling the horizontal scrollbar; Is applied on top of 'bar-style' prop",
"examples": [ ":bar-style=\"{ bottom: '4px', borderRadius: '5px', background: 'red', height: '10px', opacity: 1 }\"" ],
"category": "style",
"addedIn": "v1.17"
},
"thumb-style": {
"type": "Object",
"desc": "Object with CSS properties and values for custom styling the thumb of scrollbars (both vertical and horizontal)",
"examples": [ ":thumb-style=\"{ borderRadius: '5px', background: 'red', opacity: 1 }\"" ],
"category": "style"
},
"vertical-thumb-style": {
"type": "Object",
"desc": "Object with CSS properties and values for custom styling the thumb of the vertical scrollbar; Is applied on top of 'thumb-style' prop",
"examples": [ ":thumb-style=\"{ right: '4px', borderRadius: '5px', background: 'red', width: '10px', opacity: 1 }\"" ],
"category": "style",
"addedIn": "v1.17"
},
"horizontal-thumb-style": {
"type": "Object",
"desc": "Object with CSS properties and values for custom styling the thumb of the horizontal scrollbar; Is applied on top of 'thumb-style' prop",
"examples": [ ":thumb-style=\"{ bottom: '4px', borderRadius: '5px', background: 'red', height: '10px', opacity: 1 }\"" ],
"category": "style",
"addedIn": "v1.17"
},
"content-style": {
"type": [ "Array", "String", "Object"],
"desc": "Object with CSS properties and values for styling the container of QScrollArea",
"examples": [ ":content-style=\"{ backgroundColor: '#C0C0C0' }\"" ],
"category": "style"
},
"content-active-style": {
"type": [ "Array", "String", "Object"],
"desc": "Object with CSS properties and values for styling the container of QScrollArea when scroll area becomes active (is mouse hovered)",
"examples": [ ":content-active-style=\"{ backgroundColor: 'white' }\"" ],
"category": "style"
},
"visible": {
"type": "Boolean",
"desc": "Manually control the visibility of the scrollbar; Overrides default mouse over/leave behavior",
"category": "behavior",
"addedIn": "v1.3.0"
},
"delay": {
"type": [ "Number", "String" ],
"desc": "When content changes, the scrollbar appears; this delay defines the amount of time (in milliseconds) before scrollbars disappear again (if component is not hovered)",
"default": 1000,
"examples": [ 500, ":delay=\"550\"" ],
"category": "behavior"
},
"horizontal": {
"type": "Boolean",
"desc": "Changes the default axis to horizontal instead of vertical (which is default) for getScrollPosition, getScrollPercentage, setScrollPosition, and setScrollPercentage",
"category": "behavior"
},
"tabindex": {
"extends": "tabindex",
"addedIn": "v1.15.15"
}
},
"slots": {
"default": {
"extends": "default"
}
},
"events": {
"scroll": {
"desc": "Emitted when scroll information changes (and listener is configured)",
"params": {
"info": {
"type": "Object",
"__exemption": [ "examples" ],
"definition": {
"ref": {
"type": "Object",
"desc": "Vue reference to the QScrollArea which triggered the event",
"__exemption": [ "examples" ]
},
"verticalPosition": {
"type": "Number",
"desc": "Vertical scroll position (in px)",
"__exemption": [ "examples" ]
},
"verticalPercentage": {
"type": "Number",
"desc": "Vertical scroll percentage (0.0 <= x <= 1.0)",
"__exemption": [ "examples" ]
},
"verticalSize": {
"type": "Number",
"desc": "Vertical scroll size (in px)",
"__exemption": [ "examples" ]
},
"verticalContainerSize": {
"type": "Number",
"desc": "Height of the container (in px)",
"__exemption": [ "examples" ]
},
"horizontalPosition": {
"type": "Number",
"desc": "Horizontal scroll position (in px)",
"__exemption": [ "examples" ]
},
"horizontalPercentage": {
"type": "Number",
"desc": "Horizontal scroll percentage (0.0 <= x <= 1.0)",
"__exemption": [ "examples" ]
},
"horizontalSize": {
"type": "Number",
"desc": "Horizontal scroll size (in px)",
"__exemption": [ "examples" ]
},
"horizontalContainerSize": {
"type": "Number",
"desc": "Width of the container (in px)",
"__exemption": [ "examples" ]
}
}
}
},
"addedIn": "v1.9.3"
}
},
"methods": {
"getScrollTarget": {
"desc": "Get the scrolling DOM element target",
"returns": {
"type": "Object",
"desc": "DOM element upon which scrolling takes place",
"__exemption": [ "examples" ]
}
},
"getScroll": {
"desc": "Get the current scroll information",
"returns": {
"type": "Object",
"desc": "Scroll information",
"__exemption": [ "examples" ],
"definition": {
"verticalPosition": {
"type": "Number",
"desc": "Vertical scroll position (in px)",
"__exemption": [ "examples" ]
},
"verticalPercentage": {
"type": "Number",
"desc": "Vertical scroll percentage (0.0 <= x <= 1.0)",
"__exemption": [ "examples" ]
},
"verticalSize": {
"type": "Number",
"desc": "Vertical scroll size (in px)",
"__exemption": [ "examples" ]
},
"verticalContainerSize": {
"type": "Number",
"desc": "Height of the container (in px)",
"__exemption": [ "examples" ]
},
"horizontalPosition": {
"type": "Number",
"desc": "Horizontal scroll position (in px)",
"__exemption": [ "examples" ]
},
"horizontalPercentage": {
"type": "Number",
"desc": "Horizontal scroll percentage (0.0 <= x <= 1.0)",
"__exemption": [ "examples" ]
},
"horizontalSize": {
"type": "Number",
"desc": "Horizontal scroll size (in px)",
"__exemption": [ "examples" ]
},
"horizontalContainerSize": {
"type": "Number",
"desc": "Width of the container (in px)",
"__exemption": [ "examples" ]
}
}
},
"addedIn": "v1.17"
},
"getScrollPosition": {
"desc": "Get current scroll position",
"params": {
"axis": {
"type": "String",
"desc": "Scroll axis - defaults to 'vertical' (or to 'horizontal' if horizontal prop is set)",
"values": [ "vertical", "horizontal", "both" ]
}
},
"returns": {
"type": "Object",
"definition": {
"top": {
"type": "Number",
"desc": "Scroll offset from top (vertical)",
"examples": [ 120 ]
},
"left": {
"type": "Number",
"desc": "Scroll offset from left (horizontal)",
"examples": [ 10 ]
}
},
"examples": [ "{ top: 10, left: 0 }" ]
},
"addedIn": "v1.17"
},
"getScrollPercentage": {
"desc": "Get current scroll position in percentage (0.0 <= x <= 1.0)",
"params": {
"axis": {
"type": "String",
"desc": "Scroll axis - defaults to 'vertical' (or to 'horizontal' if horizontal prop is set)",
"values": [ "vertical", "horizontal", "both" ]
}
},
"returns": {
"type": "Object",
"definition": {
"top": {
"type": "Number",
"desc": "Scroll percentage (0.0 <= x <= 1.0) offset from top (vertical)",
"examples": [ 0.12 ]
},
"left": {
"type": "Number",
"desc": "Scroll percentage (0.0 <= x <= 1.0) offset from left (horizontal)",
"examples": [ 0.92 ]
}
},
"examples": [ "{ top: 0.212, left: 0 }" ]
},
"addedIn": "v1.17"
},
"setScrollPosition": {
"desc": "Set scroll position to an offset; If a duration (in milliseconds) is specified then the scroll is animated",
"params": {
"axis": {
"type": "String",
"desc": "Scroll axis",
"values": [ "vertical", "horizontal" ],
"required": true
},
"offset": {
"type": "Number",
"desc": "Scroll position offset from top (in pixels)",
"required": true,
"examples": [ 220 ]
},
"duration": {
"type": "Number",
"desc": "Duration (in milliseconds) enabling animated scroll",
"examples": [ 300 ]
}
}
},
"setScrollPercentage": {
"desc": "Set scroll position to a percentage (0.0 <= x <= 1.0) of the total scrolling size; If a duration (in milliseconds) is specified then the scroll is animated",
"params": {
"axis": {
"type": "String",
"desc": "Scroll axis",
"values": [ "vertical", "horizontal" ],
"required": true
},
"offset": {
"type": "Number",
"desc": "Scroll percentage (0.0 <= x <= 1.0) of the total scrolling size",
"required": true,
"examples": [ 220 ]
},
"duration": {
"type": "Number",
"desc": "Duration (in milliseconds) enabling animated scroll",
"examples": [ 300 ]
}
},
"addedIn": "v1.17"
}
}
}