vue 2.6.8 → 2.6.12

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.
Files changed (42) hide show
  1. package/README.md +61 -81
  2. package/dist/README.md +3 -5
  3. package/dist/vue.common.dev.js +97 -44
  4. package/dist/vue.common.prod.js +3 -3
  5. package/dist/vue.esm.browser.js +97 -44
  6. package/dist/vue.esm.browser.min.js +3 -3
  7. package/dist/vue.esm.js +97 -44
  8. package/dist/vue.js +97 -44
  9. package/dist/vue.min.js +3 -3
  10. package/dist/vue.runtime.common.dev.js +73 -35
  11. package/dist/vue.runtime.common.prod.js +3 -3
  12. package/dist/vue.runtime.esm.js +73 -35
  13. package/dist/vue.runtime.js +73 -35
  14. package/dist/vue.runtime.min.js +3 -3
  15. package/package.json +4 -4
  16. package/src/compiler/codegen/events.js +1 -1
  17. package/src/compiler/error-detector.js +18 -3
  18. package/src/compiler/parser/html-parser.js +2 -2
  19. package/src/compiler/parser/index.js +5 -5
  20. package/src/core/instance/proxy.js +1 -1
  21. package/src/core/instance/render-helpers/bind-dynamic-keys.js +2 -2
  22. package/src/core/instance/render-helpers/bind-object-props.js +5 -3
  23. package/src/core/instance/render.js +1 -1
  24. package/src/core/observer/scheduler.js +17 -6
  25. package/src/core/util/env.js +1 -2
  26. package/src/core/util/error.js +4 -3
  27. package/src/core/util/next-tick.js +1 -1
  28. package/src/core/vdom/create-element.js +6 -0
  29. package/src/core/vdom/helpers/normalize-scoped-slots.js +9 -4
  30. package/src/core/vdom/helpers/resolve-async-component.js +16 -4
  31. package/src/core/vdom/patch.js +4 -4
  32. package/src/platforms/web/compiler/modules/model.js +1 -1
  33. package/src/platforms/web/runtime/modules/dom-props.js +3 -2
  34. package/src/platforms/web/runtime/modules/events.js +4 -2
  35. package/src/platforms/web/runtime/modules/transition.js +1 -1
  36. package/src/platforms/web/server/util.js +4 -4
  37. package/src/server/template-renderer/create-async-file-mapper.js +2 -2
  38. package/types/index.d.ts +1 -2
  39. package/types/options.d.ts +3 -3
  40. package/types/umd.d.ts +48 -0
  41. package/types/vnode.d.ts +1 -1
  42. package/types/vue.d.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Vue.js v2.6.8
3
- * (c) 2014-2019 Evan You
2
+ * Vue.js v2.6.12
3
+ * (c) 2014-2020 Evan You
4
4
  * Released under the MIT License.
5
5
  */
6
6
  /* */
