Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
e6c1764b
D
Docs
项目概览
OpenHarmony
/
Docs
9 个月 前同步成功
通知
158
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
e6c1764b
编写于
10月 18, 2022
作者:
Z
zhengqiyi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change indexer docs
Signed-off-by:
N
zhengqiyi
<
zhengqiyi2@huawei.com
>
上级
8906ce24
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
29 addition
and
25 deletion
+29
-25
zh-cn/application-dev/reference/arkui-ts/ts-container-alphabet-indexer.md
...n-dev/reference/arkui-ts/ts-container-alphabet-indexer.md
+29
-25
未找到文件。
zh-cn/application-dev/reference/arkui-ts/ts-container-alphabet-indexer.md
浏览文件 @
e6c1764b
# AlphabetIndexer
# AlphabetIndexer
字母索引条
。
可以与容器组件联动用于按逻辑结构快速定位容器显示区域的组件
。
> **说明:**
> **说明:**
>
>
...
@@ -18,40 +18,44 @@ AlphabetIndexer(value: {arrayValue: Array<string>, selected: number})
...
@@ -18,40 +18,44 @@ AlphabetIndexer(value: {arrayValue: Array<string>, selected: number})
**参数:**
**参数:**
| 参数名
| 参数类型 | 必填 | 参数描述
|
| 参数名
| 参数类型 | 必填 | 参数描述
|
| --------
-- | ------------------- | ---- | --
-------- |
| --------
| -------- | -------- |
-------- |
| arrayValue | Array
<
string
>
| 是
| 字母索引字符串数组
。 |
| arrayValue | Array
<
string
>
| 是
| 字母索引字符串数组,不可设置为空
。 |
| selected | number | 是 | 初始选中项索引值。 |
| selected | number | 是 | 初始选中项索引值
,若超出索引值范围,则取默认值0
。 |
## 属性
## 属性
| 名称 | 参数类型 | 描述 |
除支持
[
通用属性
](
ts-universal-attributes-size.md
)
外,还支持以下属性:
| ----------------------- | ---------------------------------------- | ----------------------------------- |
| color |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| 设置文字颜色。 |
| 名称 | 参数类型 | 描述 |
| selectedColor |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| 设置选中项文字颜色。 |
| ----------------------- | --------------- | ----------------------------------------------------------- |
| popupColor |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| 设置提示弹窗文字颜色。 |
| color |
[
ResourceColor
](
ts-types.md#resourcecolor
)
| 设置文字颜色。
<br/>
默认值:0x99000000。 |
| selectedBackgroundColor |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| 设置选中项背景颜色。 |
| selectedColor |
[
ResourceColor
](
ts-types.md#resourcecolor
)
| 设置选中项文字颜色。
<br/>
默认值:0xFF254FF7。 |
| popupBackground |
[
ResourceColor
](
ts-types.md#resourcecolor8
)
| 设置提示弹窗背景色。 |
| popupColor |
[
ResourceColor
](
ts-types.md#resourcecolor
)
| 设置提示弹窗文字颜色。
<br/>
默认值:0xFF254FF7。 |
| usingPopup | boolean | 设置是否使用提示弹窗。 |
| selectedBackgroundColor |
[
ResourceColor
](
ts-types.md#resourcecolor
)
| 设置选中项背景颜色。
<br/>
默认值:0x1F0A59F7。 |
| selectedFont |
[
Font
](
ts-types.md#font
)
| 设置选中项文字样式。 |
| popupBackground |
[
ResourceColor
](
ts-types.md#resourcecolor
)
| 设置提示弹窗背景色。
<br/>
默认值:0xFFF1F3F5。 |
| popupFont |
[
Font
](
ts-types.md#font
)
| 设置提示弹窗字体样式。 |
| usingPopup | boolean | 设置是否使用提示弹窗。
<br/>
默认值:false。 |
| font |
[
Font
](
ts-types.md#font
)
| 设置字母索引条默认字体样式。 |
| selectedFont |
[
Font
](
ts-types.md#font
)
| 设置选中项文字样式。
<br/>
默认值:
<br/>
{
<br/>
fontSize:10,
<br/>
fontStyle:FontStyle.Normal,
<br/>
fontWeight:FontWeight.Normal,
<br/>
fontFamily:HarmonyOS Sans
<br/>
} |
| itemSize | string
\|
number | 设置字母索引条字母区域大小,字母区域为正方形,即正方形边长。 |
| popupFont |
[
Font
](
ts-types.md#font
)
| 设置提示弹窗字体样式。
<br/>
默认值:
<br/>
{
<br/>
fontSize:10,
<br/>
fontStyle:FontStyle.Normal,
<br/>
fontWeight:FontWeight.Normal,
<br/>
fontFamily:HarmonyOS Sans
<br/>
} |
| alignStyle | IndexerAlign | 设置字母索引条弹框的对齐样式,支持弹窗显示在索引条右侧和左侧。
<br/>
默认值:IndexerAlign.Right |
| font |
[
Font
](
ts-types.md#font
)
| 设置字母索引条默认字体样式。
<br/>
默认值:
<br/>
{
<br/>
fontSize:10,
<br/>
fontStyle:FontStyle.Normal,
<br/>
fontWeight:FontWeight.Normal,
<br/>
fontFamily:HarmonyOS Sans
<br/>
} |
| selected | number | 设置选中项索引值。 |
| itemSize | string
\|
number | 设置字母索引条字母区域大小,字母区域为正方形,即正方形边长。
<br/>
默认值:24.0。 |
| popupPosition |
[
Position
](
ts-types.md#position8
)
| 设置弹出窗口相对于索引器条上边框中点的位置。 |
| alignStyle | IndexerAlign | 设置字母索引条弹框的对齐样式,支持弹窗显示在索引条右侧和左侧。
<br/>
默认值:IndexerAlign.Right。 |
| selected | number | 设置选中项索引值。
<br/>
默认值:0。 |
| popupPosition |
[
Position
](
ts-types.md#position8
)
| 设置弹出窗口相对于索引器条上边框中点的位置。
<br/>
默认值:{x:96.0, y:48.0}。 |
## IndexerAlign枚举说明
## IndexerAlign枚举说明
| 名称
| 描述
|
| 名称
| 描述
|
| -----
| ---
-------- |
| -----
--- |
-------- |
| Left
| 弹框显示在索引条右侧。 |
| Left | 弹框显示在索引条右侧。 |
| Right | 弹框显示在索引条左侧。 |
| Right | 弹框显示在索引条左侧。 |
## 事件
## 事件
| 名称 | 功能描述 |
仅支持以下事件:
| ---------------------------------------- | ---------------------------------------- |
| 名称 | 功能描述 |
| -------- | -------- |
| onSelected(callback:
(index:
number)
=
>
void)
<sup>
(deprecated)
</sup>
| 索引条选中回调,返回值为当前选中索引。 |
| onSelected(callback:
(index:
number)
=
>
void)
<sup>
(deprecated)
</sup>
| 索引条选中回调,返回值为当前选中索引。 |
| onSelect(callback:
(index:
number)
=
>
void)
<sup>
8+
</sup>
| 索引条选中回调,返回值为当前选中索引。 |
| onSelect(callback:
(index:
number)
=
>
void)
<sup>
8+
</sup>
| 索引条选中回调,返回值为当前选中索引。 |
| onRequestPopupData(callback:
(index:
number)
=
>
Array
<
string
>
)
<sup>
8+
</sup>
| 选中字母索引后,请求索引提示弹窗显示内容回调。
<br/>
返回值:索引对应的字符串数组,此字符串数组在弹窗中竖排显示,字符串列表最多显示5个,超出部分可以滑动显示。 |
| onRequestPopupData(callback:
(index:
number)
=
>
Array
<
string
>
)
<sup>
8+
</sup>
| 选中字母索引后,请求索引提示弹窗显示内容回调。
<br/>
返回值:索引对应的字符串数组,此字符串数组在弹窗中竖排显示,字符串列表最多显示5个,超出部分可以滑动显示。 |
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录