BulletListItemBlock
概述
BulletListItemBlock 是 Aspose.Words FOSS 中用于 Python 的类。继承自:ListItemBlock。
BulletListItemBlock 通过 marker 属性公开列表标记,通过 start_at 公开起始编号,并通过 get_level() 方法公开其嵌套深度。
此类提供 7 种方法,用于在 Python 程序中处理 BulletListItemBlock 对象。可用的方法包括:__init__、add_child、get_level、get_list_container、get_parent。在安装 Aspose.Words FOSS for Python 包后,所有公共成员对任何 Python 应用程序均可访问。属性:block_level、children、is_first_child、is_last_child、is_level_start、marker,以及另外 5 项。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
marker | `` | 读取 | 获取标记。 |
start_at | `` | 读取 | 获取起始位置。 |
is_level_start | `` | 读取 | 获取 is level start。 |
is_first_child | bool | 读取 | 获取它是否为第一个子项。 |
is_last_child | bool | 读取 | 获取是否为最后一个子项。 |
next_sibling | Optional["Block"] | 读取 | 获取下一个兄弟节点。 |
previous_sibling | Optional["Block"] | 读取 | 获取前一个兄弟节点。 |
block_level | MarkdownBlockLevel | 读取 | 获取块级别。 |
type | `` | 读取 | 获取类型。 |
parent | Optional["Block"] | 读取 | 获取父项。 |
children | list["Block"] | 读取 | 获取子项。 |
方法
| 签名 | 描述 |
|---|---|
__init__(marker: ListMarker) | Calls init(marker) 在此 BulletListItemBlock 实例上。 |
__init__(block_type: BlockType, marker: ListMarker, start_at: int) | Calls init(block_type, marker, start_at) 在此 BulletListItemBlock 实例上。 |
get_level() → int | 基于 0 的嵌套深度:有多少上级列表项包含此项。 |
get_list_container() → Optional["ListBlock"] | 返回列表容器。 |
__init__(block_type: BlockType) | Calls init在此 BulletListItemBlock 实例上(block_type)。 |
add_child(child: "Block") → "Block" | 在此 BulletListItemBlock 实例上调用 add_child(child)。 |
get_parent() → Optional["Block"] | 沿祖先链向上遍历并返回第一个块,其 |
``type`` is one of *types*, or ``None`` if none matches. |