Skip to content

Commit 3e3e7bd

Browse files
EmilyMBPeachScript
authored andcommitted
docs: improve words for the en filter/tabs example page (PeachScript#193)
1 parent e0512d1 commit 3e3e7bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ previewLink: //jsfiddle.net/PeachScript/w197rfy0/embedded/result/
44

55
# Use With Filter/Tabs
66

7-
The loading process is exactly same as the previous example, the key point is how to reset the component when we changing filter or tabs. In fact, this component will reset itself whenever the `identifier` is changed, sounds ease, let's do it!
7+
The loading process is exactly same as in the previous example. The key point here is how to reset the component when we change the filter or tabs. The infinite component will reset itself whenever the `identifier` property has changed. It sounds easy, so let's do it!
88

99
``` html {12}
1010
<header>
@@ -21,7 +21,7 @@ The loading process is exactly same as the previous example, the key point is ho
2121
<infinite-loading :identifier="infiniteId" @infinite="infiniteHandler"></infinite-loading>
2222
```
2323

24-
In the template, we add a `select` element and listen it's `change` event, for `InfiniteLoading` component, we add an `identifier` property.
24+
In the template, we add a `select` element and listen its `change` event. For the `InfiniteLoading` component, we add an `identifier` property.
2525

2626
``` js {10,11,19,31,32,33,34,35}
2727
import axios from 'axios';
@@ -63,6 +63,6 @@ export default {
6363
};
6464
```
6565

66-
In the script, we set default values for `select` and `identifier` property, then add the type parameter in API request logic. And we create the `changeType` method to reset the list data and infinite component, please pay attention, we must change the `identifier` property after empty list, if not, the component may not trigger the `infinite` event immediately after reset.
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.
6767

68-
That's all, you have done it!
68+
That's all, you're done!

0 commit comments

Comments
 (0)