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

use options

上级 a4a1c5c2
...@@ -72,10 +72,10 @@ export function initVueComponent (Vue, vueOptions) { ...@@ -72,10 +72,10 @@ export function initVueComponent (Vue, vueOptions) {
let VueComponent let VueComponent
if (isFn(vueOptions)) { if (isFn(vueOptions)) {
VueComponent = vueOptions VueComponent = vueOptions
vueOptions = VueComponent.extendOptions
} else { } else {
VueComponent = Vue.extend(vueOptions) VueComponent = Vue.extend(vueOptions)
} }
vueOptions = VueComponent.options
return [VueComponent, vueOptions] return [VueComponent, vueOptions]
} }
...@@ -485,18 +485,18 @@ export function handleEvent (event) { ...@@ -485,18 +485,18 @@ export function handleEvent (event) {
handlerCtx.$parent.$parent handlerCtx.$parent.$parent
) { // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots ) { // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
handlerCtx = handlerCtx.$parent.$parent handlerCtx = handlerCtx.$parent.$parent
} }
if (methodName === '$emit') { if (methodName === '$emit') {
handlerCtx.$emit.apply(handlerCtx, handlerCtx.$emit.apply(handlerCtx,
processEventArgs( processEventArgs(
this.$vm, this.$vm,
event, event,
eventArray[1], eventArray[1],
eventArray[2], eventArray[2],
isCustom, isCustom,
methodName methodName
)) ))
return return
} }
const handler = handlerCtx[methodName] const handler = handlerCtx[methodName]
if (!isFn(handler)) { if (!isFn(handler)) {
...@@ -528,4 +528,4 @@ export function handleEvent (event) { ...@@ -528,4 +528,4 @@ export function handleEvent (event) {
) { ) {
return ret[0] return ret[0]
} }
} }
...@@ -20,7 +20,6 @@ export default function parseBaseComponent (vueComponentOptions, { ...@@ -20,7 +20,6 @@ export default function parseBaseComponent (vueComponentOptions, {
initRelation initRelation
} = {}) { } = {}) {
let [VueComponent, vueOptions] = initVueComponent(Vue, vueComponentOptions) let [VueComponent, vueOptions] = initVueComponent(Vue, vueComponentOptions)
vueOptions = VueComponent.options || vueOptions
const options = { const options = {
multipleSlots: true, multipleSlots: true,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册