diff --git a/packages/reactivity/src/ref.ts b/packages/reactivity/src/ref.ts index 521c1b35..472e951c 100644 --- a/packages/reactivity/src/ref.ts +++ b/packages/reactivity/src/ref.ts @@ -24,12 +24,17 @@ export function ref(raw?: unknown) { const r = { _isRef: true, get value() { - track(r, OperationTypes.GET, '') + track(r, OperationTypes.GET, 'value') return raw }, set value(newVal) { raw = convert(newVal) - trigger(r, OperationTypes.SET, '') + trigger( + r, + OperationTypes.SET, + 'value', + __DEV__ ? { newValue: newVal } : void 0 + ) } } return r as Ref