|
|
@ -72,7 +72,9 @@ export default () => { |
|
|
model.on('change:open', (m, enb) => triggerEvent(enb, em)); |
|
|
model.on('change:open', (m, enb) => triggerEvent(enb, em)); |
|
|
model.on( |
|
|
model.on( |
|
|
'change', |
|
|
'change', |
|
|
debounce(() => em.trigger('modal', this._evData())) |
|
|
debounce(() => { |
|
|
|
|
|
em.trigger('modal', this._evData()); |
|
|
|
|
|
}) |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
return this; |
|
|
return this; |
|
|
@ -100,10 +102,12 @@ export default () => { |
|
|
* @return {this} |
|
|
* @return {this} |
|
|
*/ |
|
|
*/ |
|
|
open(opts = {}) { |
|
|
open(opts = {}) { |
|
|
|
|
|
const attr = opts.attributes || {}; |
|
|
opts.title && this.setTitle(opts.title); |
|
|
opts.title && this.setTitle(opts.title); |
|
|
opts.content && this.setContent(opts.content); |
|
|
opts.content && this.setContent(opts.content); |
|
|
|
|
|
model.set('attributes', attr); |
|
|
model.open(); |
|
|
model.open(); |
|
|
modal && modal.updateAttr(opts.attributes); |
|
|
modal && modal.updateAttr(attr); |
|
|
return this; |
|
|
return this; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|