@ray-js/smart-ui-typings
Version:
@ray-js/smart-ui 智能小程序 UI 框架的类型声明文件
50 lines (49 loc) • 1.11 kB
TypeScript
/// <reference types="react" />
import { VantBaseExternalClassName, VantComponent, VantEventHandler } from '../base';
export interface VantOverlayProps {
/**
* 是否展示遮罩层
*
* @default false
*/
show?: boolean;
/**
* `z-index` 层级
*
* @default 1
*/
zIndex?: string | number;
/**
* 动画时长,单位秒
*
* @default 0.3
*/
duration?: string | number;
/**
* 自定义类名
*/
className?: string;
/**
* 自定义样式
*/
customStyle?: string;
/**
* 是否锁定背景滚动,锁定时蒙层里的内容也将无法滚动
*
* @default true
*/
lockScroll?: boolean;
}
export interface VantOverlayEvents {
/**
* 点击时触发
*/
onClick?: VantEventHandler;
}
export interface VantOverlaySlot {
/**
* 默认插槽,用于在遮罩层上方嵌入内容
*/
children?: React.ReactNode;
}
export type VantOverlay = VantComponent<VantOverlayProps, VantOverlayEvents, VantBaseExternalClassName, VantOverlaySlot>;