()
| 20 | } |
| 21 | |
| 22 | afterRender () { |
| 23 | if (this.vueComponent) { |
| 24 | return this.$el.find('#modal-base-flat').replaceWith(this.vueComponent.$el) |
| 25 | // TODO: should we call super() here? |
| 26 | } else { |
| 27 | if (this.vuexModule) { |
| 28 | if (!_.isFunction(this.vuexModule)) { |
| 29 | throw new Error('@vuexModule should be a function') |
| 30 | } |
| 31 | store.registerModule('modal', this.vuexModule()) |
| 32 | } |
| 33 | |
| 34 | this.vueComponent = new this.VueComponent({ |
| 35 | el: this.$el.find('#modal-base-flat')[0], |
| 36 | propsData: this.propsData, |
| 37 | store |
| 38 | }) |
| 39 | |
| 40 | return super.afterRender(...arguments) |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | destroy () { |
| 45 | if (this.vuexModule) { |
nothing calls this directly
no test coverage detected