两种类型
- 有“确认”和“取消”按钮的对话框弹窗,用来对用户的操作进行确认,如下图:

对应插件:ui-dialog;
2.对操作的结果进行提示,如是否成功、失败、警告等提示;

对应插件:ui-alert;
ui-dialog
根据
semantic
的modal
封装而来,只是一层语法糖。
使用例子:

$.uiDialog(msg,options)
参数说明:
msg:对话框的提示文字。
options:参考semantic.modal的settings。
ui-alert
根据
semantic
的message
封装而来。
使用例子:

参数说明:
$.uiAlert({
textHead: 'Your user registration was successful.',//标题
text: 'You may now log-in with the username you have chosen',//详细内容
textcolor: '#fff',//文字颜色
type: 'success',//提示类型:'success','info','waring','danger'
position: 'top-right',//位置:'top-left','top-center','top-right','bottom-left','bottom-center','bottom-right','center'
icon: '',//提示左边的图标
time: 5,//几秒后消失
permanent: false,//是否永远不消失
onClosed:function(){//结束的回调
}
})
网友评论