Skip to content

Commit

Permalink
docs: fix usage for computed [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
geekact committed Oct 9, 2023
1 parent 626b8d5 commit 9c1de39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const loading = useLoading(userModel.create, userModel.update, ...);

使用频率::star2::star2::star2:

配合 computed 计算属性使用。
配合 computed 计算属性使用。携带参数的情况下,则从第二个参数开始依次传入

```tsx
import { useComputed } from 'foca';
Expand All @@ -115,7 +115,7 @@ const userModel = defineModel('user', {
fullName() {
return this.state.firstName + '.' + this.state.lastName;
},
profile(state, age: number) {
profile(age: number) {
return this.fullName() + '-' + age;
},
},
Expand Down

0 comments on commit 9c1de39

Please sign in to comment.