vue renderTracked和renderTriggered有什么使用场景和用法?
https://cn.vuejs.org/api/options-lifecycle.html#rendertracked
具体来说,比如:
type DebuggerEvent = {
effect: ReactiveEffect
target: object
type: TrackOpTypes / 'get' | 'has' | 'iterate' /
key: any
}
type DebuggerEvent = {
effect: ReactiveEffect
target: object
type: TriggerOpTypes / 'set' | 'add' | 'delete' | 'clear' /
key: any
newValue?: any
oldValue?: any
oldTarget?: Map<any, any> | Set<any>
}
get has iterate set add delete clear分别是什么意思
oldTarget是什么意思
然后得到答案: