Options
All
  • Public
  • Public/Protected
  • All
Menu

Module YH-Vant/src/feedback/VantNoticeImpl

Index

Type aliases

NotifyOptions

NotifyOptions: { background?: string; className?: any; color?: string; duration?: number; message?: string | number; onClick?: ((event: Event) => void) | null; onClose?: (() => void) | null; onOpened?: (() => void) | null; type?: "primary" | "success" | "danger" | "warning" }

通知配置

Type declaration

  • Optional background?: string

    背景

  • Optional className?: any

    类名

  • Optional color?: string

    颜色

  • Optional duration?: number

    间隔时间

  • Optional message?: string | number

    通知内容

  • Optional onClick?: ((event: Event) => void) | null

    点击回调

  • Optional onClose?: (() => void) | null

    关闭回调

  • Optional onOpened?: (() => void) | null

    开启回调

  • Optional type?: "primary" | "success" | "danger" | "warning"

VantNtDialogOptions

VantNtDialogOptions: { allowHtml?: boolean; beforeClose?: (action: DialogAction, done: DialogDone) => void; cancelButtonColor?: string; cancelButtonText?: string; className?: any; closeOnClickOverlay?: boolean; closeOnPopstate?: boolean; confirmButtonColor?: string; confirmButtonText?: string; getContainer?: string | (() => Element); lockScroll?: boolean; message?: string; messageAlign?: string; overlay?: boolean; overlayClass?: string; overlayStyle?: object; showCancelButton?: boolean; showConfirmButton?: boolean; theme?: string; title?: string; transition?: string; width?: string | number }

对话框配置

Type declaration

  • Optional allowHtml?: boolean

    是否允许 message 内容中渲染 HTML

  • Optional beforeClose?: (action: DialogAction, done: DialogDone) => void

    关闭前的回调函数, 调用 done() 后关闭对话框, 调用 done(false) 阻止对话框关闭

    param
    param
    returns
      • (action: DialogAction, done: DialogDone): void
      • Parameters

        • action: DialogAction
        • done: DialogDone

        Returns void

  • Optional cancelButtonColor?: string

    取消按钮颜色 默认: black

  • Optional cancelButtonText?: string

    取消按钮文案 默认:取消

  • Optional className?: any

    自定义类名

  • Optional closeOnClickOverlay?: boolean

    是否在点击遮罩层后关闭对话框 默认 false

  • Optional closeOnPopstate?: boolean

    是否在页面回退时自动关闭 默认 true

  • Optional confirmButtonColor?: string

    确认按钮颜色

  • Optional confirmButtonText?: string

    确认按钮标题 默认: 确定

  • Optional getContainer?: string | (() => Element)

    指定挂载的节点,用法示例

  • Optional lockScroll?: boolean

    是否锁定背景滚动

  • Optional message?: string

    文本内容,支持通过\n换行

  • Optional messageAlign?: string

    内容对齐方式,可选值为left right

  • Optional overlay?: boolean

    是否展示遮罩层

  • Optional overlayClass?: string

    自定义遮罩层类名

  • Optional overlayStyle?: object

    自定义遮罩层样式

  • Optional showCancelButton?: boolean

    是否显示取消按钮

  • Optional showConfirmButton?: boolean

    是否显示确认按钮

  • Optional theme?: string

    样式风格,可选值为round

  • Optional title?: string

    标题

  • Optional transition?: string

    动画类名,等价于 transition 的name属性

  • Optional width?: string | number

    对话框宽度,默认单位为px

Generated using TypeDoc