# Toast 提示
用于展示提示信息。
# 用法
# 基础用法
import { toast, hideToast, createIcon } from '@tencent/slug-ui';
const IconLoading = createIcon({ name: 'loading', fill: '#fff' })
toast('TextOnly 5s', { duration: 5000 })
toast('WithoutMask', { mask: false })
toast(IconLoading)
hideToast()
1
2
3
4
5
6
7
2
3
4
5
6
7
效果示例:
# 参数
{String | VueConstructor} content- 提示内容{Object} options- 选项{number} options.duration- 显示时间{boolean} [options.mask=true]- 蒙层{Function} options.onClose- 关闭回调