diff --git a/packages/client/src/api-client/demos/demo3.tsx b/packages/client/src/api-client/demos/demo3.tsx
index bf47a55f8..44070dcf5 100644
--- a/packages/client/src/api-client/demos/demo3.tsx
+++ b/packages/client/src/api-client/demos/demo3.tsx
@@ -1,5 +1,6 @@
+import { uid } from '@formily/shared';
import { APIClient, APIClientProvider, useAPIClient, useRequest } from '@nocobase/client';
-import { Button, Table } from 'antd';
+import { Button, Input, Space, Table } from 'antd';
import MockAdapter from 'axios-mock-adapter';
import React from 'react';
@@ -14,8 +15,8 @@ mock.onGet('/users:list').reply(async () => {
200,
{
data: [
- { id: 1, name: 'John Smith' },
- { id: 2, name: 'James' },
+ { id: 1, name: uid() },
+ { id: 2, name: uid() },
],
},
];
@@ -46,14 +47,20 @@ const ComponentA = () => {
const ComponentB = () => {
console.log('ComponentB');
const apiClient = useAPIClient();
- return ;
+ return (
+
+
+
= { export function useRequest
( service: AxiosRequestConfig
| ResourceActionOptions
| FunctionService,
- options?: Options