Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

完善 schema 模块的静态方法使用说明 #1310

Merged
merged 2 commits into from
Apr 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 7 additions & 25 deletions packages/react/docs/api/shared/Schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,31 +443,9 @@ import { Schema } from '@formily/react'
Schema.registerVoidComponents(['card', 'tab', 'step'])
```

### registerTypeDefaultComponents

#### 描述

给 Schema 类型标识默认组件类型

#### 签名

```ts
interface registerTypeDefaultComponents {
(maps: Record<string, string>): void
}
```

#### 用例

```ts
import { Schema } from '@formily/react'

Schema.registerTypeDefaultComponents({
string: 'Input',
number: 'NumberPicker',
array: 'ArrayTable',
})
```
<Alert type="warning">
注意,该 api 需要配合 <code>enablePolyfills(['1.0'])</code> 使用
</Alert>

### registerTypeDefaultComponents

Expand Down Expand Up @@ -495,6 +473,10 @@ Schema.registerTypeDefaultComponents({
})
```

<Alert type="warning">
注意,该 api 需要配合 <code>enablePolyfills(['1.0'])</code> 使用
</Alert>

### registerPolyfills

#### 描述
Expand Down