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,
} from '@vue/runtime-dom'
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 {
type RawProps,
@ -125,7 +125,7 @@ export function createComponent(
instance.block = []
} else {
instance.setupState = setupResult
instance.block = component.render.call(null, setupResult)
instance.block = component.render.call(null, proxyRefs(setupResult))
}
} else {
// in prod result can only be block