wip: proxy refs on setup ctx during dev

This commit is contained in:
Evan You 2024-12-06 11:12:54 +08:00
parent ae5ec075ad
commit e60ec9f399
No known key found for this signature in database
GPG Key ID: 00E9AB7A6704CE0A
1 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ import {
warn, warn,
} from '@vue/runtime-dom' } from '@vue/runtime-dom'
import { type Block, isBlock } from './block' import { type Block, isBlock } from './block'
import { pauseTracking, resetTracking } from '@vue/reactivity' import { pauseTracking, proxyRefs, resetTracking } from '@vue/reactivity'
import { EMPTY_OBJ, isFunction, isString } from '@vue/shared' import { EMPTY_OBJ, isFunction, isString } from '@vue/shared'
import { import {
type RawProps, type RawProps,
@ -125,7 +125,7 @@ export function createComponent(
instance.block = [] instance.block = []
} else { } else {
instance.setupState = setupResult instance.setupState = setupResult
instance.block = component.render.call(null, setupResult) instance.block = component.render.call(null, proxyRefs(setupResult))
} }
} else { } else {
// in prod result can only be block // in prod result can only be block