From a2232bf8d521a9cc39e72b941f9976a903f9a6e3 Mon Sep 17 00:00:00 2001 From: weinanyang <90443688+weinianyang@users.noreply.github.com> Date: Thu, 25 Aug 2022 10:48:20 +0800 Subject: [PATCH] fix(SplitButton): fix typescript type error , close #4037 #4047 (#4048) * fix(SplitButton): optimize ts, close #4037 #4047 * chore(*): add ts, close #40337 #4047 #4044 * chore(*): update upload itemRender ts, close #40337 #4047 #4044 --- types/split-button/index.d.ts | 6 ++++++ types/tree-select/index.d.ts | 5 +++++ types/upload/index.d.ts | 20 ++++++++++++++++++++ 3 files changed, 31 insertions(+) diff --git a/types/split-button/index.d.ts b/types/split-button/index.d.ts index f63541a0d2..2270a127b0 100644 --- a/types/split-button/index.d.ts +++ b/types/split-button/index.d.ts @@ -120,6 +120,12 @@ export interface SplitButtonProps extends HTMLAttributesWeak, CommonProps { * 透传给 左侧按钮 的属性 */ leftButtonProps?: ButtonProps; + + /** + * 是否跟随滚动 + */ + followTrigger?: boolean; + } export default class SplitButton extends React.Component { diff --git a/types/tree-select/index.d.ts b/types/tree-select/index.d.ts index 461b106de9..30e7f630db 100644 --- a/types/tree-select/index.d.ts +++ b/types/tree-select/index.d.ts @@ -214,6 +214,11 @@ export interface TreeSelectProps extends HTMLAttributesWeak, CommonProps { filterLocal?: boolean; immutable?: boolean; + + /** + * 填充到选择框里的值的 key,默认是 value + */ + fillProps?: string; } export default class TreeSelect extends React.Component {} diff --git a/types/upload/index.d.ts b/types/upload/index.d.ts index e4628b38e6..0576952cfe 100644 --- a/types/upload/index.d.ts +++ b/types/upload/index.d.ts @@ -200,6 +200,16 @@ export interface CardProps extends HTMLAttributesWeak, CommonProps { * 调用系统设备媒体 */ capture?: string; + + /** + * 自定义成功和失败的列表渲染方式 + */ + itemRender?: (file: File, obj: { remove?: () => void }) => React.ReactNode; + + /** + * 选择新文件上传并替换 + */ + reUpload?: boolean; } export class Card extends React.Component {} @@ -480,6 +490,16 @@ export interface UploadProps extends HTMLAttributesWeak, CommonProps { * @version 1.24 */ previewOnFileName?: boolean, + + /** + * 自定义成功和失败的列表渲染方式 + */ + itemRender?: (file: File, obj: { remove?: () => void }) => React.ReactNode; + + /** + * 选择新文件上传并替换 + */ + reUpload?: boolean; } export default class Upload extends React.Component {