Skip to content

Commit 66b7f11

Browse files
committed
docs: improve text in filter/tabs example
1 parent 9cc645b commit 66b7f11

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/guide/use-with-filter-or-tabs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ export default {
6363
};
6464
```
6565

66-
In the script, we set default values for `select` (`newsType: 'story'`) and `identifier` (`infiniteId: +new Date()`) properties, then add the type parameter in API request logic. And we create the `changeType` method to reset the list data and infinite component. Please note, we must change the `identifier` property (`this.infiniteId += 1`) *after* we empty the list (`this.list = []`). Otherwise, the component may not trigger the `infinite` event immediately after reset.
66+
In the script, we set default values for `select` and `identifier` properties, then add the type parameter in API request logic. And we create the `changeType` method to reset the list data and infinite component. Please note, we must change the `identifier` property *after* we empty the `list`. Otherwise, the component may not trigger the `infinite` event immediately after reset.
6767

6868
That's all, you're done!

docs/zh/guide/use-with-filter-or-tabs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ export default {
6363
};
6464
```
6565

66-
在这段脚本中,我们为 `select``identifier` 属性设定了默认值,然后在 API 请求逻辑中添加了类型参数。我们还创建了一个 `changeType` 方法用于重设列表数据和加载组件,请注意,我们必须在清空列表之后再改变 `identifier` 属性,否则组件将可能无法在重设之后立即触发 `infinite` 事件。
66+
在这段脚本中,我们为 `select``identifier` 属性设定了默认值,然后在 API 请求逻辑中添加了类型参数。我们还创建了一个 `changeType` 方法用于重设列表数据和加载组件,请注意,我们必须**在清空列表之后**再改变 `identifier` 属性,否则组件将可能无法在重设之后立即触发 `infinite` 事件。
6767

6868
恭喜,你已经搞定了!

0 commit comments

Comments
 (0)