Skip to content

Commit

Permalink
docs: add type definition of x-linkages and x-mega-props (#876)
Browse files Browse the repository at this point in the history
  • Loading branch information
Empireo authored May 28, 2020
1 parent 54012b4 commit c93b517
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/zh-cn/schema-develop/form-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ Schema 开发,最核心的就是 Schema,只有我们理解了这套协议之
| x-rules | 字段校验规则,详细描述可以往后看 | [ValidatePatternRules](#validatepatternrules) |
| x-component | 字段 UI 组件名称,大小写不敏感 | `string` |
| x-component-props | 字段 UI 组件属性 | `{}` |
| x-linkages | 字段间联动协议,详细描述可以往后看 | `Array<{ target: FormPathPattern, type: string, [key: string]: any }>` |
| x-mega-props | 字段布局属性 | `{ [name: string]: any }` |

## x-props 扩展属性

Expand Down
6 changes: 6 additions & 0 deletions packages/antd/README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -1967,6 +1967,12 @@ interface ISchema {
['x-props']?: { [name: string]: any }
['x-index']?: number
['x-rules']?: ValidatePatternRules
['x-linkages']?: Array<{
target: FormPathPattern
type: string
[key: string]: any
}>
['x-mega-props']?: { [name: string]: any }
['x-component']?: string
['x-component-props']?: { [name: string]: any }
['x-render']?: <T = ISchemaFieldComponentProps>(
Expand Down
6 changes: 6 additions & 0 deletions packages/next/README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -2023,6 +2023,12 @@ interface ISchema {
['x-props']?: { [name: string]: any }
['x-index']?: number
['x-rules']?: ValidatePatternRules
['x-linkages']?: Array<{
target: FormPathPattern
type: string
[key: string]: any
}>
['x-mega-props']?: { [name: string]: any }
['x-component']?: string
['x-component-props']?: { [name: string]: any }
['x-render']?: <T = ISchemaFieldComponentProps>(
Expand Down
6 changes: 6 additions & 0 deletions packages/react-schema-renderer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1769,6 +1769,12 @@ interface ISchema {
['x-props']?: { [name: string]: any }
['x-index']?: number
['x-rules']?: ValidatePatternRules
['x-linkages']?: Array<{
target: FormPathPattern
type: string
[key: string]: any
}>
['x-mega-props']?: { [name: string]: any }
['x-component']?: string
['x-component-props']?: { [name: string]: any }
['x-render']?: <T = ISchemaFieldComponentProps>(
Expand Down
2 changes: 2 additions & 0 deletions packages/react-schema-renderer/README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,8 @@ cleanRegistry(): void
| x-component-props | 字段 UI 组件属性 | `{}` |
| x-render | 字段扩展渲染函数 | `<T = ISchemaFieldComponentProps>(props: T & { renderComponent: () => React.ReactElement}) => React.ReactElement` |
| x-effect | 字段副作用触发器 | `(dispatch: (type: string, payload: any) => void,option?:object) => { [key: string]: any }` |
| x-linkages | 字段间联动协议,详细描述可以往后看 | `Array<{ target: FormPathPattern, type: string, [key: string]: any }>` |
| x-mega-props | 字段布局属性 | `{ [name: string]: any }` |

**方法**

Expand Down

0 comments on commit c93b517

Please sign in to comment.