提交 47ebabe7 编写于 作者: D Danny

use options

上级 a4a1c5c2
......@@ -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]
}
}
}
......@@ -20,7 +20,6 @@ export default function parseBaseComponent (vueComponentOptions, {
initRelation
} = {}) {
let [VueComponent, vueOptions] = initVueComponent(Vue, vueComponentOptions)
vueOptions = VueComponent.options || vueOptions
const options = {
multipleSlots: true,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册