提交 0f26e322 编写于 作者: fxy060608's avatar fxy060608

fix(h5): render function of App.vue (question/146011)

上级 e4858060
import { extend, invokeArrayFns, isPlainObject } from '@vue/shared'
import { extend, invokeArrayFns, isPlainObject, isFunction } from '@vue/shared'
import {
ComponentInternalInstance,
ComponentPublicInstance,
......@@ -187,12 +187,14 @@ export function setupApp(comp: any) {
before(comp) {
comp.mpType = 'app'
const { setup } = comp
comp.setup = (props, ctx) => {
return setup && setup(props, ctx)
}
comp.render = () => {
const render = () => {
return openBlock(), createBlock(LayoutComponent)
}
comp.setup = (props, ctx) => {
const res = setup && setup(props, ctx)
return isFunction(res) ? render : res
}
comp.render = render
},
})
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册