实用工具message和toast弹窗插件
插件描述:
兼容 pc 端和移动端的 alert、message 和 toast 弹窗插件,toast 带有 icon
1、默认调用:
alert('请打开麦克风')
支持多参数:
alert({ title: '我是标题', content: '请打开麦克风', doneText: '按钮文字' }).then(callback)
2、默认调用:
confirm('请打开麦克风')
传递参数:
confirm({ title: '我是标题', content: '请打开麦克风', doneText: '确认按钮文字', cancalText: '取消按钮文字' }).then(() => { console.log('已确认') }).catch(() => { console.log('已取消') })
3、默认调用:
toast('请打开麦克风')
设置停留时间和 icon 图标:
toast({ time: 3000, content: '停留 3 秒再消失', type: 'loading' })
找的更少,做的更多!码云笔记只为您提供最好的!
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
码云笔记 » 实用工具message和toast弹窗插件
码云笔记 » 实用工具message和toast弹窗插件