wip: basic setup wiring

This commit is contained in:
Evan You 2019-05-28 20:06:44 +08:00
parent 7a3a5850dc
commit 42dce36bf1

View File

@ -160,14 +160,14 @@ export function setupStatefulComponent(instance: ComponentInstance) {
} }
export function renderComponentRoot(instance: ComponentInstance): VNode { export function renderComponentRoot(instance: ComponentInstance): VNode {
const { type, vnode, proxy, $state, $slots } = instance const { type, vnode, proxy, bindings, $slots } = instance
if (!type) debugger if (!type) debugger
const { 0: props, 1: attrs } = resolveProps( const { 0: props, 1: attrs } = resolveProps(
(vnode as VNode).props, (vnode as VNode).props,
type.props type.props
) )
const renderArg = { const renderArg = {
state: $state, state: bindings || EMPTY_OBJ,
slots: $slots, slots: $slots,
props, props,
attrs attrs