feat(runtime-core): support config.optionMergeStrategies
Note the behavior is different from Vue 2: - merge strategies no longer apply to built-in options. - the default value is now an empty object and no longer exposes merge strategies for built-in options.
This commit is contained in:
@@ -6,7 +6,8 @@ import {
|
||||
ExtractComputedReturns,
|
||||
ComponentOptionsBase,
|
||||
ComputedOptions,
|
||||
MethodOptions
|
||||
MethodOptions,
|
||||
resolveMergedOptions
|
||||
} from './apiOptions'
|
||||
import { ReactiveEffect, UnwrapRef } from '@vue/reactivity'
|
||||
import { warn } from './warning'
|
||||
@@ -61,7 +62,7 @@ const publicPropertiesMap: Record<
|
||||
$parent: i => i.parent,
|
||||
$root: i => i.root,
|
||||
$emit: i => i.emit,
|
||||
$options: i => i.type,
|
||||
$options: i => (__FEATURE_OPTIONS__ ? resolveMergedOptions(i) : i.type),
|
||||
$forceUpdate: i => () => queueJob(i.update),
|
||||
$nextTick: () => nextTick,
|
||||
$watch: __FEATURE_OPTIONS__ ? i => instanceWatch.bind(i) : NOOP
|
||||
|
||||
Reference in New Issue
Block a user