ui: add option to disable popup's closer
This commit is contained in:
parent
d470ffb952
commit
5d3284c7b0
1 changed files with 8 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
module.exports = {
|
||||
|
||||
createPopup: function(title,content) {
|
||||
createPopup: function(title,content,closable) {
|
||||
|
||||
var popup = $(`
|
||||
<div class="popup">
|
||||
|
|
@ -11,9 +11,13 @@ module.exports = {
|
|||
</div>`),
|
||||
closer = popup.find('.popup-title .closer')
|
||||
|
||||
closer.click(function(){
|
||||
popup.close()
|
||||
})
|
||||
if (closable) {
|
||||
closer.click(function(){
|
||||
popup.close()
|
||||
})
|
||||
} else {
|
||||
closer.remove()
|
||||
}
|
||||
|
||||
|
||||
popup.close = function(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue