Skip to content

Commit

Permalink
docs(react): improve schema static declarations document (#1310)
Browse files Browse the repository at this point in the history
  • Loading branch information
liuweiGL authored Apr 27, 2021
1 parent 388288a commit 02aee29
Showing 1 changed file with 7 additions and 25 deletions.
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

0 comments on commit 02aee29

Please sign in to comment.