diff --git a/src/apis/computed.ts b/src/apis/computed.ts index 1f9e8867..b5060a0e 100644 --- a/src/apis/computed.ts +++ b/src/apis/computed.ts @@ -34,6 +34,8 @@ export function computed( }, }); + vm && vm.$on('hook:destroyed', () => computedHost.$destroy()); + return createRef({ get: () => (computedHost as any).$$state, set: (v: T) => {