1.1.0 • Published 3 years ago
@ubrorg/alert v1.1.0
alert
alert
使用
在页面的 page.json
中配置:
{
"usingComponents": {
"alert": "@ubrorg/alert/lib/index"
}
}
在页面的 page.axml
中直接使用:
<alert />
给页面中的按钮添加事件如:
<!-- html -->
<button onTap="buttonAlert">点击按钮</button>
<!-- js -->
import { alert } from '@ubrorg/toast/lib/alert';
buttonAlert() {
alert({
content: '您本月的账单已出',
buttonText: '我知道了',
title: '这里是title',
complete: () => { console.log('调用成功') },
}};
}
配置
属性 | 是否必传 | 默认值 | 解释 | 类型 |
---|---|---|---|---|
content | N | ' ' | 弹窗的文本,content为提示文字 | string |
buttonText | N | '确定' | 按钮上的提示文字 | string |
title | N | '' | alert 的 title | string |
complete | N | 无 | 调用结束的回调函数 | function |
开发
更多命令
miapp newbranch
: 新建分支miapp push
: 提交代码miapp prepub
: 预发(发布 beta 版本)miapp publish
: 正式发布