• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "name": "list",
3  "version": [
4    {
5      "name": "v3.0"
6    }
7  ],
8  "description": [
9    {
10      "name": "The <list> component provides a list container that presents a series of list items arranged in a column with the same width. Lists support presentations of the same data in a multiple and coherent row style, for example, images and texts."
11    }
12  ],
13  "attributes": [
14    {
15      "name": "cachedcount",
16      "required": false,
17      "description": [
18        {
19          "name": "Minimum number of cached list-items when the long list is loaded with delay. When the number of list-items cached outside the visible area is less than the value of this attribute, a requestitem event is triggered."
20        }
21      ],
22      "type": "number"
23    },
24    {
25      "name": "dir",
26      "required": false,
27      "description": [
28        {
29          "name": "Specify the text direction of an element."
30        }
31      ],
32      "type": "enum",
33      "options": [
34        {
35          "name": "ltr"
36        },
37        {
38          "name": "rtl"
39        },
40        {
41          "name": "auto"
42        }
43      ]
44    },
45    {
46      "name": "scrollbar",
47      "required": false,
48      "description": [
49        {
50          "name": "Display mode of the side scroll bar. (Currently, only the vertical scroll bar is supported.) off: No display; auto: Displayed on demand (The side scroll bar is displayed when you touch it and disappears 2s later.); on: Always displayed."
51        }
52      ],
53      "type": "enum",
54      "options": [
55        {
56          "name": "off"
57        },
58        {
59          "name": "auto"
60        },
61        {
62          "name": "on"
63        }
64      ]
65    },
66    {
67      "name": "scrolleffect",
68      "required": false,
69      "description": [
70        {
71          "name": "Scroll effect. Available values are as follows: spring: Similar to the physical dynamic effect of a spring. After scrolling to the edge, you can continue to scroll for a distance based on the initial speed or by using a touch event. After you release your hand, the screen is rebounded; fade: Similar to the physical dynamic effect of fade. When you scroll to the edge, a wave shape fades. The fade changes according to the speed and scrolling distance; no: No effect after the scroll bar is moved to the edge."
72        }
73      ],
74      "type": "enum",
75      "options": [
76        {
77          "name": "spring"
78        },
79        {
80          "name": "fade"
81        },
82        {
83          "name": "no"
84        }
85      ]
86    },
87    {
88      "name": "divider",
89      "required": false,
90      "description": [
91        {
92          "name": "Whether list items are separated by dividers.For details about divider styles, see divider-color, divider-height, divider-length, and divider-origin in the Styles table."
93        }
94      ],
95      "type": "enum",
96      "options": [
97        {
98          "name": "true"
99        },
100        {
101          "name": "false"
102        }
103      ]
104    },
105    {
106      "name": "shapemode",
107      "required": false,
108      "description": [
109        {
110          "name": "Shape of the side scroll bar. default: Not specified (following the theme); rect: Rectangle; round: Circle."
111        }
112      ],
113      "type": "enum",
114      "options": [
115        {
116          "name": "default"
117        },
118        {
119          "name": "rect"
120        },
121        {
122          "name": "round"
123        }
124      ]
125    },
126    {
127      "name": "updateeffect",
128      "required": false,
129      "description": [
130        {
131          "name": "Whether a dynamic effect is displayed when an item in the list is deleted or added. false: No dynamic effect is displayed; true: A dynamic effect is displayed when an item is added or deleted."
132        }
133      ],
134      "type": "enum",
135      "options": [
136        {
137          "name": "true"
138        },
139        {
140          "name": "false"
141        }
142      ]
143    },
144    {
145      "name": "initialindex",
146      "required": false,
147      "description": [
148        {
149          "name": "Item displayed at the start position of the viewport when the current list is loaded for the first time. The default value is 0, indicating that the first item is displayed. If the number you set is greater than the index of the last item, the setting does not take effect. When the initialoffset attribute is set, the current attribute does not take effect."
150        }
151      ],
152      "type": "number"
153    },
154    {
155      "name": "initialoffset",
156      "required": false,
157      "description": [
158        {
159          "name": "The start offset of the viewport when the current list is loaded for the first time. The offset cannot exceed the scrolling range of the current list. Otherwise, the offset is truncated to the maximum value of the scrolling range."
160        }
161      ],
162      "type": "length"
163    },
164    {
165      "name": "selected",
166      "required": false,
167      "description": [
168        {
169          "name": "Selected item in the current list. The value can be a section value of any list items."
170        }
171      ],
172      "type": "string"
173    },
174    {
175      "name": "id",
176      "required": false,
177      "description": [
178        {
179          "name": "Unique ID of a component."
180        }
181      ],
182      "type": "string"
183    },
184    {
185      "name": "style",
186      "required": false,
187      "description": [
188        {
189          "name": "Style declaration of a component."
190        }
191      ],
192      "type": "string"
193    },
194    {
195      "name": "class",
196      "required": false,
197      "description": [
198        {
199          "name": "Style class of a component, which is used to refer to a style table."
200        }
201      ],
202      "type": "string"
203    },
204    {
205      "name": "disabled",
206      "required": false,
207      "description": [
208        {
209          "name": "Whether the component is disabled. If the component is disabled, the component cannot respond to user interaction."
210        }
211      ],
212      "type": "enum",
213      "options": [
214        {
215          "name": "true"
216        },
217        {
218          "name": "false"
219        }
220      ]
221    },
222    {
223      "name": "voicelabel",
224      "required": false,
225      "description": [
226        {
227          "name": "Voice label. When a voice label is triggered, the click event of the component is triggered. NOTE: The voice label takes effect only when the click event is set."
228        }
229      ],
230      "type": "string"
231    },
232    {
233      "name": "subscriptflag",
234      "required": false,
235      "description": [
236        {
237          "name": "Voice subscript switch. Available values are as follows: auto: 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. on: Turn on the voice subscript. off: Turn off the voice subscript. If no customized subscript is set, the subscript is automatically accumulated from 1. NOTE The voice subscript takes effect only when the click event is set."
238        }
239      ],
240      "type": "enum",
241      "options": [
242        {
243          "name": "auto"
244        },
245        {
246          "name": "on"
247        },
248        {
249          "name": "off"
250        }
251      ]
252    },
253    {
254      "name": "subscriptlabel",
255      "required": false,
256      "description": [
257        {
258          "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."
259        }
260      ],
261      "type": "string"
262    },
263    {
264      "name": "scenelabel",
265      "required": false,
266      "description": [
267        {
268          "name": "Available values are as follows: video: 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. audio: 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. page: 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. switch: 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."
269        }
270      ],
271      "type": "enum",
272      "options": [
273        {
274          "name": "video"
275        },
276        {
277          "name": "audio"
278        },
279        {
280          "name": "page"
281        },
282        {
283          "name": "switch"
284        },
285        {
286          "name": "common"
287        }
288      ]
289    },
290    {
291      "name": "accessibilitygroup",
292      "required": false,
293      "description": [
294        {
295          "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."
296        }
297      ],
298      "type": "enum",
299      "options": [
300        {
301          "name": "true"
302        },
303        {
304          "name": "false"
305        }
306      ]
307    },
308    {
309      "name": "accessibilitytext",
310      "required": false,
311      "description": [
312        {
313          "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."
314        }
315      ],
316      "type": "string"
317    },
318    {
319      "name": "accessibilitydescription",
320      "required": false,
321      "description": [
322        {
323          "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."
324        }
325      ],
326      "type": "string"
327    },
328    {
329      "name": "accessibilityimportance",
330      "required": false,
331      "description": [
332        {
333          "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. yes: The current component is selectable for the accessibility service. no: The current component is not selectable for the accessibility service."
334        }
335      ],
336      "type": "string"
337    },
338    {
339      "name": "for",
340      "required": false,
341      "description": [
342        {
343          "name": "Expands the current element based on the configured data list."
344        }
345      ],
346      "type": "string"
347    },
348    {
349      "name": "tid",
350      "required": false,
351      "description": [
352        {
353          "name": "The tid attribute is used to accelerate the for loop. It is used to improve the re-rendering efficiency when data in a loop changes. The 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 identifier."
354        }
355      ],
356      "type": "string"
357    },
358    {
359      "name": "if",
360      "required": false,
361      "description": [
362        {
363          "name": "Whether the element is added or removed."
364        }
365      ],
366      "type": "enum",
367      "options": [
368        {
369          "name": "true"
370        },
371        {
372          "name": "false"
373        }
374      ]
375    },
376    {
377      "name": "elif",
378      "required": false,
379      "description": [],
380      "type": "enum",
381      "options": [
382        {
383          "name": "true"
384        },
385        {
386          "name": "false"
387        }
388      ]
389    },
390    {
391      "name": "else",
392      "required": false,
393      "description": [],
394      "type": "string"
395    },
396    {
397      "name": "show",
398      "required": false,
399      "description": [
400        {
401          "name": "Whether the element is displayed or hidden."
402        }
403      ],
404      "type": "enum",
405      "options": [
406        {
407          "name": "true"
408        },
409        {
410          "name": "false"
411        }
412      ]
413    }
414  ],
415  "events": [],
416  "supportedSubComponents": true,
417  "supportedSubComponentsRestriction": [
418    {
419      "name": "list-item",
420      "level": 2
421    }
422  ],
423  "unSupportSubComponentsRestriction": [],
424  "parentComponentsRestriction": []
425}
426