()
| 20 | } |
| 21 | |
| 22 | afterRender () { |
| 23 | if (this.vueComponent) { |
| 24 | this.$el.find('#site-content-area').replaceWith(this.vueComponent.$el) |
| 25 | } else { |
| 26 | if (this.vuexModule) { |
| 27 | if (!_.isFunction(this.vuexModule)) { |
| 28 | throw new Error('@vuexModule should be a function') |
| 29 | } |
| 30 | store.registerModule('page', this.vuexModule()) |
| 31 | } |
| 32 | |
| 33 | this.vueComponent = new this.VueComponent({ |
| 34 | el: this.$el.find('#site-content-area')[0], |
| 35 | propsData: this.propsData, |
| 36 | store |
| 37 | }) |
| 38 | |
| 39 | window.rootComponent = this.vueComponent // Don't use this in code! Just for ease of development |
| 40 | } |
| 41 | |
| 42 | return super.afterRender(...arguments) |
| 43 | } |
| 44 | |
| 45 | destroy () { |
| 46 | if (this.vuexModule) { |
nothing calls this directly
no test coverage detected