Skip to content

Commit

Permalink
refactor(comp:*): fix the customAdditional type error (#1124)
Browse files Browse the repository at this point in the history
  • Loading branch information
danranVm committed Sep 8, 2022
1 parent 141e05e commit 963e484
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/components/_private/checkable-list/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const checkableListProps = {
default: false,
},
checked: Function as PropType<(item: CheckableListData) => boolean>,
customAdditional: { type: Object as PropType<CheckableListCustomAdditional>, default: undefined },
customAdditional: { type: Function as PropType<CheckableListCustomAdditional>, default: undefined },
disabled: Function as PropType<(item: CheckableListData) => boolean>,
getKey: Function as PropType<(item: CheckableListData) => VKey>,
labelKey: String,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/cascader/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const cascaderProps = {
childrenKey: { type: String, default: undefined },
clearable: { type: Boolean, default: false },
clearIcon: { type: String, default: undefined },
customAdditional: { type: Object as PropType<CascaderCustomAdditional>, default: undefined },
customAdditional: { type: Function as PropType<CascaderCustomAdditional>, default: undefined },
dataSource: { type: Array as PropType<CascaderData[]>, default: () => [] },
disabled: { type: Boolean, default: false },
empty: { type: [String, Object] as PropType<string | EmptyProps>, default: undefined },
Expand Down
2 changes: 1 addition & 1 deletion packages/components/menu/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const menuProps = {
type: Boolean,
default: false,
},
customAdditional: { type: Object as PropType<MenuCustomAdditional>, default: undefined },
customAdditional: { type: Function as PropType<MenuCustomAdditional>, default: undefined },
dataSource: Array as PropType<MenuData[]>,
getKey: {
type: [String, Function] as PropType<string | ((data: MenuData<any>) => any)>,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/select/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const selectPanelProps = {
selectedKeys: { type: Array as PropType<VKey[]>, default: undefined },
childrenKey: { type: String, default: undefined },

customAdditional: { type: Object as PropType<SelectCustomAdditional>, default: undefined },
customAdditional: { type: Function as PropType<SelectCustomAdditional>, default: undefined },
dataSource: { type: Array as PropType<SelectData[]>, default: undefined },
empty: { type: [String, Object] as PropType<string | EmptyProps>, default: undefined },
getKey: { type: [String, Function] as PropType<string | ((data: SelectData<any>) => any)>, default: undefined },
Expand Down
2 changes: 1 addition & 1 deletion packages/components/transfer/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const transferProps = {
default: undefined,
},
clearIcon: String,
customAdditional: { type: Object as PropType<TransferCustomAdditional>, default: undefined },
customAdditional: { type: Function as PropType<TransferCustomAdditional>, default: undefined },
dataSource: {
type: Array as PropType<TransferData[]>,
default: (): TransferData[] => [],
Expand Down
2 changes: 1 addition & 1 deletion packages/components/tree-select/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const treeSelectProps = {
clearable: { type: Boolean, default: false },
clearIcon: { type: String, default: undefined },
checkStrategy: { type: String as PropType<TreeCheckStrategy>, default: 'all' },
customAdditional: { type: Object as PropType<TreeSelectCustomAdditional>, default: undefined },
customAdditional: { type: Function as PropType<TreeSelectCustomAdditional>, default: undefined },
dataSource: { type: Array as PropType<TreeSelectNode[]>, default: () => [] },
disabled: { type: Boolean, default: false },
draggable: { type: Boolean, default: false },
Expand Down
2 changes: 1 addition & 1 deletion packages/components/tree/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const treeProps = {
type: Boolean,
default: false,
},
customAdditional: { type: Object as PropType<TreeCustomAdditional>, default: undefined },
customAdditional: { type: Function as PropType<TreeCustomAdditional>, default: undefined },
dataSource: {
type: Array as PropType<TreeNode[]>,
default: (): TreeNode[] => [],
Expand Down
2 changes: 1 addition & 1 deletion packages/pro/tree/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const proTreeProps = {
childrenKey: { type: String, default: undefined },
cascaderStrategy: { type: String as PropType<TreeCheckStrategy>, default: 'all' },
clearIcon: { type: String, default: undefined },
customAdditional: { type: Object as PropType<TreeCustomAdditional>, default: undefined },
customAdditional: { type: Function as PropType<TreeCustomAdditional>, default: undefined },
collapsed: { type: Boolean, default: undefined },
collapsedWidth: { type: Number, default: 44 },
collapseIcon: { type: Array as PropType<string[]>, default: undefined },
Expand Down

0 comments on commit 963e484

Please sign in to comment.