Browse Source

[stdf]Update ActionSheet compoent and documents.

dufu1991 1 năm trước cách đây
mục cha
commit
29a46fb136

+ 7 - 4
doc/components/actionSheet/guide.md

@@ -10,10 +10,13 @@ ActionSheet 动作面板是在 Popup 基础上封装的,通过预先定义一
 
 ActionSheet 的 actions 属性是一个数组,数组中的每一项都是一个对象,对象属性参考 Action Props。
 
-## ActionSheet、Picker、Radio
+## Radio、ActionSheet、IndexBar、Picker、AsyncPicker 区别
 
-ActionSheet、Picker、Radio 三者都是给出数据,让用户进行数据选择或执行一些操作,但何时使用哪个组件呢?
+Radio、Checkbox、ActionSheet、IndexBar、Picker、AsyncPicker 组件本质都是给出一系列数据,让用户进行数据选择或执行一些操作,但在使用上有一些区别:
 
-- Radio 一般用于单选数据,数据量固定且较少,需要在 UI 界面上直接展示选项,方便用户在界面交互时对多条数据有个概览,比如性别选择。
+- Radio 一般用于单选数据,数据量固定且较少,需要在 UI 界面上直接展示选项,方便用户在界面交互时对备选数据有个概览,比如性别选择。
+- Checkbox 使用场景类似 Radio,但是可以多选。
 - ActionSheet 一般用于选择之后立即执行一些操作,选项固定且较少,但不需要在 UI 界面上直接展示选项,比如做一些删除、修改等操作。
-- Picker 一般用于选择单条或多条数据,数据量较大或无法确定长度的动态数据,或用于一些联动数据的选择,比如省市区选择。
+- IndexBar 一般用于选择单条数据,数据量非常大的动态数据,且已经对数据进行了分类索引,一般会用整个页面来展示。
+- Picker 一般用于选择单条或多条数据,数据量较大或无法确定长度的动态数据,或用于一些联动数据的选择。**无论是否联动,数据在传入时已经是确定的。**
+- AsyncPicker 一般用于选择多条数据,下级数据是根据上级数据动态获取的,比如服务端接口单次只返回一级数据,需要根据用户选择的一级数据再次请求接口获取下级数据。

+ 8 - 5
doc/components/actionSheet/guide_en.md

@@ -10,10 +10,13 @@ ActionSheet is encapsulated based on Popup. By predefining some Props of Popup,
 
 The actions property of ActionSheet is an array, and each item in the array is an object. The properties of the object refer to Action Props.
 
-## ActionSheet, Picker, Radio
+## Differences between Radio, ActionSheet, IndexBar, Picker, and AsyncPicker
 
-ActionSheet, Picker, and Radio all give data for users to select or perform some operations, but when to use which component?
+Radio, Checkbox, ActionSheet, IndexBar, Picker, and AsyncPicker components essentially provide a series of data for users to select or perform operations, but there are some differences in their usage:
 
-- Radio is generally used for single selection data, with a fixed and relatively small amount of data. It needs to directly display options on the UI interface, and is convenient for users to have an overview of multiple data when interacting with the interface, such as gender selection.
-- ActionSheet is generally used to immediately perform some operations after selection. The options are fixed and relatively small, but there is no need to directly display the options on the UI interface, such as deleting and modifying operations.
-- Picker is generally used to select single or multiple data, dynamic data with a large amount of data or an undetermined length, or for the selection of some linked data, such as province, city, and district selection.
+- Radio is generally used for single selection data with fixed and small amount of options that need to be displayed directly on the UI interface, making it convenient for users to have an overview of alternative data during interface interaction, such as gender selection.
+- Checkbox has similar usage scenarios to Radio, but allows multiple selections.
+- ActionSheet is generally used for immediate operations after selection, with fixed and few options that don't need to be displayed directly on the UI interface, such as delete or modify operations.
+- IndexBar is generally used to select a single piece of data from a very large dynamic dataset that has been categorized with indexes, usually displayed on an entire page.
+- Picker is generally used to select single or multiple pieces of data from large or uncertain length dynamic datasets, or for linked data selection. **Whether linked or not, the data is determined when passed in.**
+- AsyncPicker is generally used to select multiple pieces of data where lower-level data is dynamically obtained based on upper-level data, such as when a server interface only returns one level of data at a time and needs to request the interface again based on the user's first-level selection to get the next level of data.