feat(types): feat(types): add ComponentCustomProperties interface (#982)
This commit is contained in:
@@ -20,7 +20,6 @@ import {
|
||||
import {
|
||||
currentInstance,
|
||||
ComponentInternalInstance,
|
||||
Data,
|
||||
isInSSRComponentSetup,
|
||||
recordInstanceBoundEffect
|
||||
} from './component'
|
||||
@@ -276,9 +275,11 @@ export function instanceWatch(
|
||||
cb: Function,
|
||||
options?: WatchOptions
|
||||
): StopHandle {
|
||||
const ctx = this.proxy as Data
|
||||
const getter = isString(source) ? () => ctx[source] : source.bind(ctx)
|
||||
const stop = watch(getter, cb.bind(ctx), options)
|
||||
const publicThis = this.proxy as any
|
||||
const getter = isString(source)
|
||||
? () => publicThis[source]
|
||||
: source.bind(publicThis)
|
||||
const stop = watch(getter, cb.bind(publicThis), options)
|
||||
onBeforeUnmount(stop, this)
|
||||
return stop
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user