Skip to content

Commit

Permalink
fix: 修复部分组件 props 命名规范问题 (#1306)
Browse files Browse the repository at this point in the history
Co-authored-by: Lang Ming <[email protected]>
  • Loading branch information
qiu8310 and Lang Ming authored Nov 22, 2024
1 parent ecb8169 commit a819df4
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/Dialog/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface Footer {
*/
layout: 'vertical' | 'horizontal';
}
export interface IModalProps extends IBaseProps {
export interface IDialogProps extends IBaseProps {
/**
* @description Modal body类名
*/
Expand Down Expand Up @@ -108,7 +108,7 @@ export interface IModalProps extends IBaseProps {
onButtonTap?: (buttonItem) => void;
}

export const ModalDefaultProps: Partial<IModalProps> = {
export const ModalDefaultProps: Partial<IDialogProps> = {
visible: false,
maskClosable: true,
closable: true,
Expand All @@ -117,7 +117,7 @@ export const ModalDefaultProps: Partial<IModalProps> = {
zIndex: 998,
};

export const ModalFunctionalProps: Partial<IModalProps> = {
export const ModalFunctionalProps: Partial<IDialogProps> = {
bodyClassName: '',
bodyStyle: '',
maskClassName: '',
Expand Down
4 changes: 2 additions & 2 deletions src/PopoverList/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface PopoverListItem {
* @description 气泡,内部配合 PopoverItem 使用。
*/

export interface IPopoverProps extends IBaseProps {
export interface IPopoverListProps extends IBaseProps {
/**
* @description 是否可见
* @default false
Expand Down Expand Up @@ -109,7 +109,7 @@ export interface IPopoverProps extends IBaseProps {
list: PopoverListItem[];
}

export const PopoverDefaultProps: Partial<IPopoverProps> = {
export const PopoverDefaultProps: Partial<IPopoverListProps> = {
visible: null,
defaultVisible: false,
destroyOnClose: false,
Expand Down
4 changes: 2 additions & 2 deletions src/SafeArea/props.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
interface Props {
export interface ISafeAreaProps {
className?: string;
position: 'top' | 'bottom' | '';
}

export const SafeAreaDefaultProps: Props = {
export const SafeAreaDefaultProps: ISafeAreaProps = {
className: '',
position: '',
};
4 changes: 2 additions & 2 deletions src/SelectContact/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export interface IContactUserInfo {
personSource: TPersonSource;
}

export interface ISelectContacProps extends IBaseProps {
export interface ISelectContactProps extends IBaseProps {
/** 自定义 class */
className: string;

Expand Down Expand Up @@ -122,7 +122,7 @@ export interface ISelectContacProps extends IBaseProps {
onSearchUser: (keyword: string) => void;
}

export const SelectContactDefaultProps: Partial<ISelectContacProps> = {
export const SelectContactDefaultProps: Partial<ISelectContactProps> = {
className: '',
height: '100%',
/** 其他扩展参数 */
Expand Down
4 changes: 2 additions & 2 deletions src/Sticky/props.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
interface Props {
export interface IStickyProps {
className: string;
headerHeight: number;
sticky: boolean;
Expand All @@ -9,7 +9,7 @@ interface Props {
onGetHeaderHeight: (height: number) => void;
}

export const StickyProps: Props = {
export const StickyProps: IStickyProps = {
className: '',
headerHeight: undefined, // 从外部传入的 tab header 高度,默认为 undefined
sticky: true, // 是否需要粘性,某些场景可能需要一会儿吸顶一会儿不吸
Expand Down
4 changes: 2 additions & 2 deletions src/Table/props.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
interface Props {
export interface ITableProps {
dataSource: []; // 数据源
columns: []; // 表格列的配置描述
scrollHeight?: string; // 可滚动高度
Expand All @@ -11,7 +11,7 @@ export interface RenderRuleProps {
sorterStatus?: 'normal' | 'forward' | 'reverse';
}

export const TableDefaultProps: Props = {
export const TableDefaultProps: ITableProps = {
dataSource: [],
columns: [],
displayType: 'DEFAULT',
Expand Down
4 changes: 2 additions & 2 deletions src/Voucher/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface Item {
disabled?: boolean;
}

interface Props {
export interface IVoucherProps {
className?: string;
direction?: 'horizontal' | 'vertical' | 'multipleColumn';
size?: 'large' | 'small';
Expand All @@ -27,7 +27,7 @@ interface Props {
onTap?: (item, event) => void;
}

export const componentsProps: Props = {
export const componentsProps: IVoucherProps = {
className: '',
size: 'large',
direction: 'horizontal',
Expand Down

0 comments on commit a819df4

Please sign in to comment.