parent
91fa52850a
commit
6abac87b3d
@ -1,4 +1,9 @@
|
|||||||
import { toRaw, shallowReactive } from '@vue/reactivity'
|
import {
|
||||||
|
toRaw,
|
||||||
|
shallowReactive,
|
||||||
|
trigger,
|
||||||
|
TriggerOpTypes
|
||||||
|
} from '@vue/reactivity'
|
||||||
import {
|
import {
|
||||||
EMPTY_OBJ,
|
EMPTY_OBJ,
|
||||||
camelize,
|
camelize,
|
||||||
@ -215,6 +220,9 @@ export function updateProps(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// trigger updates for $attrs in case it's used in component slots
|
||||||
|
trigger(instance, TriggerOpTypes.SET, '$attrs')
|
||||||
|
|
||||||
if (__DEV__ && rawProps) {
|
if (__DEV__ && rawProps) {
|
||||||
validateProps(props, instance.type)
|
validateProps(props, instance.type)
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,9 @@ import {
|
|||||||
UnwrapRef,
|
UnwrapRef,
|
||||||
toRaw,
|
toRaw,
|
||||||
shallowReadonly,
|
shallowReadonly,
|
||||||
ReactiveFlags
|
ReactiveFlags,
|
||||||
|
track,
|
||||||
|
TrackOpTypes
|
||||||
} from '@vue/reactivity'
|
} from '@vue/reactivity'
|
||||||
import {
|
import {
|
||||||
ExtractComputedReturns,
|
ExtractComputedReturns,
|
||||||
@ -260,8 +262,9 @@ export const PublicInstanceProxyHandlers: ProxyHandler<any> = {
|
|||||||
let cssModule, globalProperties
|
let cssModule, globalProperties
|
||||||
// public $xxx properties
|
// public $xxx properties
|
||||||
if (publicGetter) {
|
if (publicGetter) {
|
||||||
if (__DEV__ && key === '$attrs') {
|
if (key === '$attrs') {
|
||||||
markAttrsAccessed()
|
track(instance, TrackOpTypes.GET, key)
|
||||||
|
__DEV__ && markAttrsAccessed()
|
||||||
}
|
}
|
||||||
return publicGetter(instance)
|
return publicGetter(instance)
|
||||||
} else if (
|
} else if (
|
||||||
|
Loading…
Reference in New Issue
Block a user