jiaqingjiayi-xiaochengxu/甲情_甲意/miniprogram/node_modules/antd-mini/es/NoticeBar/props.d.ts
2024-11-10 15:01:22 +08:00

72 lines
1.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;
}