vue 2.7.0-alpha.4 → 2.7.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vue.js v2.7.0-alpha.4
2
+ * Vue.js v2.7.0-alpha.5
3
3
  * (c) 2014-2022 Evan You
4
4
  * Released under the MIT License.
5
5
  */
@@ -2261,34 +2261,33 @@ function isAsyncPlaceholder(node) {
2261
2261
  return node.isComment && node.asyncFactory;
2262
2262
  }
2263
2263
 
2264
- function normalizeScopedSlots(ownerVm, slots, normalSlots) {
2264
+ function normalizeScopedSlots(ownerVm, scopedSlots, normalSlots, prevScopedSlots) {
2265
2265
  var res;
2266
- var prevSlots = ownerVm.$scopedSlots;
2267
2266
  var hasNormalSlots = Object.keys(normalSlots).length > 0;
2268
- var isStable = slots ? !!slots.$stable : !hasNormalSlots;
2269
- var key = slots && slots.$key;
2270
- if (!slots) {
2267
+ var isStable = scopedSlots ? !!scopedSlots.$stable : !hasNormalSlots;
2268
+ var key = scopedSlots && scopedSlots.$key;
2269
+ if (!scopedSlots) {
2271
2270
  res = {};
2272
2271
  }
2273
- else if (slots._normalized) {
2272
+ else if (scopedSlots._normalized) {
2274
2273
  // fast path 1: child component re-render only, parent did not change
2275
- return slots._normalized;
2274
+ return scopedSlots._normalized;
2276
2275
  }
2277
2276
  else if (isStable &&
2278
- prevSlots &&
2279
- prevSlots !== emptyObject &&
2280
- key === prevSlots.$key &&
2277
+ prevScopedSlots &&
2278
+ prevScopedSlots !== emptyObject &&
2279
+ key === prevScopedSlots.$key &&
2281
2280
  !hasNormalSlots &&
2282
- !prevSlots.$hasNormal) {
2281
+ !prevScopedSlots.$hasNormal) {
2283
2282
  // fast path 2: stable scoped slots w/ no normal slots to proxy,
2284
2283
  // only need to normalize once
2285
- return prevSlots;
2284
+ return prevScopedSlots;
2286
2285
  }
2287
2286
  else {
2288
2287
  res = {};
2289
- for (var key_1 in slots) {
2290
- if (slots[key_1] && key_1[0] !== '$') {
2291
- res[key_1] = normalizeScopedSlot(ownerVm, normalSlots, key_1, slots[key_1]);
2288
+ for (var key_1 in scopedSlots) {
2289
+ if (scopedSlots[key_1] && key_1[0] !== '$') {
2290
+ res[key_1] = normalizeScopedSlot(ownerVm, normalSlots, key_1, scopedSlots[key_1]);
2292
2291
  }
2293
2292
  }
2294
2293
  }
@@ -2300,8 +2299,8 @@ function normalizeScopedSlots(ownerVm, slots, normalSlots) {
2300
2299
  }
2301
2300
  // avoriaz seems to mock a non-extensible $scopedSlots object
2302
2301
  // and when that is passed down this would cause an error
2303
- if (slots && Object.isExtensible(slots)) {
2304
- slots._normalized = res;
2302
+ if (scopedSlots && Object.isExtensible(scopedSlots)) {
2303
+ scopedSlots._normalized = res;
2305
2304
  }
2306
2305
  def(res, '$stable', isStable);
2307
2306
  def(res, '$key', key);
@@ -3087,7 +3086,7 @@ function renderMixin(Vue) {
3087
3086
  var vm = this;
3088
3087
  var _a = vm.$options, render = _a.render, _parentVnode = _a._parentVnode;
3089
3088
  if (_parentVnode) {
3090
- vm.$scopedSlots = normalizeScopedSlots(vm.$parent, _parentVnode.data.scopedSlots, vm.$slots);
3089
+ vm.$scopedSlots = normalizeScopedSlots(vm.$parent, _parentVnode.data.scopedSlots, vm.$slots, vm.$scopedSlots);
3091
3090
  if (vm._slotsProxy) {
3092
3091
  syncSetupSlots(vm._slotsProxy, vm.$scopedSlots);
3093
3092
  }
@@ -5798,7 +5797,7 @@ Object.defineProperty(Vue.prototype, '$ssrContext', {
5798
5797
  Object.defineProperty(Vue, 'FunctionalRenderContext', {
5799
5798
  value: FunctionalRenderContext
5800
5799
  });
5801
- Vue.version = '2.7.0-alpha.4';
5800
+ Vue.version = '2.7.0-alpha.5';
5802
5801
 
5803
5802
  // these are reserved for web because they are directly compiled away
5804
5803
  // during template compilation