|
@ -1,10 +1,12 @@ |
|
|
module.exports = class { |
|
|
module.exports = class { |
|
|
onCreate() { |
|
|
onCreate() { |
|
|
this.mounted = false |
|
|
this.mounted = false |
|
|
|
|
|
this.opened = false |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
closeModal() { |
|
|
closeModal() { |
|
|
this.emit("close") |
|
|
this.emit("close") |
|
|
|
|
|
this.opened = false |
|
|
|
|
|
|
|
|
if (this.mounted) { |
|
|
if (this.mounted) { |
|
|
window.removeEventListener("keydown", this.onPress) |
|
|
window.removeEventListener("keydown", this.onPress) |
|
@ -17,8 +19,9 @@ module.exports = class { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (input) { |
|
|
if (input) { |
|
|
if (input.enabled && (!this.input || !this.input.enabled)) { |
|
|
|
|
|
|
|
|
if (input.enabled && !this.opened) { |
|
|
this.emit("open") |
|
|
this.emit("open") |
|
|
|
|
|
this.opened = true |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (input.closable) { |
|
|
if (input.closable) { |
|
|