feat(reactivity): use Symbol for Ref._isRef (#114)

This commit is contained in:
扩散性百万甜面包
2019-10-06 03:46:36 +08:00
committed by Evan You
parent de9507b6ff
commit 0bdee72e17
2 changed files with 8 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
import { effect, ReactiveEffect, activeReactiveEffectStack } from './effect'
import { Ref, UnwrapNestedRefs } from './ref'
import { Ref, refSymbol, UnwrapNestedRefs } from './ref'
import { isFunction } from '@vue/shared'
export interface ComputedRef<T> extends Ref<T> {
@@ -43,7 +43,7 @@ export function computed<T>(
}
})
return {
_isRef: true,
_isRef: refSymbol,
// expose effect so computed can be stopped
effect: runner,
get value() {