Skip to content

Commit

Permalink
fix(designable-antd): fix typings
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Jun 28, 2021
1 parent 76a302c commit f73deaf
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion designable/antd/src/schemas/ArrayTable.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ISchema } from '@formily/react'

export const ArrayTable: ISchema = {
export const ArrayTable: ISchema & { Addition?: ISchema } = {
type: 'object',
properties: {
bordered: {
Expand Down
2 changes: 1 addition & 1 deletion designable/antd/src/schemas/Card.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { GlobalRegistry } from '@designable/core'
import { ISchema } from '@formily/react'

export const Card: ISchema = {
export const Card: ISchema & { Addition?: ISchema } = {
type: 'object',
properties: {
title: {
Expand Down
13 changes: 8 additions & 5 deletions designable/antd/src/schemas/Checkbox.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { ISchema } from '@formily/react'

export const Checkbox: ISchema = {
autoFocus: {
type: 'boolean',
'x-decorator': 'FormItem',
'x-component': 'Switch',
export const Checkbox: ISchema & { Group?: ISchema } = {
type: 'object',
properties: {
autoFocus: {
type: 'boolean',
'x-decorator': 'FormItem',
'x-component': 'Switch',
},
},
}
2 changes: 1 addition & 1 deletion designable/antd/src/schemas/DatePicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const CommonDatePickerAPI = {
},
}

export const DatePicker: ISchema = {
export const DatePicker: ISchema & { RangePicker?: ISchema } = {
type: 'object',
properties: {
picker: {
Expand Down
2 changes: 1 addition & 1 deletion designable/antd/src/schemas/FormTab.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { GlobalRegistry } from '@designable/core'
import { ISchema } from '@formily/react'

export const FormTab: ISchema = {
export const FormTab: ISchema & { TabPane?: ISchema } = {
type: 'object',
properties: {
animated: {
Expand Down
2 changes: 1 addition & 1 deletion designable/antd/src/schemas/Input.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ISchema } from '@formily/react'

export const Input: ISchema = {
export const Input: ISchema & { TextArea?: ISchema } = {
type: 'object',
properties: {
addonBefore: {
Expand Down
13 changes: 8 additions & 5 deletions designable/antd/src/schemas/Radio.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { ISchema } from '@formily/react'

export const Radio: ISchema = {
autoFocus: {
type: 'boolean',
'x-decorator': 'FormItem',
'x-component': 'Switch',
export const Radio: ISchema & { Group?: ISchema } = {
type: 'object',
properties: {
autoFocus: {
type: 'boolean',
'x-decorator': 'FormItem',
'x-component': 'Switch',
},
},
}

Expand Down
2 changes: 1 addition & 1 deletion designable/antd/src/schemas/TimePicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export const CommonTimePickerAPI = {
},
}

export const TimePicker: ISchema = {
export const TimePicker: ISchema & { RangePicker?: ISchema } = {
type: 'object',
properties: CommonTimePickerAPI,
}
Expand Down

0 comments on commit f73deaf

Please sign in to comment.