uview-plus
Version:
零云®uview-plus已兼容vue3支持多语言,120+全面的组件和便捷的工具会让您信手拈来。近期新增拖动排序、条码、图片裁剪、下拉刷新、虚拟列表、签名、Markdown等。
64 lines (58 loc) • 1.15 kB
TypeScript
import { AllowedComponentProps, VNodeProps } from './_common'
declare interface ToastProps {
/**
* 层级
*/
zIndex?: string | number
/**
* 是否加载中
* @default false
*/
loading?: boolean
/**
* 显示的文本
*/
message?: string | number
/**
* 图标,或者绝对路径的图片
*/
icon?: string
/**
* toast出现的位置
* @default "center"
*/
position?: 'top' | 'center' | 'bottom'
/**
* 主题类型
* @default "default"
*/
type?: 'default' | 'error' | 'success' | 'loading'
/**
* 跳转的参数
*/
params?: Record<string, any>
/**
* 展示时间,单位ms
* @default 2000
*/
duration?: string | number
/**
* 执行完后的回调函数
*/
complete?: () => any
}
declare interface _ToastRef {
/**
* 显示toast,如需一进入页面就显示toast,请在onReady生命周期调用
*/
show: (options: ToastProps) => void
}
declare interface _Toast {
new (): {
$props: AllowedComponentProps &
VNodeProps &
ToastProps
}
}
export declare const Toast: _Toast
export declare const ToastRef: _ToastRef