We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
所有content都支持是html文本
$.popWindow({ content:'window1', type:2 })
$.popWindow({ title:'title', content:'window1', type:2 })
$.popWindow({ content:'window1', type:2, callback:function(){ alert(0) } })
$.popWindow({ content:'window1', type:2, closeBtn:true, callback:function(){ alert(0) } })
$.popWindow({ content:'window1', type:2, yes:'aaaaaa', closeBtn:true, callback:function(){ alert(0) } })
$.popWindow({ content:'window1', type:2, yes:'aaaaaa', tapMask:true, closeBtn:true, callback:function(){ alert(0) } })
和alert框的主要区别是,confim框有2个按钮,参数分别为:yes和no,默认yes=确认,no=取消
和alert一样,可以定制按钮的文案
具体如下:
$.popWindow({ content:'window1', type:2, yes:'确认' no:'取消' callback:function(bl){ if(bl){ alert(‘确认’) }else{ alert('取消') } } })
这个类型的弹窗,确认和取消按钮分别在左右上角
而接收用户输入交互发生在弹窗的内容区域,可以自己自定义content内容
$.popWindow({ content:'请输入....<textarea placeholder="请输入..."></textarea>', yes:'确认', no:'取消', callback:function(bl){ if(bl){ } } })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
popWindow的使用
所有content都支持是html文本
模拟Alert框
方式一 基本alert框(只有alert内容)
方式二, 有标题的alert框
方式三 带回调的aler框
方式四 带回调和关闭按钮的aler框
方式五 自定义确认按钮的文本
方式六 点击遮罩层关闭弹窗,设置 tapMask=true
模拟confirm 框
和alert框的主要区别是,confim框有2个按钮,参数分别为:yes和no,默认yes=确认,no=取消
和alert一样,可以定制按钮的文案
具体如下:
接受用户输入的类型提示框
这个类型的弹窗,确认和取消按钮分别在左右上角
而接收用户输入交互发生在弹窗的内容区域,可以自己自定义content内容
具体如下:
The text was updated successfully, but these errors were encountered: