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