import type { Form, Field, IGeneralFieldState } from '@formily/core'; import type { ISchema, SchemaEnum, SchemaTypes } from '@formily/react'; import type { TabsProps, TableProps, ColumnType, PaginationProps, ButtonProps, ModalProps, DrawerProps, TooltipProps, ListProps, TagProps, PopoverProps, EmptyProps, AvatarProps } from 'antd'; import { UploadFile } from 'antd/lib/upload/interface'; import { TableRowSelection } from 'antd/lib/table/interface'; import { ReactNode } from 'react'; export declare type IJsonForm = Form; export declare type IJsonField = Field; export declare type ISchemaField = ISchema; export declare interface CustomComponentProps { schema: ISchema; field: Field; [propName: string]: any; } export interface Dict { dictName: string; dictValue: number; extParams?: any; subList?: any; } export declare interface checkData { value?: string; label?: string; disabled?: boolean; checkboxDisabled?: boolean; children?: checkData[]; [propName: string]: any; } export declare type SizeType = 'small' | 'middle' | 'large' | undefined; export interface YwTitleProps { /** 主标题内容 */ text: string; /** 副标题 */ subtitle?: string; /** 标题尺寸 */ size?: 'l' | 'm' | 's'; /** 自定义内容 */ children?: React.ReactNode; /** 样式 */ style?: React.CSSProperties; } export interface TabItem { tab: string; key: string | number; content?: string | React.ReactNode; /** 红点提示 */ dot?: boolean; /** 数量提示 */ count?: number; /** 是否显示 */ visible?: boolean; /** 偏移量 */ offset?: [number, number]; } export declare type TabItems = TabItem[]; export interface YwTabProps extends Pick { /** 样式 */ style?: React.CSSProperties; /** 形态 ,默认pure */ shape?: 'pure' | 'wrapped' | 'capsule'; /** tab项 */ dataSource: TabItems; children?: ReactNode; } export interface ColumnItem extends ColumnType { /** 标题 */ title: string | React.ReactNode; dataIndex: string; width?: number; /** 组件 */ component?: 'MultipleCol' | 'Time' | 'Person' | 'Operates' | 'Status' | 'Tags' | 'DetailInfo' | 'Price' | 'CopyCol' | 'IndexCol' | 'EmptyCol' | 'LongText2Ellipsis'; /** 组件入参 */ componentProps?: { [propsName: string]: any; }; /** 列的对齐方式 */ align?: 'left' | 'right' | 'center'; /** 数据映射 */ formatValues?: (any: any, RecordType: any, number: any) => any; } export interface ButtonItem extends Omit { type: 'batch' | 'left' | 'action'; } export interface ListRes { list?: Array<{ [propName: string]: any; }>; totalNumber?: number; maxNumberLimit?: number; totalPage?: number; rowId?: string; hasNext?: any; pageSize?: number; pageIndex?: number; } export declare type GetTableData = (params: { pageIndex?: string; pageSize?: string; [propName: string]: any; }, config?: any) => Promise; export interface RowSelection extends TableRowSelection { hideSelectTotal?: boolean; } export declare type ColumnItems = Array>; export declare type ButtonItems = ButtonItem[]; export interface YwTableProps extends Omit, 'rowSelection' | 'columns'> { /** 表格筛选参数 */ filterProps?: Array<{ [propName: string]: any; }>; /** 样式 */ style?: React.CSSProperties; /** 顶部显示总数 */ showTotal?: boolean; /** Table列信息 同 antd columns */ columns: ColumnItems; /** 操作区配置项 */ buttons?: ButtonItems; /** 列表高度 虚拟列表使用 */ rowHeight?: number; /** 行对齐方式 */ rowAlign?: 'top' | 'middle'; /** 开启虚拟列表 */ useVirtual?: boolean; /** 滚动事件 虚拟列表生效 */ onScroll?: ({ scrollTop, scrollLeft }: { scrollTop: number; scrollLeft: number; }) => void; /** 分页 */ rowSelection?: RowSelection; /** 类型 */ tableType?: 'default' | 'group' | 'summary'; /** 获取数据 */ getTableData?: GetTableData; /** 分组表单头部内容 */ renderGroupTitle?: (any: any) => JSX.Element; /** 总数量渲染函数 */ renderTotal?: (total: any) => JSX.Element; /** 空数据渲染 */ renderEmpty?: () => JSX.Element; } declare type ValidatorFormats = 'url' | 'email' | 'ipv6' | 'ipv4' | 'number' | 'integer' | 'idcard' | 'qq' | 'phone' | 'money' | 'zh' | 'date' | 'zip' | (string & {}); export interface IValidateResult { type: 'error' | 'warning' | 'success' | (string & {}); message: string; } export interface IValidatorRules { triggerType?: 'onInput' | 'onFocus' | 'onBlur'; format?: ValidatorFormats; validator?: ValidatorFunction; required?: boolean; pattern?: RegExp | string; max?: number; maximum?: number; exclusiveMaximum?: number; exclusiveMinimum?: number; minimum?: number; min?: number; len?: number; whitespace?: boolean; enum?: any[]; const?: any; multipleOf?: number; uniqueItems?: boolean; maxProperties?: number; minProperties?: number; maxItems?: number; maxLength?: number; minItems?: number; minLength?: number; message?: string; [key: string]: any; } declare type ValidatorFunctionResponse = null | string | boolean | IValidateResult; declare type ValidatorFunction = (value: any, rule: IValidatorRules, ctx: Context) => ValidatorFunctionResponse | Promise | null; declare type ValidatorDescription = ValidatorFormats | ValidatorFunction | IValidatorRules; declare type MultiValidator = Array>; declare type FieldValidator = ValidatorDescription | MultiValidator; declare type SchemaReactionEffect = 'onFieldInit' | 'onFieldMount' | 'onFieldUnmount' | 'onFieldValueChange' | 'onFieldInputValueChange' | 'onFieldInitialValueChange' | 'onFieldValidateStart' | 'onFieldValidateEnd' | 'onFieldValidateFailed' | 'onFieldValidateSuccess'; declare type SchemaReaction = { dependencies?: string[] | Record; when?: string | boolean; target?: string; effects?: SchemaReactionEffect[]; fulfill?: { state?: IGeneralFieldState; schema?: ISchema; run?: string; }; otherwise?: { state?: IGeneralFieldState; schema?: ISchema; run?: string; }; } | ((field: Field) => void); declare type SchemaReactions = SchemaReaction | Array>; export interface IItem { /** 标签名 */ title?: string; /** 字段名 */ name?: string; /** 组件名 */ component?: 'Input' | 'InputGroup' | 'TextArea' | 'Radio' | 'RadioGroup' | 'CheckboxGroup' | 'Switch' | 'NumberPicker' | 'Select' | 'TimePicker' | 'DateTimePicker' | 'WeekPicker' | 'DatePicker' | 'MonthPicker' | 'TimeRangePicker' | 'ArrayCards' | 'ArrayTable' | 'ArrayItems' | 'CascaderSelect' | 'CategorySelect' | 'AreaSelector' | 'Checkbox' | 'DatePicker' | 'DateRangePicker' | 'DateRangeGroup' | 'MonthRangePicker' | 'DateTimeRangePicker' | 'MonthRangePicker' | 'WeekRangePicker' | 'NumberRangePicker' | 'FormGrid' | 'FormGroup' | 'SearchSelect' | 'OrgSeletor' | 'EmpSeletor' | 'TreeSelect'; /** 自定义组件 */ customComponent?: any; /** 组件入参 */ componentProps?: { dataSource?: Array<{ [propName: string]: any; }>; fieldNames?: { label: string; value: string; children?: string; }; dict?: Dict; [propName: string]: any; }; /** 校验规则 */ rules?: FieldValidator; /** 默认值 */ defaultValue?: any; /** 表单项类型 */ type?: SchemaTypes; /** 是否只读 */ disabled?: boolean | Function; /** 表单项入参 */ props?: ISchema['x-decorator-props']; /** 子表单项 */ children?: IItem[]; /** 是否必填 */ required?: boolean; /** items */ items?: IItem; /** 描述信息 */ description?: ISchema['description']; /** 枚举值 */ enum?: SchemaEnum; /** 异步数据源请求uri */ getDataSource?: Function; /** 最小条目数 */ minItems?: Number; /** 最大条目数 */ maxItems?: Number; /** 是否只读 */ readOnly?: boolean; /** 是否显示 */ visible?: boolean; /** 表单装饰器 */ decorator?: ISchema['x-decorator']; /** 字段阅读态 */ preview?: ISchema['x-read-pretty']; /** 联动逻辑 */ reactions?: SchemaReactions; } export interface ILayoutProps { labelAlign?: 'right' | 'left' | Array<'right' | 'left'>; full?: boolean; labelCol?: number | number[]; wrapperCol?: number | number[]; labelWidth?: number; wrapperWidth?: number; columns?: number; grid?: boolean; autoRow?: boolean; colon?: boolean; } export interface IButtons { htmlType: 'submit' | 'reset' | 'button'; children?: React.ReactNode; type?: 'primary' | 'link' | 'default' | 'filter'; size?: 'large' | 'middle' | 'small'; btnText?: string; } export interface IButtonsProps { sticky: boolean; align: 'left' | 'center' | 'right'; } export interface ILinkages { type: string; conditions: Array<{ key: string; value: string; }> | object | undefined; target: string; targetValue: any; } export declare type Items = IItem[]; export interface YwJsonFormProps { /** 样式 */ style?: React.CSSProperties; /** 表单项. */ items: Items; /** 表单默认值. */ initialValues?: any; /** 操作项 */ buttons?: IButtons[]; /** 表单布局项 */ layoutProps?: ILayoutProps; /** 表单尺寸 */ size?: SizeType; /** schemaScope */ schemaScope?: object; /** 是否可编辑(预览态) */ editable?: Form['editable']; /** 是否禁用 */ disabled?: Form['disabled']; /** 操作项入参 */ buttonsProps?: IButtonsProps; /** 校验失败是否滚动至错误位置 */ scrollIntoView?: boolean; /** 表单联动逻辑 */ linkages?: ILinkages[]; /** 提交回调 */ onSubmit?: (values: Form['values']) => void; /** 创建回调 */ onCreate?: (form: Form) => void; /** 表单值变化 */ onValueChange?: (values: any) => void; /** form 示例,不传入组件内部创建 */ form?: Form; } export interface YwFilterProps { /** 样式 */ style?: React.CSSProperties; /** 表单配置项. */ items?: Items; /** label标签内置. */ labelInset?: boolean; /** 最多展示行数. */ maxRows?: number; /** 表单尺寸 */ size?: YwJsonFormProps['size']; /** 最多展示列. */ maxColumns?: number; /** 最少展示列. */ minColumns?: number; /** 列间距. */ columnGap?: number; /** 默认查询条件 */ initialValues?: object; /** 条件缓存 */ cache?: object; /** 表单项宽度 */ itemWidth?: number; /** schemaScope */ schemaScope?: object; /** 是否开启 key enter 查询 */ useKeyPress?: boolean; /** 是否有查询按钮 */ hasSearchBtn?: boolean; /** 开启筛选展开文案详细内容 */ detailedText?: boolean; /** form create */ onCreate?: (form: Form) => void; /** 提交回调 */ onSubmit?: (values: Form['values']) => void; /** 重置 */ onReset?: (form: any) => void; /** 表单值变化 */ onValueChange?: (values: any) => void; } export interface YwFormDialogProps extends ModalProps, Omit { /** 自定义触发元素 */ children?: React.ReactNode; /** 组件受控 */ visible?: boolean; /** 弹窗名称 */ title: string; /** 弹窗尺寸 */ size?: 'xs' | 's' | 'm' | 'l' | 'full'; /** 按钮文字 */ btnText?: string; /** 按钮类型 */ btnType?: 'primary' | 'link' | 'text' | 'ghost' | 'default' | 'dashed'; /** 按钮禁用 */ btnDisabled?: boolean; /** 表单项 同YwJsonForm */ items: Items; /** 表单是否禁用 */ disabled?: boolean; /** 表单是否可编辑 */ editable?: boolean; /** 表单布局 同YwJsonForm */ layoutProps?: ILayoutProps; /** 表单 初始值 */ initialValues?: object; /** 表单 初始完成 */ onFormInit?: (form: any) => void; /** 取消回调 */ onCancel?: () => void; /** 确认回调 */ onConfirm?: (value: { [key: string]: any; }) => Promise | void; /** 弹窗打开回调 */ onOpen?: () => Promise; } export interface YwTableDialogProps extends YwFilterProps, YwTableProps, Pick { /** 组件受控 */ visible?: boolean; /** 弹窗名称 */ title: any; /** 弹窗尺寸 */ size?: 'xs' | 's' | TableProps['size']; /** 按钮文字 */ btnText?: string; /** 按钮类型 */ btnType?: 'primary' | 'link' | 'text' | 'ghost' | 'default' | 'dashed'; /** 按钮禁用 */ btnDisabled?: boolean; /** filter表单项 同YwJsonForm */ filterItems?: Items; /** 表单 初始值 */ /** 自定义触发元素 */ children?: React.ReactNode; /** 关闭回调 */ onClose?: () => void; /** 弹窗打开回调 */ onOpen?: () => Promise; /** 弹窗确定回调 */ onOk?: (keys: any[], data: any[], info: any) => void; /** table初始化回调 */ onTableInit?: (ref: React.Ref) => void; } export interface YwContainer { /** style */ style?: React.CSSProperties; /** className */ className?: string; children?: React.ReactNode; linkages?: any; } export interface YwNoticeProps { /** style */ style?: React.CSSProperties; /** className */ className?: string; /** 文案内容 */ content?: string | string[] | JSX.Element | JSX.Element[]; /** 标题 */ title?: string | JSX.Element; /** 类型 */ type?: 'success' | 'warning' | 'error' | 'notice' | 'help'; /** 是否可关闭 */ closeable?: boolean; /** 自定义icon */ icon?: React.ReactNode; /** 按钮文案 */ btnText?: string; /** 按钮点击事件 */ onClick?: () => void; /** 关闭提示事件 */ onClose?: () => void; } export interface YwContainerProps { /** style */ style?: React.CSSProperties; /** className */ className?: string; /** 联动逻辑 */ linkages?: object[]; /** 加载状态 */ loading?: boolean; /** 数据错误 */ error?: boolean; /** 数据为空 */ empty?: boolean; /** 标题 */ title?: string; } export interface YwButtonProps extends Pick { /** 样式 */ style?: React.CSSProperties; /** className */ className?: string; /** 按钮禁用 */ disabled?: Function | boolean; /** 是否显示 */ visible?: Function | boolean; /** 按钮文字 */ btnText?: string; /** 按钮类型 */ btnType?: ButtonProps['type']; /** 文案右侧icon */ leftIcon?: React.ReactNode; /** 文案左侧icon */ rightIcon?: React.ReactNode; /** 自定义按钮 */ children?: React.ReactNode; } export interface YwDrawerSelectorProps extends Pick, Pick, Pick, 'getTableData' | 'pagination' | 'rowSelection' | 'buttons' | 'columns' | 'rowKey'>, Pick { /** 抽屉标题 */ title?: string | ReactNode; /** 数据展示类型 */ listType?: 'table' | 'card'; /** 确认按钮文案 */ confirmText?: string; /** filter表单项 同YwJsonForm */ filterItems?: YwFilterProps['items'] | undefined; /** 受控模式 抽屉展示 */ visible?: boolean; /** 最大可选数量 */ maxItems?: number; /** 最少可选数量 */ minItems?: number; /** 自定义最大可选数量错误提示 */ renderMaxItemsMessageError?: (maxItems: number) => string; /** 自定义至少数量错误提示 */ renderMinItemsMessageError?: (maxItems: number) => string; /** 非受控模式 触发节点 */ children?: ReactNode; /** 非受控模式 提交按钮 */ onSubmit?: (keys: React.Key[], data: any[]) => Promise; /** 关闭回调 */ onClose?: () => void; /** 表单创建回调 */ onCreate?: (any: any) => void; /** 图片预览字段映射 */ formatPreviewItemValue?: (data: any) => { imgUrl: string; tooltip?: TooltipProps; [propsName: string]: any; }; } export interface UserInfo { /** 用户id */ userId?: string; /** 花名 */ userName?: string; /** 真实姓名 */ realName?: string; /** 头像 */ headIconUrl?: string; /** 职位 */ position?: string; /** 主部门id */ orgId?: string; /** 主部门全路径 */ orgPathDesc?: string; /** 手机号 */ userPhone?: string; } export interface OrgForUser { /** 部门下的总用户数 */ userTotal?: number; /** 用户数据集合 */ userList?: UserInfo[]; /** 部门id */ orgId?: string; /** 部门名称 */ orgName?: string; /** 父级部门id */ orgParentId?: string; /** 子部门数据 ,SelectorOrgUserDTO */ subOrgList?: any[]; } export interface YwEmpSelectorProps extends Omit { /** * 接口请求 :通过关键词查询用户 关键词为花名、真名以及两者的拼音 接口 */ getDataSource: (string?: any) => Promise; /** * 接口请求 :通过部门id查询下级用户 */ getUserListForOrg: (params: { orgIds: string; }) => Promise<{ list?: UserInfo[]; }>; /** * 接口请求 :返回部门树 */ getOrgList: () => Promise; /** * 用户信息列表,数据结构同接口:通过部门id查询下级用户 */ dataSourceForUser?: UserInfo[]; /** * 默认值 */ defaultValue?: UserInfo[]; /** * 受控值 */ value?: UserInfo[]; /** * 最大可选数量 */ maxItems?: number; /** * 关闭是否清空初始值 */ clearValueOnClose?: boolean; /** * 字段转换 */ fieldNames?: { label: string; value: string; children?: string; }; /** * 取消回调 */ onCancel?: () => void; /** * 确认回调 */ onOk: (data: UserInfo[]) => void; } export interface YwOrgSelectorProps extends ModalProps { getDataSource: (any?: any) => Promise; defaultValue?: Array<{ label: string; value: string; }>; fieldNames?: { label: string; value: string; children?: string; }; /** * 最大可选数量 */ maxItems?: number; /** * 确认回调 */ onOk: (data: UserInfo[]) => void; } export interface YwCascaderProps { /** * 数据源,结构可参考下方说明 */ dataSource?: checkData[]; /** * (非受控)默认值 */ defaultValue?: string | string[]; /** * (受控)当前值 */ value?: string | string[]; /** * 选中值改变时触发的回调函数 */ onChange?: (value: string | string[], data: checkData | checkData[], extra: any) => void; /** * (非受控)默认展开值,如果不设置,组件内部会根据 defaultValue/value 进行自动设置 */ defaultExpandedValue?: string[]; /** * (受控)当前展开值 */ expandedValue?: string[]; /** * 展开触发的方式 */ expandTriggerType?: 'click' | 'hover'; /** * 展开时触发的回调函数 */ onExpand?: (expandedValue: string[]) => void; /** * 是否开启虚拟滚动 */ useVirtual?: boolean; /** * 是否多选 */ multiple?: boolean; /** * 单选时是否只能选中叶子节点 */ canOnlySelectLeaf?: boolean; /** * 多选时是否只能选中叶子节点 */ canOnlyCheckLeaf?: boolean; /** * 父子节点是否选中不关联 */ checkStrictly?: boolean; /** * 每列列表样式对象 */ listStyle?: React.CSSProperties; /** * 每列列表类名 */ listClassName?: string; /** * 每列列表项渲染函数 */ itemRender?: (data: checkData) => React.ReactNode; /** * 异步加载数据函数,source是原始对象 */ loadData?: (data: checkData, source: checkData) => void; /** * 是否是不可变数据 */ immutable?: boolean; } export interface YwCardListProps extends ListProps { /** 分页 */ pagination?: false | PaginationProps; /** 数据请求 */ getDataSource?: (any: any) => void; /** 数据 */ dataSource?: any[]; /** 筛选项 */ filterProps?: any; /** 唯一key */ rowKey?: string; /** 是否展示总数 */ showTotal?: boolean; /** 自定义总数 */ renderTotal?: (number: any) => JSX.Element; /** 操作区 */ buttons?: IButtons[]; /** 确认文案 */ confirmText?: string; /** 确认按钮loading */ confirmLoading?: boolean; /** 确认按钮禁用 */ confirmDisabled?: boolean; /** 格式化 */ formatValues?: (any: any) => { [key: string]: any; }; /** 是否可选择 */ onSubmit?: (any: any) => void; /** 是否可选择 */ rowSelection?: TableProps['rowSelection']; renderHeader?: (any: any) => JSX.Element; renderFooter?: (any: any) => JSX.Element; listItemStyle?: React.CSSProperties; /** footer 样式 */ footerStyle?: React.CSSProperties; renderEmpty?: () => JSX.Element; } export interface YwTagProps extends TagProps { /** 业务预定义标签 */ bizName?: 'default' | 'amount' | 'level'; /** 标签文字 */ text?: string | string[]; /** 样式类型 hollow 空心样式 */ styleType?: 'hollow'; /** 尺寸 */ size?: 'default' | 's'; } export interface YwDetailInfoProps extends Omit { /** 标题 */ title?: string; /** 样式 */ style?: React.CSSProperties; /** Row样式 */ rowStyle?: React.CSSProperties; /** Col样式 */ colStyle?: React.CSSProperties; /** dataSource */ dataSource?: Array JSX.Element; renderValue?: () => JSX.Element; }>>; } export interface PanelProps extends React.HTMLAttributes { value: string; text?: React.ReactNode; align?: 'left' | 'right' | 'top' | 'bottom'; bgColor?: string; fgColor?: string; level?: 'L' | 'M' | 'Q' | 'H'; } export interface YwQrcodeProps extends Pick { /** * 二维码的展示内容 */ value: string; /** * 二维码下方文案 */ text?: React.ReactNode; /** * 二维码背景色 */ bgColor?: string; /** * 二维码前景色 */ fgColor?: string; /** * 二维码的纠错等级 */ level?: 'L' | 'M' | 'Q' | 'H'; /** * 触发器 icon 的大小 */ triggerSize: 'xxs' | 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl'; /** * 触发器 icon 的 inline-style */ triggerStyle?: React.CSSProperties; /** * 组件className */ className?: string; /** * 组件style */ style?: React.CSSProperties; } export declare type YwEmptyProps = EmptyProps; export interface YwFormTableProps extends YwTableProps { /** 表单值变化 */ onSubmit?: (values: any) => void; /** 初始值 */ initialValue?: Array<{ [propName: string]: any; }>; /** schemaScope */ schemaScope?: object; } export interface YwAvatarProps extends AvatarProps { /** 用户名 */ userName?: string | React.ReactNode; /** 是否展示名字 */ showName?: boolean; /** 是否离职 */ leaveJob?: boolean; /** 附件图标 */ extraIcon?: 'WAITING' | 'REJECT' | 'SUCCESS' | 'KS' | 'DY' | 'TB'; /** 头像类型 */ type?: 'user' | 'org'; } export interface ProcessItem { /** 头像 */ headIconUrl?: string; /** 附件图标 */ extraIcon?: 'WAITING' | 'REJECT' | 'SUCCESS'; /** 头像类型 */ avatarType?: 'user' | 'org'; /** 审批状态 */ statusName?: string; /** 描述 */ description?: string; /** 时间 */ time?: string; /** 内容组件 */ component?: 'UserList' | 'Remark'; /** 组件参数 */ componentProps?: { /** 用户列表 */ dataSource?: UserInfo[] | Array<{ label: string; value: string; }>; }; } export declare type ProcessProps = ProcessItem[]; export interface YwApprovalProcessProps { /** 数据项 */ processItems?: ProcessProps; } export declare type YwFileType = 'unknow' | 'png' | 'jpg' | 'xsl' | 'zip' | 'pdf' | 'doc' | 'ppt'; export interface YwFileProps extends UploadFile { /** 样式 */ style?: React.CSSProperties; /** 文件类型 */ type?: 'file' | 'image'; /** 是否有边框 */ hasBorder?: boolean; /** 操作 */ actions: { preview?: Function; download?: Function; remove?: Function; }; /** 隐藏操作列 */ hiddenActions?: boolean; } export interface YwTourStepProps { /** 获取引导卡片指向的元素,为空时居中于屏幕 */ target?: () => HTMLElement | HTMLElement; /** 是否显示箭头 */ arrow?: boolean; /** 展示的图片或者视频 */ cover?: ReactNode; /** 标题 */ title?: ReactNode; /** 主要描述部分 */ description?: ReactNode; /** 引导卡片相对于目标元素的位置 */ placement?: 'left' | 'leftTop' | 'leftBottom' | 'right' | 'rightTop' | 'rightBottom' | 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight'; /** 关闭引导时的回调函数 */ onClose?: () => void; /** 是否启用蒙层,也可传入配置改变蒙层样式和填充色 */ mask?: boolean; /** 类型,影响底色与文字颜色 */ type?: 'default' | 'primary'; /** 下一步按钮的属性 */ nextButtonProps?: { children: ReactNode; onClick: Function; }; /** 上一步按钮的属性 */ prevButtonProps?: { children: ReactNode; onClick: Function; }; /** 是否支持当前元素滚动到视窗内,也可传入配置指定滚动视窗的相关参数 */ scrollIntoViewOptions?: true; /** 自定义指示器 */ indicatorsRender?: (current: number, total: number) => ReactNode; } export interface YwTourProps { /** 是否显示箭头 */ arrow?: boolean; /** 引导卡片相对于目标元素的位置 */ placement?: 'left' | 'leftTop' | 'leftBottom' | 'right' | 'rightTop' | 'rightBottom' | 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight'; /** 关闭引导时的回调函数 */ onClose?: () => void; /** 引导完成时的回调 */ onFinish?: () => void; /** 是否启用蒙层,也可传入配置改变蒙层样式和填充色 */ mask?: boolean; /** 类型,影响底色与文字颜色 */ type?: 'default' | 'primary'; /** 打开引导 */ open?: boolean; /** 步骤改变时的回调,current 为当前的步骤 */ onChange?: (current: number) => void; /** 当前处于哪一步 */ current?: number; /** 是否支持当前元素滚动到视窗内,也可传入配置指定滚动视窗的相关参数 */ scrollIntoViewOptions?: true; /** Tour 的层级 */ zIndex?: number; steps?: YwTourStepProps[]; } export interface YwSearchProps extends Pick { /** 样式 */ style?: React.CSSProperties; /** 高级筛选弹窗样式 */ overlayInnerStyle?: React.CSSProperties; /** 尺寸 */ size?: 'default' | 'large'; /** placeholder */ placeholder?: string; /** 搜索按钮loading状态 */ loading?: boolean; /** 是否展示搜索按钮 */ showSearchBtn?: boolean; /** 是否展示高级筛选 */ showFilter?: boolean; /** 按下回车,或者点击搜索按钮 */ onSearch?: (keyword: any, formValue: any) => void; /** 高级筛选值变化触发 */ onValueChange?: (keyword: any, formValue: any) => void; /** 输入框内容变更 */ onChange?: (keyword: any) => void; } export {};