@@ -1852,10 +1852,11 @@ function invokeWithErrorHandling (
1852
1852
  var res;
1853
1853
  try {
1854
1854
  res = args ? handler.apply(context, args) : handler.call(context);
1855
- if (res && !res._isVue && isPromise(res)) {
1855
+ if (res && !res._isVue && isPromise(res) && !res._handled) {
1856
+ res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
1856
1857
  // issue #9511
1857
- // reassign to res to avoid catch triggering multiple times when nested calls
1858
- res = res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
1858
+ // avoid catch triggering multiple times when nested calls
1859
+ res._handled = true;
1859
1860
  }
1860
1861
  } catch (e) {
1861
1862
  handleError(e, vm, info);
@@ -1959,7 +1960,7 @@ if (typeof Promise !== 'undefined' && isNative(Promise)) {
1959
1960
  isUsingMicroTask = true;
1960
1961
  } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
1961
1962
  // Fallback to setImmediate.
1962
- // Techinically it leverages the (macro) task queue,
1963
+ // Technically it leverages the (macro) task queue,
1963
1964
  // but it is still a better choice than setTimeout.
1964
1965
  timerFunc = function () {
1965
1966
  setImmediate(flushCallbacks);
@@ -2025,7 +2026,7 @@ if (process.env.NODE_ENV !== 'production') {
2025
2026
  warn(
2026
2027
  "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
2027
2028
  'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
2028
- 'prevent conflicts with Vue internals' +
2029
+ 'prevent conflicts with Vue internals. ' +
2029
2030
  'See: https://vuejs.org/v2/api/#data',
2030
2031
  target
2031
2032
  );
@@ -2540,7 +2541,8 @@ function normalizeScopedSlots (
2540
2541
  prevSlots
2541
2542
  ) {
2542
2543
  var res;
2543
- var isStable = slots ? !!slots.$stable : true;
2544
+ var hasNormalSlots = Object.keys(normalSlots).length > 0;
2545
+ var isStable = slots ? !!slots.$stable : !hasNormalSlots;
2544
2546
  var key = slots && slots.$key;
2545
2547
  if (!slots) {
2546
2548
  res = {};
@@ -2552,7 +2554,8 @@ function normalizeScopedSlots (
2552
2554
  prevSlots &&
2553
2555
  prevSlots !== emptyObject &&
2554
2556
  key === prevSlots.$key &&
2555
- Object.keys(normalSlots).length === 0
2557
+ !hasNormalSlots &&
2558
+ !prevSlots.$hasNormal
2556
2559
  ) {
2557
2560
  // fast path 2: stable scoped slots w/ no normal slots to proxy,
2558
2561
  // only need to normalize once
@@ -2578,6 +2581,7 @@ function normalizeScopedSlots (
2578
2581
  }
2579
2582
  def(res, '$stable', isStable);
2580
2583
  def(res, '$key', key);
2584
+ def(res, '$hasNormal', hasNormalSlots);
2581
2585
  return res
2582
2586
  }
2583
2587
 
@@ -2587,8 +2591,10 @@ function normalizeScopedSlot(normalSlots, key, fn) {
2587
2591
  res = res && typeof res === 'object' && !Array.isArray(res)
2588
2592
  ? [res] // single vnode
2589
2593
  : normalizeChildren(res);
2590
- return res && res.length === 0
2591
- ? undefined
2594
+ return res && (
2595
+ res.length === 0 ||
2596
+ (res.length === 1 && res[0].isComment) // #9658
2597
+ ) ? undefined
2592
2598
  : res
2593
2599
  };
2594
2600
  // this is a slot using the new v-slot syntax without scope. although it is
@@ -2768,12 +2774,13 @@ function bindObjectProps (
2768
2774
  : data.attrs || (data.attrs = {});
2769
2775
  }
2770
2776
  var camelizedKey = camelize(key);
2771
- if (!(key in hash) && !(camelizedKey in hash)) {
2777
+ var hyphenatedKey = hyphenate(key);
2778
+ if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
2772
2779
  hash[key] = value[key];
2773
2780
 
2774
2781
  if (isSync) {
2775
2782
  var on = data.on || (data.on = {});
2776
- on[("update:" + camelizedKey)] = function ($event) {
2783
+ on[("update:" + key)] = function ($event) {
2777
2784
  value[key] = $event;
2778
2785
  };
2779
2786
  }
@@ -2904,7 +2911,7 @@ function bindDynamicKeys (baseObj, values) {
2904
2911
  if (typeof key === 'string' && key) {
2905
2912
  baseObj[values[i]] = values[i + 1];
2906
2913
  } else if (process.env.NODE_ENV !== 'production' && key !== '' && key !== null) {
2907
- // null is a speical value for explicitly removing a binding
2914
+ // null is a special value for explicitly removing a binding
2908
2915
  warn(
2909
2916
  ("Invalid value for dynamic directive argument (expected string or null): " + key),
2910
2917
  this
@@ -3400,6 +3407,12 @@ function _createElement (
3400
3407
  ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
3401
3408
  if (config.isReservedTag(tag)) {
3402
3409
  // platform built-in elements
3410
+ if (process.env.NODE_ENV !== 'production' && isDef(data) && isDef(data.nativeOn)) {
3411
+ warn(
3412
+ ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
3413
+ context
3414
+ );
3415
+ }
3403
3416
  vnode = new VNode(
3404
3417
  config.parsePlatformTagName(tag), data, children,
3405
3418
  undefined, undefined, context
@@ -3528,7 +3541,7 @@ function renderMixin (Vue) {
3528
3541
  // render self
3529
3542
  var vnode;
3530
3543
  try {
3531
- // There's no need to maintain a stack becaues all render fns are called
3544
+ // There's no need to maintain a stack because all render fns are called
3532
3545
  // separately from one another. Nested component's render fns are called
3533
3546
  // when parent component is patched.
3534
3547
  currentRenderingInstance = vm;
@@ -3612,7 +3625,7 @@ function resolveAsyncComponent (
3612
3625
  }
3613
3626
 
3614
3627
  var owner = currentRenderingInstance;
3615
- if (isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
3628
+ if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
3616
3629
  // already pending
3617
3630
  factory.owners.push(owner);
3618
3631
  }
@@ -3621,9 +3634,11 @@ function resolveAsyncComponent (
3621
3634
  return factory.loadingComp
3622
3635
  }
3623
3636
 
3624
- if (!isDef(factory.owners)) {
3637
+ if (owner && !isDef(factory.owners)) {
3625
3638
  var owners = factory.owners = [owner];
3626
- var sync = true
3639
+ var sync = true;
3640
+ var timerLoading = null;
3641
+ var timerTimeout = null
3627
3642
 
3628
3643
  ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
3629
3644
 
@@ -3634,6 +3649,14 @@ function resolveAsyncComponent (
3634
3649
 
3635
3650
  if (renderCompleted) {
3636
3651
  owners.length = 0;
3652
+ if (timerLoading !== null) {
3653
+ clearTimeout(timerLoading);
3654
+ timerLoading = null;
3655
+ }
3656
+ if (timerTimeout !== null) {
3657
+ clearTimeout(timerTimeout);
3658
+ timerTimeout = null;
3659
+ }
3637
3660
  }
3638
3661
  };
3639
3662
 
@@ -3680,7 +3703,8 @@ function resolveAsyncComponent (
3680
3703
  if (res.delay === 0) {
3681
3704
  factory.loading = true;
3682
3705
  } else {
3683
- setTimeout(function () {
3706
+ timerLoading = setTimeout(function () {
3707
+ timerLoading = null;
3684
3708
  if (isUndef(factory.resolved) && isUndef(factory.error)) {
3685
3709
  factory.loading = true;
3686
3710
  forceRender(false);
@@ -3690,7 +3714,8 @@ function resolveAsyncComponent (
3690
3714
  }
3691
3715
 
3692
3716
  if (isDef(res.timeout)) {
3693
- setTimeout(function () {
3717
+ timerTimeout = setTimeout(function () {
3718
+ timerTimeout = null;
3694
3719
  if (isUndef(factory.resolved)) {
3695
3720
  reject(
3696
3721
  process.env.NODE_ENV !== 'production'
@@ -4238,11 +4263,21 @@ var getNow = Date.now;
4238
4263
  // timestamp can either be hi-res (relative to page load) or low-res
4239
4264
  // (relative to UNIX epoch), so in order to compare time we have to use the
4240
4265
  // same timestamp type when saving the flush timestamp.
4241
- if (inBrowser && getNow() > document.createEvent('Event').timeStamp) {
4242
- // if the low-res timestamp which is bigger than the event timestamp
4243
- // (which is evaluated AFTER) it means the event is using a hi-res timestamp,
4244
- // and we need to use the hi-res version for event listeners as well.
4245
- getNow = function () { return performance.now(); };
4266
+ // All IE versions use low-res event timestamps, and have problematic clock
4267
+ // implementations (#9632)
4268
+ if (inBrowser && !isIE) {
4269
+ var performance = window.performance;
4270
+ if (
4271
+ performance &&
4272
+ typeof performance.now === 'function' &&
4273
+ getNow() > document.createEvent('Event').timeStamp
4274
+ ) {
4275
+ // if the event timestamp, although evaluated AFTER the Date.now(), is
4276
+ // smaller than it, it means the event is using a hi-res timestamp,
4277
+ // and we need to use the hi-res version for event listener timestamps as
4278
+ // well.
4279
+ getNow = function () { return performance.now(); };
4280
+ }
4246
4281
  }
4247
4282
 
4248
4283
  /**
@@ -5415,7 +5450,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
5415
5450
  value: FunctionalRenderContext
5416
5451
  });
5417
5452
 
5418
- Vue.version = '2.6.8';
5453
+ Vue.version = '2.6.12';
5419
5454
 
5420
5455
  /* */
5421
5456
 
@@ -6086,7 +6121,7 @@ function createPatchFunction (backend) {
6086
6121
  }
6087
6122
  }
6088
6123
 
6089
- function removeVnodes (parentElm, vnodes, startIdx, endIdx) {
6124
+ function removeVnodes (vnodes, startIdx, endIdx) {
6090
6125
  for (; startIdx <= endIdx; ++startIdx) {
6091
6126
  var ch = vnodes[startIdx];
6092
6127
  if (isDef(ch)) {
@@ -6197,7 +6232,7 @@ function createPatchFunction (backend) {
6197
6232
  refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
6198
6233
  addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
6199
6234
  } else if (newStartIdx > newEndIdx) {
6200
- removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);
6235
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
6201
6236
  }
6202
6237
  }
6203
6238
 
@@ -6289,7 +6324,7 @@ function createPatchFunction (backend) {
6289
6324
  if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }
6290
6325
  addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
6291
6326
  } else if (isDef(oldCh)) {
6292
- removeVnodes(elm, oldCh, 0, oldCh.length - 1);
6327
+ removeVnodes(oldCh, 0, oldCh.length - 1);
6293
6328
  } else if (isDef(oldVnode.text)) {
6294
6329
  nodeOps.setTextContent(elm, '');
6295
6330
  }
@@ -6520,7 +6555,7 @@ function createPatchFunction (backend) {
6520
6555
 
6521
6556
  // destroy old node
6522
6557
  if (isDef(parentElm)) {
6523
- removeVnodes(parentElm, [oldVnode], 0, 0);
6558
+ removeVnodes([oldVnode], 0, 0);
6524
6559
  } else if (isDef(oldVnode.tag)) {
6525
6560
  invokeDestroyHook(oldVnode);
6526
6561
  }
@@ -6870,8 +6905,10 @@ function add$1 (
6870
6905
  e.target === e.currentTarget ||
6871
6906
  // event is fired after handler attachment
6872
6907
  e.timeStamp >= attachedTimestamp ||
6873
- // #9462 bail for iOS 9 bug: event.timeStamp is 0 after history.pushState
6874
- e.timeStamp === 0 ||
6908
+ // bail for environments that have buggy event.timeStamp implementations
6909
+ // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
6910
+ // #9681 QtWebEngine event.timeStamp is negative value
6911
+ e.timeStamp <= 0 ||
6875
6912
  // #9448 bail if event is fired in another document in a multi-page
6876
6913
  // electron/nw.js app, since event.timeStamp will be using a different
6877
6914
  // starting reference
@@ -6938,10 +6975,11 @@ function updateDOMProps (oldVnode, vnode) {
6938
6975
  }
6939
6976
 
6940
6977
  for (key in oldProps) {
6941
- if (isUndef(props[key])) {
6978
+ if (!(key in props)) {
6942
6979
  elm[key] = '';
6943
6980
  }
6944
6981
  }
6982
+
6945
6983
  for (key in props) {
6946
6984
  cur = props[key];
6947
6985
  // ignore children if the node has textContent or innerHTML,
@@ -6981,7 +7019,7 @@ function updateDOMProps (oldVnode, vnode) {
6981
7019
  // skip the update if old and new VDOM state is the same.
6982
7020
  // `value` is handled separately because the DOM value may be temporarily
6983
7021
  // out of sync with VDOM state due to focus, composition and modifiers.
6984
- // This #4521 by skipping the unnecesarry `checked` update.
7022
+ // This #4521 by skipping the unnecessary `checked` update.
6985
7023
  cur !== oldProps[key]
6986
7024
  ) {
6987
7025
  // some property updates can throw
@@ -7489,8 +7527,8 @@ function enter (vnode, toggleDisplay) {
7489
7527
  var context = activeInstance;
7490
7528
  var transitionNode = activeInstance.$vnode;
7491
7529
  while (transitionNode && transitionNode.parent) {
7492
- transitionNode = transitionNode.parent;
7493
7530
  context = transitionNode.context;
7531
+ transitionNode = transitionNode.parent;
7494
7532
  }
7495
7533
 
7496
7534
  var isAppear = !context._isMounted || !vnode.isRootInsert;
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Vue.js v2.6.8
3
- * (c) 2014-2019 Evan You
2
+ * Vue.js v2.6.12
3
+ * (c) 2014-2020 Evan You
4
4
  * Released under the MIT License.
5
5
  */
6
6
  (function (global, factory) {
@@ -1852,10 +1852,11 @@
1852
1852
  var res;
1853
1853
  try {
1854
1854
  res = args ? handler.apply(context, args) : handler.call(context);
1855
- if (res && !res._isVue && isPromise(res)) {
1855
+ if (res && !res._isVue && isPromise(res) && !res._handled) {
1856
+ res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
1856
1857
  // issue #9511
1857
- // reassign to res to avoid catch triggering multiple times when nested calls
1858
- res = res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
1858
+ // avoid catch triggering multiple times when nested calls
1859
+ res._handled = true;
1859
1860
  }
1860
1861
  } catch (e) {
1861
1862
  handleError(e, vm, info);
@@ -1959,7 +1960,7 @@
1959
1960
  isUsingMicroTask = true;
1960
1961
  } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
1961
1962
  // Fallback to setImmediate.
1962
- // Techinically it leverages the (macro) task queue,
1963
+ // Technically it leverages the (macro) task queue,
1963
1964
  // but it is still a better choice than setTimeout.
1964
1965
  timerFunc = function () {
1965
1966
  setImmediate(flushCallbacks);
@@ -2025,7 +2026,7 @@
2025
2026
  warn(
2026
2027
  "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
2027
2028
  'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
2028
- 'prevent conflicts with Vue internals' +
2029
+ 'prevent conflicts with Vue internals. ' +
2029
2030
  'See: https://vuejs.org/v2/api/#data',
2030
2031
  target
2031
2032
  );
@@ -2538,7 +2539,8 @@
2538
2539
  prevSlots
2539
2540
  ) {
2540
2541
  var res;
2541
- var isStable = slots ? !!slots.$stable : true;
2542
+ var hasNormalSlots = Object.keys(normalSlots).length > 0;
2543
+ var isStable = slots ? !!slots.$stable : !hasNormalSlots;
2542
2544
  var key = slots && slots.$key;
2543
2545
  if (!slots) {
2544
2546
  res = {};
@@ -2550,7 +2552,8 @@
2550
2552
  prevSlots &&
2551
2553
  prevSlots !== emptyObject &&
2552
2554
  key === prevSlots.$key &&
2553
- Object.keys(normalSlots).length === 0
2555
+ !hasNormalSlots &&
2556
+ !prevSlots.$hasNormal
2554
2557
  ) {
2555
2558
  // fast path 2: stable scoped slots w/ no normal slots to proxy,
2556
2559
  // only need to normalize once
@@ -2576,6 +2579,7 @@
2576
2579
  }
2577
2580
  def(res, '$stable', isStable);
2578
2581
  def(res, '$key', key);
2582
+ def(res, '$hasNormal', hasNormalSlots);
2579
2583
  return res
2580
2584
  }
2581
2585
 
@@ -2585,8 +2589,10 @@
2585
2589
  res = res && typeof res === 'object' && !Array.isArray(res)
2586
2590
  ? [res] // single vnode
2587
2591
  : normalizeChildren(res);
2588
- return res && res.length === 0
2589
- ? undefined
2592
+ return res && (
2593
+ res.length === 0 ||
2594
+ (res.length === 1 && res[0].isComment) // #9658
2595
+ ) ? undefined
2590
2596
  : res
2591
2597
  };
2592
2598
  // this is a slot using the new v-slot syntax without scope. although it is
@@ -2766,12 +2772,13 @@
2766
2772
  : data.attrs || (data.attrs = {});
2767
2773
  }
2768
2774
  var camelizedKey = camelize(key);
2769
- if (!(key in hash) && !(camelizedKey in hash)) {
2775
+ var hyphenatedKey = hyphenate(key);
2776
+ if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
2770
2777
  hash[key] = value[key];
2771
2778
 
2772
2779
  if (isSync) {
2773
2780
  var on = data.on || (data.on = {});
2774
- on[("update:" + camelizedKey)] = function ($event) {
2781
+ on[("update:" + key)] = function ($event) {
2775
2782
  value[key] = $event;
2776
2783
  };
2777
2784
  }
@@ -2902,7 +2909,7 @@
2902
2909
  if (typeof key === 'string' && key) {
2903
2910
  baseObj[values[i]] = values[i + 1];
2904
2911
  } else if (key !== '' && key !== null) {
2905
- // null is a speical value for explicitly removing a binding
2912
+ // null is a special value for explicitly removing a binding
2906
2913
  warn(
2907
2914
  ("Invalid value for dynamic directive argument (expected string or null): " + key),
2908
2915
  this
@@ -3397,6 +3404,12 @@
3397
3404
  ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
3398
3405
  if (config.isReservedTag(tag)) {
3399
3406
  // platform built-in elements
3407
+ if (isDef(data) && isDef(data.nativeOn)) {
3408
+ warn(
3409
+ ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
3410
+ context
3411
+ );
3412
+ }
3400
3413
  vnode = new VNode(
3401
3414
  config.parsePlatformTagName(tag), data, children,
3402
3415
  undefined, undefined, context
@@ -3522,7 +3535,7 @@
3522
3535
  // render self
3523
3536
  var vnode;
3524
3537
  try {
3525
- // There's no need to maintain a stack becaues all render fns are called
3538
+ // There's no need to maintain a stack because all render fns are called
3526
3539
  // separately from one another. Nested component's render fns are called
3527
3540
  // when parent component is patched.
3528
3541
  currentRenderingInstance = vm;
@@ -3606,7 +3619,7 @@
3606
3619
  }
3607
3620
 
3608
3621
  var owner = currentRenderingInstance;
3609
- if (isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
3622
+ if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
3610
3623
  // already pending
3611
3624
  factory.owners.push(owner);
3612
3625
  }
@@ -3615,9 +3628,11 @@
3615
3628
  return factory.loadingComp
3616
3629
  }
3617
3630
 
3618
- if (!isDef(factory.owners)) {
3631
+ if (owner && !isDef(factory.owners)) {
3619
3632
  var owners = factory.owners = [owner];
3620
- var sync = true
3633
+ var sync = true;
3634
+ var timerLoading = null;
3635
+ var timerTimeout = null
3621
3636
 
3622
3637
  ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
3623
3638
 
@@ -3628,6 +3643,14 @@
3628
3643
 
3629
3644
  if (renderCompleted) {
3630
3645
  owners.length = 0;
3646
+ if (timerLoading !== null) {
3647
+ clearTimeout(timerLoading);
3648
+ timerLoading = null;
3649
+ }
3650
+ if (timerTimeout !== null) {
3651
+ clearTimeout(timerTimeout);
3652
+ timerTimeout = null;
3653
+ }
3631
3654
  }
3632
3655
  };
3633
3656
 
@@ -3674,7 +3697,8 @@
3674
3697
  if (res.delay === 0) {
3675
3698
  factory.loading = true;
3676
3699
  } else {
3677
- setTimeout(function () {
3700
+ timerLoading = setTimeout(function () {
3701
+ timerLoading = null;
3678
3702
  if (isUndef(factory.resolved) && isUndef(factory.error)) {
3679
3703
  factory.loading = true;
3680
3704
  forceRender(false);
@@ -3684,7 +3708,8 @@
3684
3708
  }
3685
3709
 
3686
3710
  if (isDef(res.timeout)) {
3687
- setTimeout(function () {
3711
+ timerTimeout = setTimeout(function () {
3712
+ timerTimeout = null;
3688
3713
  if (isUndef(factory.resolved)) {
3689
3714
  reject(
3690
3715
  "timeout (" + (res.timeout) + "ms)"
@@ -4230,11 +4255,21 @@
4230
4255
  // timestamp can either be hi-res (relative to page load) or low-res
4231
4256
  // (relative to UNIX epoch), so in order to compare time we have to use the
4232
4257
  // same timestamp type when saving the flush timestamp.
4233
- if (inBrowser && getNow() > document.createEvent('Event').timeStamp) {
4234
- // if the low-res timestamp which is bigger than the event timestamp
4235
- // (which is evaluated AFTER) it means the event is using a hi-res timestamp,
4236
- // and we need to use the hi-res version for event listeners as well.
4237
- getNow = function () { return performance.now(); };
4258
+ // All IE versions use low-res event timestamps, and have problematic clock
4259
+ // implementations (#9632)
4260
+ if (inBrowser && !isIE) {
4261
+ var performance = window.performance;
4262
+ if (
4263
+ performance &&
4264
+ typeof performance.now === 'function' &&
4265
+ getNow() > document.createEvent('Event').timeStamp
4266
+ ) {
4267
+ // if the event timestamp, although evaluated AFTER the Date.now(), is
4268
+ // smaller than it, it means the event is using a hi-res timestamp,
4269
+ // and we need to use the hi-res version for event listener timestamps as
4270
+ // well.
4271
+ getNow = function () { return performance.now(); };
4272
+ }
4238
4273
  }
4239
4274
 
4240
4275
  /**
@@ -5399,7 +5434,7 @@
5399
5434
  value: FunctionalRenderContext
5400
5435
  });
5401
5436
 
5402
- Vue.version = '2.6.8';
5437
+ Vue.version = '2.6.12';
5403
5438
 
5404
5439
  /* */
5405
5440
 
@@ -6070,7 +6105,7 @@
6070
6105
  }
6071
6106
  }
6072
6107
 
6073
- function removeVnodes (parentElm, vnodes, startIdx, endIdx) {
6108
+ function removeVnodes (vnodes, startIdx, endIdx) {
6074
6109
  for (; startIdx <= endIdx; ++startIdx) {
6075
6110
  var ch = vnodes[startIdx];
6076
6111
  if (isDef(ch)) {
@@ -6181,7 +6216,7 @@
6181
6216
  refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
6182
6217
  addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
6183
6218
  } else if (newStartIdx > newEndIdx) {
6184
- removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);
6219
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
6185
6220
  }
6186
6221
  }
6187
6222
 
@@ -6273,7 +6308,7 @@
6273
6308
  if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }
6274
6309
  addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
6275
6310
  } else if (isDef(oldCh)) {
6276
- removeVnodes(elm, oldCh, 0, oldCh.length - 1);
6311
+ removeVnodes(oldCh, 0, oldCh.length - 1);
6277
6312
  } else if (isDef(oldVnode.text)) {
6278
6313
  nodeOps.setTextContent(elm, '');
6279
6314
  }
@@ -6502,7 +6537,7 @@
6502
6537
 
6503
6538
  // destroy old node
6504
6539
  if (isDef(parentElm)) {
6505
- removeVnodes(parentElm, [oldVnode], 0, 0);
6540
+ removeVnodes([oldVnode], 0, 0);
6506
6541
  } else if (isDef(oldVnode.tag)) {
6507
6542
  invokeDestroyHook(oldVnode);
6508
6543
  }
@@ -6852,8 +6887,10 @@
6852
6887
  e.target === e.currentTarget ||
6853
6888
  // event is fired after handler attachment
6854
6889
  e.timeStamp >= attachedTimestamp ||
6855
- // #9462 bail for iOS 9 bug: event.timeStamp is 0 after history.pushState
6856
- e.timeStamp === 0 ||
6890
+ // bail for environments that have buggy event.timeStamp implementations
6891
+ // #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
6892
+ // #9681 QtWebEngine event.timeStamp is negative value
6893
+ e.timeStamp <= 0 ||
6857
6894
  // #9448 bail if event is fired in another document in a multi-page
6858
6895
  // electron/nw.js app, since event.timeStamp will be using a different
6859
6896
  // starting reference
@@ -6920,10 +6957,11 @@
6920
6957
  }
6921
6958
 
6922
6959
  for (key in oldProps) {
6923
- if (isUndef(props[key])) {
6960
+ if (!(key in props)) {
6924
6961
  elm[key] = '';
6925
6962
  }
6926
6963
  }
6964
+
6927
6965
  for (key in props) {
6928
6966
  cur = props[key];
6929
6967
  // ignore children if the node has textContent or innerHTML,
@@ -6963,7 +7001,7 @@
6963
7001
  // skip the update if old and new VDOM state is the same.
6964
7002
  // `value` is handled separately because the DOM value may be temporarily
6965
7003
  // out of sync with VDOM state due to focus, composition and modifiers.
6966
- // This #4521 by skipping the unnecesarry `checked` update.
7004
+ // This #4521 by skipping the unnecessary `checked` update.
6967
7005
  cur !== oldProps[key]
6968
7006
  ) {
6969
7007
  // some property updates can throw
@@ -7471,8 +7509,8 @@
7471
7509
  var context = activeInstance;
7472
7510
  var transitionNode = activeInstance.$vnode;
7473
7511
  while (transitionNode && transitionNode.parent) {
7474
- transitionNode = transitionNode.parent;
7475
7512
  context = transitionNode.context;
7513
+ transitionNode = transitionNode.parent;
7476
7514
  }
7477
7515
 
7478
7516
  var isAppear = !context._isMounted || !vnode.isRootInsert;