Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/developer-guide/theme/api-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ description: 记录每一个版本的主题 API 变更记录,方便开发者
### 表单定义 > 新增 `array` 组件

在 2.22.0 中,我们为 FormKit 表单新增了 `array` 组件,用于定义一组数据,并计划使用 `array` 组件替换原有的 `repeater` 组件。详细文档可查阅:[表单定义#array](../../developer-guide/form-schema.md#array)

### 文章 Finder API > 修改 `cursor(postName)` 返回结构

我们修改了文章 Finder API 中 `cursor(postName)` 方法的返回体结构,移除了 `current` 字段,并修改了 `previous` 和 `next` 字段类型为 `ListedPostVo`,并明确了上一篇文章是指发布时间较当前文章更早的文章,下一篇文章是指发布时间较当前文章更新的文章。详细文档可查阅:[文章 Finder API#cursor](../../developer-guide/theme/finder-apis/post.md#cursor)。
9 changes: 6 additions & 3 deletions docs/developer-guide/theme/finder-apis/post.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ postFinder.cursor(postName);

根据文章的 `metadata.name` 获取相邻的文章(上一篇 / 下一篇)。

:::info 提示
上一篇文章是指发布时间较当前文章更早的文章,下一篇文章是指发布时间较当前文章更新的文章。
:::

### 参数

1. `postName:string` - 文章的唯一标识 `metadata.name`。
Expand Down Expand Up @@ -448,9 +452,8 @@ postFinder.archives(page, size, year, month);

```json title="NavigationPostVo"
{
"previous": "#PostVo", // 上一篇文章
"current": "#PostVo", // 当前文章
"next": "#PostVo" // 下一篇文章
"previous": "#ListedPostVo", // 上一篇文章,发布时间较当前文章更早的文章
"next": "#ListedPostVo" // 下一篇文章,发布时间较当前文章更新的文章
}
```

Expand Down