From 9c1de39cc69dc2efac6054a4b92c62e829694ddc Mon Sep 17 00:00:00 2001 From: geekact Date: Mon, 9 Oct 2023 23:22:55 +0800 Subject: [PATCH] docs: fix usage for computed [skip ci] --- docs/api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api.md b/docs/api.md index 93a9bf5..2033274 100644 --- a/docs/api.md +++ b/docs/api.md @@ -100,7 +100,7 @@ const loading = useLoading(userModel.create, userModel.update, ...); 使用频率::star2::star2::star2: -配合 computed 计算属性使用。 +配合 computed 计算属性使用。携带参数的情况下,则从第二个参数开始依次传入 ```tsx import { useComputed } from 'foca'; @@ -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; }, },