jiaqingjiayi-xiaochengxu/甲情_甲意/miniprogram/node_modules/antd-mini/es/NoticeBar/props.d.ts

72 lines
1.9 KiB
TypeScript
Raw Normal View History

2024-11-10 07:01:22 +00:00
import { IBaseProps } from '../_base';
export interface INoticeCommonProps extends IBaseProps {
/**
* @description
* default error primary info
* @default "default"
*/
type?: 'default' | 'error' | 'primary' | 'info';
}
/**
* @description
* 使
*
*/
export interface INoticeBarProps extends INoticeCommonProps {
/**
* @description link closeable x
*/
mode?: 'link' | 'closeable';
/**
* @description action和mode可以同时搭配使用
*/
actions?: string[];
/**
* @description
* @default false
*/
enableMarquee?: boolean;
/**
* @description enableMarquee true
* @default false
*/
loop?: boolean;
/**
* @description mode属性决定
*/
onTap?: () => void;
/**
* @description
* @param
*/
onActionTap?: (index: number) => void;
}
export declare const NoticeBarDefaultProps: Partial<INoticeBarProps>;
export type INoticeBarData = {
show: boolean;
marqueeStyle: string;
animatedWidth: number;
overflowWidth: number;
duration: number;
viewWidth: number;
}
export type INoticeBarMethods = {
resetState: () => void;
showError: () => void;
onTap: () => void;
onActionTap: (e: any) => void;
resetMarquee: () => void;
startMarquee: () => void;
onTransitionEnd: () => void;
measureText: (fn: (...args: any[]) => void) => void;
}