UNPKG

@tplc/wot

Version:

88 lines (87 loc) 1.82 kB
import type { PropType, ExtractPropTypes } from 'vue' export type NotifyType = 'primary' | 'success' | 'danger' | 'warning' export type NotifyPosition = 'top' | 'bottom' export type NotifyProps = Omit<Partial<ExtractPropTypes<typeof notifyProps>>, 'selector'> & { onClick?: (event: MouseEvent) => void onClosed?: () => void onOpened?: () => void } export type NotifyThemeVars = { notifyPadding?: string notifyFontSize?: string notifyTextColor?: string notifyLineHeight?: number | string notifyDangerBackground?: string notifyPrimaryBackground?: string notifySuccessBackground?: string notifyWarningBackground?: string } export declare const notifyProps: { /** * 类型,可选值为 primary success danger warning */ type: { type: PropType<NotifyType> default: NotifyType } /** * 字体颜色 */ color: { type: PropType<string> default: string } /** * 将组件的 z-index 层级设置为一个固定值 */ zIndex: { type: NumberConstructor default: number } /** * 显示 */ visible: { type: BooleanConstructor default: boolean } /** * 展示文案,支持通过\n换行 */ message: { type: (NumberConstructor | StringConstructor)[] default: string } /** * 指定唯一标识 */ selector: { type: PropType<string> default: string } /** * 展示时长(ms),值为 0 时,notify 不会消失 */ duration: { type: NumberConstructor default: number } /** * 弹出位置,可选值为 top bottom */ position: { type: PropType<NotifyPosition> default: NotifyPosition } /** * 顶部安全高度( */ safeHeight: NumberConstructor /** * 背景颜色 */ background: { type: PropType<string> default: string } }