chore(@vant/use): remove @babel/runtime
This commit is contained in:
@@ -78,13 +78,18 @@ export function useChildren<
|
||||
internalChildren.splice(index, 1);
|
||||
};
|
||||
|
||||
provide(key, {
|
||||
link,
|
||||
unlink,
|
||||
children: publicChildren,
|
||||
internalChildren,
|
||||
...value,
|
||||
});
|
||||
provide(
|
||||
key,
|
||||
Object.assign(
|
||||
{
|
||||
link,
|
||||
unlink,
|
||||
children: publicChildren,
|
||||
internalChildren,
|
||||
},
|
||||
value
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
@@ -20,7 +20,7 @@ export function useParent<T>(key: string | symbol) {
|
||||
|
||||
if (parent) {
|
||||
const instance = getCurrentInstance()!;
|
||||
const { link, unlink, internalChildren, ...rest } = parent;
|
||||
const { link, unlink, internalChildren } = parent;
|
||||
|
||||
link(instance);
|
||||
onUnmounted(() => unlink(instance));
|
||||
@@ -28,7 +28,7 @@ export function useParent<T>(key: string | symbol) {
|
||||
const index = computed(() => internalChildren.indexOf(instance));
|
||||
|
||||
return {
|
||||
parent: rest,
|
||||
parent,
|
||||
index,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user