From c8ee53f7d5113a10a1eb10e232fcc5fe46ee9054 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Wed, 9 Dec 2020 15:59:28 +0800 Subject: [PATCH] build(h5): bump vue from 3.0.3 to 3.0.4 --- packages/uni-h5-vue/lib/vue.runtime.esm.js | 122 ++++++++++++--------- 1 file changed, 73 insertions(+), 49 deletions(-) diff --git a/packages/uni-h5-vue/lib/vue.runtime.esm.js b/packages/uni-h5-vue/lib/vue.runtime.esm.js index aee59c3f5..aeb842388 100644 --- a/packages/uni-h5-vue/lib/vue.runtime.esm.js +++ b/packages/uni-h5-vue/lib/vue.runtime.esm.js @@ -3372,7 +3372,7 @@ const KeepAliveImpl = { } function pruneCache(filter) { cache.forEach((vnode, key) => { - const name = getName(vnode.type); + const name = getComponentName(vnode.type); if (name && (!filter || !filter(name))) { pruneCacheEntry(key); } @@ -3445,7 +3445,7 @@ const KeepAliveImpl = { } let vnode = getInnerChild(rawVNode); const comp = vnode.type; - const name = getName(comp); + const name = getComponentName(comp); const { include, exclude, max } = props; if ((include && (!name || !matches(include, name))) || (exclude && name && matches(exclude, name))) { @@ -3498,9 +3498,6 @@ const KeepAliveImpl = { // export the public type for h/tsx inference // also to avoid inline import() in generated d.ts files const KeepAlive = KeepAliveImpl; -function getName(comp) { - return comp.displayName || comp.name; -} function matches(pattern, name) { if (isArray(pattern)) { return pattern.some((p) => matches(p, name)); @@ -4909,7 +4906,10 @@ function baseCreateRenderer(options, createHydrationFns) { else { if (patchFlag > 0 && patchFlag & 64 /* STABLE_FRAGMENT */ && - dynamicChildren) { + dynamicChildren && + // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { // a stable fragment (template root or