diff --git a/src/core/runtime/wrapper/util.js b/src/core/runtime/wrapper/util.js index ad0d83dec21244eac2dbd6ac4998d5b6478640b7..42f56239fc03187d1738b3eecd3c9eaee8693761 100644 --- a/src/core/runtime/wrapper/util.js +++ b/src/core/runtime/wrapper/util.js @@ -72,10 +72,10 @@ export function initVueComponent (Vue, vueOptions) { let VueComponent if (isFn(vueOptions)) { VueComponent = vueOptions - vueOptions = VueComponent.extendOptions } else { VueComponent = Vue.extend(vueOptions) } + vueOptions = VueComponent.options return [VueComponent, vueOptions] } @@ -485,18 +485,18 @@ export function handleEvent (event) { handlerCtx.$parent.$parent ) { // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots handlerCtx = handlerCtx.$parent.$parent - } - if (methodName === '$emit') { - handlerCtx.$emit.apply(handlerCtx, - processEventArgs( - this.$vm, - event, - eventArray[1], - eventArray[2], - isCustom, - methodName - )) - return + } + if (methodName === '$emit') { + handlerCtx.$emit.apply(handlerCtx, + processEventArgs( + this.$vm, + event, + eventArray[1], + eventArray[2], + isCustom, + methodName + )) + return } const handler = handlerCtx[methodName] if (!isFn(handler)) { @@ -528,4 +528,4 @@ export function handleEvent (event) { ) { return ret[0] } -} +} diff --git a/src/platforms/mp-weixin/runtime/wrapper/component-base-parser.js b/src/platforms/mp-weixin/runtime/wrapper/component-base-parser.js index 4eb84191aa473089b03006cd48c75c0bce3e472e..c032c15b361ed82ae0323a0d0295f676b3940514 100644 --- a/src/platforms/mp-weixin/runtime/wrapper/component-base-parser.js +++ b/src/platforms/mp-weixin/runtime/wrapper/component-base-parser.js @@ -20,7 +20,6 @@ export default function parseBaseComponent (vueComponentOptions, { initRelation } = {}) { let [VueComponent, vueOptions] = initVueComponent(Vue, vueComponentOptions) - vueOptions = VueComponent.options || vueOptions const options = { multipleSlots: true,