|
@@ -36,8 +36,7 @@ import {
|
|
|
legacyresolveScopedSlots,
|
|
legacyresolveScopedSlots,
|
|
|
} from './renderHelpers'
|
|
} from './renderHelpers'
|
|
|
import { resolveFilter } from '../helpers/resolveAssets'
|
|
import { resolveFilter } from '../helpers/resolveAssets'
|
|
|
-import type { InternalSlots, Slots } from '../componentSlots'
|
|
|
|
|
-import type { ContextualRenderFn } from '../componentRenderContext'
|
|
|
|
|
|
|
+import type { Slots } from '../componentSlots'
|
|
|
import { resolveMergedOptions } from '../componentOptions'
|
|
import { resolveMergedOptions } from '../componentOptions'
|
|
|
|
|
|
|
|
export type LegacyPublicInstance = ComponentPublicInstance &
|
|
export type LegacyPublicInstance = ComponentPublicInstance &
|
|
@@ -106,14 +105,7 @@ export function installCompatInstanceProperties(map: PublicPropertiesMap) {
|
|
|
|
|
|
|
|
$scopedSlots: i => {
|
|
$scopedSlots: i => {
|
|
|
assertCompatEnabled(DeprecationTypes.INSTANCE_SCOPED_SLOTS, i)
|
|
assertCompatEnabled(DeprecationTypes.INSTANCE_SCOPED_SLOTS, i)
|
|
|
- const res: InternalSlots = {}
|
|
|
|
|
- for (const key in i.slots) {
|
|
|
|
|
- const fn = i.slots[key]!
|
|
|
|
|
- if (!(fn as ContextualRenderFn)._ns /* non-scoped slot */) {
|
|
|
|
|
- res[key] = fn
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- return res
|
|
|
|
|
|
|
+ return __DEV__ ? shallowReadonly(i.slots) : i.slots
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
$on: i => on.bind(null, i),
|
|
$on: i => on.bind(null, i),
|