• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "name": "refresh",
3  "version": [
4    {
5      "name": "v3.0"
6    }
7  ],
8  "syscap": [
9    "SystemCapability.ArkUI.ArkUI.Full"
10  ],
11  "description": [
12    {
13      "name": "The <refresh> component is used to pull down to refresh the page."
14    }
15  ],
16  "attributes": [
17    {
18      "name": "offset",
19      "required": false,
20      "description": [
21        {
22          "name": "Distance to the top of the parent component from the <refresh> component that comes to rest after a successful swipe gesture."
23        }
24      ],
25      "type": "length"
26    },
27    {
28      "name": "refreshing",
29      "required": false,
30      "description": [
31        {
32          "name": "Whether the <refresh> component is being refreshed."
33        }
34      ],
35      "type": "enum",
36      "options": [
37        {
38          "name": "true"
39        },
40        {
41          "name": "false"
42        }
43      ]
44    },
45    {
46      "name": "type",
47      "required": false,
48      "description": [
49        {
50          "name": "Dynamic effect when the component is refreshed. Two options are available and cannot be modified dynamically. auto: default effect. When the list is pulled to the top, the list does not move. When the list is pulled to the bottom, a circle is displayed. pulldown: When the list is pulled to the top, users can continue to pull down to trigger a refresh. The rebound effect will appear after the refresh. If the child component contains a list, set scrolleffect of the list to no to prevent drop-down effect conflicts."
51        }
52      ],
53      "type": "enum",
54      "options": [
55        {
56          "name": "auto"
57        },
58        {
59          "name": "pulldown"
60        }
61      ]
62    },
63    {
64      "name": "lasttime",
65      "required": false,
66      "description": [
67        {
68          "name": "Whether to display the last update time. The character string format is last update time: XXXX, where XXXX is displayed based on the time and date display specifications and cannot be dynamically modified. (It is recommended that this attribute be used when type is set to pulldown. The fixed distance is at the bottom of the content drop-down area. Pay attention to the offset attribute setting to prevent overlapping.)."
69        }
70      ],
71      "type": "enum",
72      "options": [
73        {
74          "name": "true"
75        },
76        {
77          "name": "false"
78        }
79      ]
80    },
81    {
82      "name": "timeoffset",
83      "version": [
84        {
85          "name": "v6.0"
86        }
87      ],
88      "required": false,
89      "description": [
90        {
91          "name": "Sets the distance between the update time and the top of the parent component."
92        }
93      ],
94      "type": "length"
95    },
96    {
97      "name": "friction",
98      "required": false,
99      "description": [
100        {
101          "name": "Pull-down friction coefficient. The value ranges from 0 to 100. A larger value indicates a more responsive component. For example, if a user pulls the component down 100 px, it will actually move 100 * friction% px."
102        }
103      ],
104      "type": "number"
105    },
106    {
107      "name": "shareid",
108      "required": false,
109      "description": [
110        {
111          "name": "Used for the transition of shared elements and takes effect only when it is configured. This attribute cannot be modified after being set. list-item, image, text, button, label components are supported for the transition of shared elements."
112        }
113      ],
114      "type": "string"
115    },
116    {
117      "name": "id",
118      "syscap": [
119        "SystemCapability.ArkUI.ArkUI.Full",
120        "SystemCapability.ArkUI.ArkUI.Lite"
121      ],
122      "required": false,
123      "version": [
124        {
125          "name": "v4.0"
126        }
127      ],
128      "description": [
129        {
130          "name": "Unique ID of a component.",
131          "syscap": [
132            "SystemCapability.ArkUI.ArkUI.Full",
133            "SystemCapability.ArkUI.ArkUI.Lite"
134          ]
135        }
136      ],
137      "type": "string"
138    },
139    {
140      "name": "style",
141      "syscap": [
142        "SystemCapability.ArkUI.ArkUI.Full",
143        "SystemCapability.ArkUI.ArkUI.Lite"
144      ],
145      "required": false,
146      "version": [
147        {
148          "name": "v4.0"
149        }
150      ],
151      "description": [
152        {
153          "name": "Style declaration of a component.",
154          "syscap": [
155            "SystemCapability.ArkUI.ArkUI.Full",
156            "SystemCapability.ArkUI.ArkUI.Lite"
157          ]
158        }
159      ],
160      "type": "string"
161    },
162    {
163      "name": "class",
164      "syscap": [
165        "SystemCapability.ArkUI.ArkUI.Full",
166        "SystemCapability.ArkUI.ArkUI.Lite"
167      ],
168      "required": false,
169      "version": [
170        {
171          "name": "v4.0"
172        }
173      ],
174      "description": [
175        {
176          "name": "Style class of a component, which is used to refer to a style table.",
177          "syscap": [
178            "SystemCapability.ArkUI.ArkUI.Full",
179            "SystemCapability.ArkUI.ArkUI.Lite"
180          ]
181        }
182      ],
183      "type": "string"
184    },
185    {
186      "name": "ref",
187      "syscap": [
188        "SystemCapability.ArkUI.ArkUI.Full",
189        "SystemCapability.ArkUI.ArkUI.Lite"
190      ],
191      "required": false,
192      "version": [
193        {
194          "name": "v4.0"
195        }
196      ],
197      "description": [
198        {
199          "name": "Used to register reference information of child elements or child components. The reference information is registered with the parent component on $refs.",
200          "syscap": [
201            "SystemCapability.ArkUI.ArkUI.Full",
202            "SystemCapability.ArkUI.ArkUI.Lite"
203          ]
204        }
205      ],
206      "type": "string"
207    },
208    {
209      "name": "disabled",
210      "required": false,
211      "version": [
212        {
213          "name": "v4.0"
214        }
215      ],
216      "description": [
217        {
218          "name": "Whether a component is disabled. If it is disabled, it cannot respond to user interaction."
219        }
220      ],
221      "type": "enum",
222      "options": [
223        {
224          "name": "true"
225        },
226        {
227          "name": "false"
228        }
229      ]
230    },
231    {
232      "name": "focusable",
233      "required": false,
234      "version": [
235        {
236          "name": "v4.0"
237        }
238      ],
239      "description": [
240        {
241          "name": "Whether a component can gain focus. When focusable is set to true, the component can respond to focus events and key events. If a key event or click event is set for the component, this attribute is set to true automatically."
242        }
243      ],
244      "type": "enum",
245      "options": [
246        {
247          "name": "true"
248        },
249        {
250          "name": "false"
251        }
252      ]
253    },
254    {
255      "name": "data-*",
256      "required": false,
257      "version": [
258        {
259          "name": "v4.0"
260        }
261      ],
262      "description": [
263        {
264          "name": "Attribute set for a component to facilitate data storage and reading."
265        }
266      ],
267      "type": "string"
268    },
269    {
270      "name": "click-effect",
271      "required": false,
272      "version": [
273        {
274          "name": "v5.0"
275        }
276      ],
277      "description": [
278        {
279          "name": "Click effect complying with spring physics. Available values are as follows:\nspring-small: The button icon scales down to 90% of its size when it is selected. This is appropriate for small icons.\nspring-medium: The component scales down to 95% of its size when it is selected. This is appropriate for medium-sized components.spring-large: The button icon scales down and up by 95% of its size, which is appropriate to large icons."
280        }
281      ],
282      "type": "enum",
283      "options": [
284        {
285          "name": "spring-small"
286        },
287        {
288          "name": "spring-medium"
289        },
290        {
291          "name": "spring-large"
292        }
293      ]
294    },
295    {
296      "name": "voicelabel",
297      "required": false,
298      "version": [
299        {
300          "name": "v4.0"
301        }
302      ],
303      "description": [
304        {
305          "name": "Voice label. When a voice label is triggered, the click event of the component is triggered."
306        }
307      ],
308      "type": "string"
309    },
310    {
311      "name": "subscriptflag",
312      "required": false,
313      "version": [
314        {
315          "name": "v4.0"
316        }
317      ],
318      "description": [
319        {
320          "name": "Voice subscript switch. Available values are as follows:\nauto: For the <image> and <list-item> components, if subscriptflag is set to auto, the voice subscript is turned on. For other components, if subscriptflag is set to auto, the voice subscript is turned off.\non: Turn on the voice subscript.\noff: Turn off the voice subscript.If no customized subscript is set, the subscript is automatically accumulated from 1."
321        }
322      ],
323      "type": "enum",
324      "options": [
325        {
326          "name": "auto"
327        },
328        {
329          "name": "on"
330        },
331        {
332          "name": "off"
333        }
334      ]
335    },
336    {
337      "name": "subscriptlabel",
338      "required": false,
339      "version": [
340        {
341          "name": "v4.0"
342        }
343      ],
344      "description": [
345        {
346          "name": "Custom subscript. After it is set, the subscript is displayed in the way you specified. To make this attribute take effect, you need to turn on the voice subscript."
347        }
348      ],
349      "type": "string"
350    },
351    {
352      "name": "scenelabel",
353      "required": false,
354      "version": [
355        {
356          "name": "v4.0"
357        }
358      ],
359      "description": [
360        {
361          "name": "Available values are as follows:\nvideo: Video scenario. For example, to watch a video, a user can say the voiceLabel (usually the video name), play voiceLabel, see voiceLabel, or watch voiceLabel, etc.\naudio: Music scenario. For example, to listen to a song, a user can say the voiceLabel (usually the song name), play voiceLabel, or listen voiceLabel, etc.\npage: Page scenario. For example, to go to a page, a user can say the voiceLabel (usually the page name), switch to voiceLabel, go to voiceLabel, or jump to voiceLabel, etc.\nswitch: Switch scenario. For example, to turn on or turn off a switch, a user can say the voiceLabel (usually the switch name), turn on voiceLabel, open voiceLabel, turn off voiceLabel, close voiceLabel, etc.common: Common scenario, which is triggered by the voiceLabel."
362        }
363      ],
364      "type": "enum",
365      "options": [
366        {
367          "name": "video"
368        },
369        {
370          "name": "audio"
371        },
372        {
373          "name": "page"
374        },
375        {
376          "name": "switch"
377        },
378        {
379          "name": "common"
380        }
381      ]
382    },
383    {
384      "name": "accessibilitygroup",
385      "required": false,
386      "version": [
387        {
388          "name": "v4.0"
389        }
390      ],
391      "description": [
392        {
393          "name": "Accessibility group. If this attribute is set to true, the component and all its child components form an entire selectable component, and the accessibility service will no longer available for the content of its child components."
394        }
395      ],
396      "type": "enum",
397      "options": [
398        {
399          "name": "true"
400        },
401        {
402          "name": "false"
403        }
404      ]
405    },
406    {
407      "name": "accessibilitytext",
408      "required": false,
409      "version": [
410        {
411          "name": "v4.0"
412        }
413      ],
414      "description": [
415        {
416          "name": "Accessibility text. If a component does not contain text information, it will not be read when the component is selected by the screen reader. In this case, the screen reader user cannot know which component is selected. To solve this problem, you can set this attribute for components without text information. When the component is selected by the screen reader, the specified accessibility text will be read, informing the user which component is selected. If a component with this attribute set contains text information, only the accessibility text will be read."
417        }
418      ],
419      "type": "string"
420    },
421    {
422      "name": "accessibilitydescription",
423      "required": false,
424      "version": [
425        {
426          "name": "v4.0"
427        }
428      ],
429      "description": [
430        {
431          "name": "Accessibility description. You can specify further explanation of the current component, for example, possible operation consequences, especially those cannot be learned from component attributes and accessibility text. You can set a detailed description text for the attribute of the component to help users understand the operation to be performed. If a component contains both text information and the accessibility description, the text is read first and then the accessibility description, when the component is selected."
432        }
433      ],
434      "type": "string"
435    },
436    {
437      "name": "accessibilityimportance",
438      "required": false,
439      "version": [
440        {
441          "name": "v4.0"
442        }
443      ],
444      "description": [
445        {
446          "name": "Accessibility importance, which is used to decide whether a component can be identified by the accessibility service. The value can be auto, yes, no, or no-hide-descendants. The last value forces the screen reader to ignore the current component and all its subcomponents.\nyes: The current component is selectable for the accessibility service.no: The current component is not selectable for the accessibility service."
447        }
448      ],
449      "type": "string"
450    },
451    {
452      "name": "for",
453      "syscap": [
454        "SystemCapability.ArkUI.ArkUI.Full",
455        "SystemCapability.ArkUI.ArkUI.Lite"
456      ],
457      "required": false,
458      "version": [
459        {
460          "name": "v4.0"
461        }
462      ],
463      "description": [
464        {
465          "name": "Expands the current element based on the configured data list.",
466          "syscap": [
467            "SystemCapability.ArkUI.ArkUI.Full",
468            "SystemCapability.ArkUI.ArkUI.Lite"
469          ]
470        }
471      ],
472      "type": "string"
473    },
474    {
475      "name": "tid",
476      "syscap": [
477        "SystemCapability.ArkUI.ArkUI.Full",
478        "SystemCapability.ArkUI.ArkUI.Lite"
479      ],
480      "required": false,
481      "version": [
482        {
483          "name": "v4.0"
484        }
485      ],
486      "description": [
487        {
488          "name": "The tid attribute accelerates the for loop and improves the re-rendering efficiency when data in a loop changes.\nThe tid attribute specifies the unique ID of each element in the array. If it is not specified, the index of each element in the array is used as the ID. For example, tid=\"id\" indicates that the id attribute of each element is its unique ID.",
489          "syscap": [
490            "SystemCapability.ArkUI.ArkUI.Full",
491            "SystemCapability.ArkUI.ArkUI.Lite"
492          ]
493        }
494      ],
495      "type": "string"
496    },
497    {
498      "name": "if",
499      "syscap": [
500        "SystemCapability.ArkUI.ArkUI.Full",
501        "SystemCapability.ArkUI.ArkUI.Lite"
502      ],
503      "required": false,
504      "version": [
505        {
506          "name": "v4.0"
507        }
508      ],
509      "description": [
510        {
511          "name": "Whether the element is added or removed.",
512          "syscap": [
513            "SystemCapability.ArkUI.ArkUI.Full",
514            "SystemCapability.ArkUI.ArkUI.Lite"
515          ]
516        }
517      ],
518      "type": "enum",
519      "options": [
520        {
521          "name": "true"
522        },
523        {
524          "name": "false"
525        }
526      ]
527    },
528    {
529      "name": "dir",
530      "version": [
531        {
532          "name": "v6.0"
533        }
534      ],
535      "required": false,
536      "description": [
537        {
538          "name": "Sets the element layout mode. The rtl, ltr, and auto attributes can be set."
539        }
540      ],
541      "type": "enum",
542      "options": [
543        {
544          "name": "ltr"
545        },
546        {
547          "name": "rtl"
548        },
549        {
550          "name": "auto"
551        }
552      ]
553    },
554    {
555      "name": "elif",
556      "syscap": [
557        "SystemCapability.ArkUI.ArkUI.Full",
558        "SystemCapability.ArkUI.ArkUI.Lite"
559      ],
560      "required": false,
561      "version": [
562        {
563          "name": "v4.0"
564        }
565      ],
566      "description": [],
567      "type": "enum",
568      "options": [
569        {
570          "name": "true"
571        },
572        {
573          "name": "false"
574        }
575      ]
576    },
577    {
578      "name": "else",
579      "syscap": [
580        "SystemCapability.ArkUI.ArkUI.Full",
581        "SystemCapability.ArkUI.ArkUI.Lite"
582      ],
583      "required": false,
584      "version": [
585        {
586          "name": "v4.0"
587        }
588      ],
589      "description": [],
590      "type": "string"
591    },
592    {
593      "name": "show",
594      "syscap": [
595        "SystemCapability.ArkUI.ArkUI.Full",
596        "SystemCapability.ArkUI.ArkUI.Lite"
597      ],
598      "required": false,
599      "version": [
600        {
601          "name": "v4.0"
602        }
603      ],
604      "description": [
605        {
606          "name": "Whether the element is displayed or hidden.",
607          "syscap": [
608            "SystemCapability.ArkUI.ArkUI.Full",
609            "SystemCapability.ArkUI.ArkUI.Lite"
610          ]
611        }
612      ],
613      "type": "enum",
614      "options": [
615        {
616          "name": "true"
617        },
618        {
619          "name": "false"
620        }
621      ]
622    }
623  ],
624  "events": [
625    {
626      "name": "refresh",
627      "description": [
628        {
629          "name": "Called when the <refresh> component is pulled down and the refresh status changes. Available values are as follows: false: The <refresh> component is being pulled down. true: The <refresh> component is not being pulled down."
630        }
631      ]
632    },
633    {
634      "name": "pulldown",
635      "description": [
636        {
637          "name": "Triggered when a user starts or stops pulling down the <refresh> component. Available values are as follows: start: The pull-down starts. end: The pull-down ends."
638        }
639      ]
640    }
641  ],
642  "supportedSubComponents": true,
643  "supportedSubComponentsRestriction": [],
644  "unSupportSubComponentsRestriction": [],
645  "parentComponentsRestriction": []
646}