提交 22bde64a 编写于 作者: fxy060608's avatar fxy060608

build(deps): bump vue from 3.2.20 to 3.2.21

上级 348ae915
因为 它太大了无法显示 source diff 。你可以改为 查看blob
...@@ -2501,6 +2501,7 @@ export default function vueFactory(exports) { ...@@ -2501,6 +2501,7 @@ export default function vueFactory(exports) {
var devtools; var devtools;
var buffer = []; var buffer = [];
var devtoolsNotInstalled = false;
function emit(event) { function emit(event) {
for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key6 = 1; _key6 < _len5; _key6++) { for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key6 = 1; _key6 < _len5; _key6++) {
...@@ -2509,7 +2510,7 @@ export default function vueFactory(exports) { ...@@ -2509,7 +2510,7 @@ export default function vueFactory(exports) {
if (devtools) { if (devtools) {
devtools.emit(event, ...args); devtools.emit(event, ...args);
} else { } else if (!devtoolsNotInstalled) {
buffer.push({ buffer.push({
event, event,
args args
...@@ -2530,7 +2531,11 @@ export default function vueFactory(exports) { ...@@ -2530,7 +2531,11 @@ export default function vueFactory(exports) {
return devtools.emit(event, ...args); return devtools.emit(event, ...args);
}); });
buffer = []; buffer = [];
} else { } else if ( // handle late devtools injection - only do this if we are in an actual
// browser environment to avoid the timer handle stalling test runner exit
// (#4815)
// eslint-disable-next-line no-restricted-globals
typeof window !== 'undefined' && !navigator.userAgent.includes('jsdom')) {
var replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; var replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
replay.push(newHook => { replay.push(newHook => {
setDevtoolsHook(newHook, target); setDevtoolsHook(newHook, target);
...@@ -2538,8 +2543,16 @@ export default function vueFactory(exports) { ...@@ -2538,8 +2543,16 @@ export default function vueFactory(exports) {
// at all, and keeping the buffer will cause memory leaks (#4738) // at all, and keeping the buffer will cause memory leaks (#4738)
setTimeout(() => { setTimeout(() => {
buffer = []; if (!devtools) {
target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
devtoolsNotInstalled = true;
buffer = [];
}
}, 3000); }, 3000);
} else {
// non-browser env, assume not installed
devtoolsNotInstalled = true;
buffer = [];
} }
} }
...@@ -6012,7 +6025,7 @@ export default function vueFactory(exports) { ...@@ -6012,7 +6025,7 @@ export default function vueFactory(exports) {
*/ */
var isBuiltInDirective = /*#__PURE__*/makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text'); var isBuiltInDirective = /*#__PURE__*/makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
function validateDirectiveName(name) { function validateDirectiveName(name) {
if (isBuiltInDirective(name)) { if (isBuiltInDirective(name)) {
...@@ -11554,7 +11567,7 @@ export default function vueFactory(exports) { ...@@ -11554,7 +11567,7 @@ export default function vueFactory(exports) {
} // Core API ------------------------------------------------------------------ } // Core API ------------------------------------------------------------------
var version = "3.2.20"; var version = "3.2.21";
var _ssrUtils = { var _ssrUtils = {
createComponentInstance, createComponentInstance,
setupComponent, setupComponent,
......
...@@ -2242,7 +2242,11 @@ export default function vueFactory(exports) { ...@@ -2242,7 +2242,11 @@ export default function vueFactory(exports) {
return devtools.emit(event, ...args); return devtools.emit(event, ...args);
}); });
buffer = []; buffer = [];
} else { } else if ( // handle late devtools injection - only do this if we are in an actual
// browser environment to avoid the timer handle stalling test runner exit
// (#4815)
// eslint-disable-next-line no-restricted-globals
typeof window !== 'undefined' && !navigator.userAgent.includes('jsdom')) {
var replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; var replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
replay.push(newHook => { replay.push(newHook => {
setDevtoolsHook(newHook, target); setDevtoolsHook(newHook, target);
...@@ -2250,8 +2254,13 @@ export default function vueFactory(exports) { ...@@ -2250,8 +2254,13 @@ export default function vueFactory(exports) {
// at all, and keeping the buffer will cause memory leaks (#4738) // at all, and keeping the buffer will cause memory leaks (#4738)
setTimeout(() => { setTimeout(() => {
buffer = []; if (!devtools) {
target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
buffer = [];
}
}, 3000); }, 3000);
} else {
buffer = [];
} }
} }
...@@ -9704,7 +9713,7 @@ export default function vueFactory(exports) { ...@@ -9704,7 +9713,7 @@ export default function vueFactory(exports) {
} // Core API ------------------------------------------------------------------ } // Core API ------------------------------------------------------------------
var version = "3.2.20"; var version = "3.2.21";
var _ssrUtils = { var _ssrUtils = {
createComponentInstance, createComponentInstance,
setupComponent, setupComponent,
......
...@@ -1589,11 +1589,12 @@ function tryWrap(fn) { ...@@ -1589,11 +1589,12 @@ function tryWrap(fn) {
let devtools; let devtools;
let buffer = []; let buffer = [];
let devtoolsNotInstalled = false;
function emit(event, ...args) { function emit(event, ...args) {
if (devtools) { if (devtools) {
devtools.emit(event, ...args); devtools.emit(event, ...args);
} }
else { else if (!devtoolsNotInstalled) {
buffer.push({ event, args }); buffer.push({ event, args });
} }
} }
...@@ -1604,7 +1605,13 @@ function setDevtoolsHook(hook, target) { ...@@ -1604,7 +1605,13 @@ function setDevtoolsHook(hook, target) {
buffer.forEach(({ event, args }) => devtools.emit(event, ...args)); buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
buffer = []; buffer = [];
} }
else { else if (
// handle late devtools injection - only do this if we are in an actual
// browser environment to avoid the timer handle stalling test runner exit
// (#4815)
// eslint-disable-next-line no-restricted-globals
typeof window !== 'undefined' &&
!navigator.userAgent.includes('jsdom')) {
const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ = const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =
target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []); target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);
replay.push((newHook) => { replay.push((newHook) => {
...@@ -1613,9 +1620,18 @@ function setDevtoolsHook(hook, target) { ...@@ -1613,9 +1620,18 @@ function setDevtoolsHook(hook, target) {
// clear buffer after 3s - the user probably doesn't have devtools installed // clear buffer after 3s - the user probably doesn't have devtools installed
// at all, and keeping the buffer will cause memory leaks (#4738) // at all, and keeping the buffer will cause memory leaks (#4738)
setTimeout(() => { setTimeout(() => {
buffer = []; if (!devtools) {
target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
devtoolsNotInstalled = true;
buffer = [];
}
}, 3000); }, 3000);
} }
else {
// non-browser env, assume not installed
devtoolsNotInstalled = true;
buffer = [];
}
} }
function devtoolsInitApp(app, version) { function devtoolsInitApp(app, version) {
emit("app:init" /* APP_INIT */, app, version, { emit("app:init" /* APP_INIT */, app, version, {
...@@ -4412,7 +4428,7 @@ return withDirectives(h(comp), [ ...@@ -4412,7 +4428,7 @@ return withDirectives(h(comp), [
[bar, this.y] [bar, this.y]
]) ])
*/ */
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text'); const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
function validateDirectiveName(name) { function validateDirectiveName(name) {
if (isBuiltInDirective(name)) { if (isBuiltInDirective(name)) {
warn$1('Do not use built-in directive ids as custom directive id: ' + name); warn$1('Do not use built-in directive ids as custom directive id: ' + name);
...@@ -9085,7 +9101,7 @@ function isMemoSame(cached, memo) { ...@@ -9085,7 +9101,7 @@ function isMemoSame(cached, memo) {
} }
// Core API ------------------------------------------------------------------ // Core API ------------------------------------------------------------------
const version = "3.2.20"; const version = "3.2.21";
const _ssrUtils = { const _ssrUtils = {
createComponentInstance, createComponentInstance,
setupComponent, setupComponent,
...@@ -9215,16 +9231,8 @@ function patchClass(el, value, isSVG) { ...@@ -9215,16 +9231,8 @@ function patchClass(el, value, isSVG) {
function patchStyle(el, prev, next) { function patchStyle(el, prev, next) {
const style = el.style; const style = el.style;
const currentDisplay = style.display; const isCssString = isString(next);
if (!next) { if (next && !isCssString) {
el.removeAttribute('style');
}
else if (isString(next)) {
if (prev !== next) {
style.cssText = next;
}
}
else {
for (const key in next) { for (const key in next) {
setStyle(style, key, next[key]); setStyle(style, key, next[key]);
} }
...@@ -9236,11 +9244,22 @@ function patchStyle(el, prev, next) { ...@@ -9236,11 +9244,22 @@ function patchStyle(el, prev, next) {
} }
} }
} }
// indicates that the `display` of the element is controlled by `v-show`, else {
// so we always keep the current `display` value regardless of the `style` value, const currentDisplay = style.display;
// thus handing over control to `v-show`. if (isCssString) {
if ('_vod' in el) { if (prev !== next) {
style.display = currentDisplay; style.cssText = next;
}
}
else if (prev) {
el.removeAttribute('style');
}
// indicates that the `display` of the element is controlled by `v-show`,
// so we always keep the current `display` value regardless of the `style`
// value, thus handing over control to `v-show`.
if ('_vod' in el) {
style.display = currentDisplay;
}
} }
} }
const importantRE = /\s*!important$/; const importantRE = /\s*!important$/;
...@@ -9603,22 +9622,11 @@ class VueElement extends BaseClass { ...@@ -9603,22 +9622,11 @@ class VueElement extends BaseClass {
} }
this.attachShadow({ mode: 'open' }); this.attachShadow({ mode: 'open' });
} }
// set initial attrs
for (let i = 0; i < this.attributes.length; i++) {
this._setAttr(this.attributes[i].name);
}
// watch future attr changes
new MutationObserver(mutations => {
for (const m of mutations) {
this._setAttr(m.attributeName);
}
}).observe(this, { attributes: true });
} }
connectedCallback() { connectedCallback() {
this._connected = true; this._connected = true;
if (!this._instance) { if (!this._instance) {
this._resolveDef(); this._resolveDef();
this._update();
} }
} }
disconnectedCallback() { disconnectedCallback() {
...@@ -9637,8 +9645,18 @@ class VueElement extends BaseClass { ...@@ -9637,8 +9645,18 @@ class VueElement extends BaseClass {
if (this._resolved) { if (this._resolved) {
return; return;
} }
this._resolved = true;
// set initial attrs
for (let i = 0; i < this.attributes.length; i++) {
this._setAttr(this.attributes[i].name);
}
// watch future attr changes
new MutationObserver(mutations => {
for (const m of mutations) {
this._setAttr(m.attributeName);
}
}).observe(this, { attributes: true });
const resolve = (def) => { const resolve = (def) => {
this._resolved = true;
const { props, styles } = def; const { props, styles } = def;
const hasOptions = !isArray(props); const hasOptions = !isArray(props);
const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : []; const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : [];
...@@ -9653,14 +9671,11 @@ class VueElement extends BaseClass { ...@@ -9653,14 +9671,11 @@ class VueElement extends BaseClass {
} }
} }
} }
if (numberProps) { this._numberProps = numberProps;
this._numberProps = numberProps;
this._update();
}
// check if there are props set pre-upgrade or connect // check if there are props set pre-upgrade or connect
for (const key of Object.keys(this)) { for (const key of Object.keys(this)) {
if (key[0] !== '_') { if (key[0] !== '_') {
this._setProp(key, this[key]); this._setProp(key, this[key], true, false);
} }
} }
// defining getter/setters on prototype // defining getter/setters on prototype
...@@ -9674,7 +9689,10 @@ class VueElement extends BaseClass { ...@@ -9674,7 +9689,10 @@ class VueElement extends BaseClass {
} }
}); });
} }
// apply CSS
this._applyStyles(styles); this._applyStyles(styles);
// initial render
this._update();
}; };
const asyncDef = this._def.__asyncLoader; const asyncDef = this._def.__asyncLoader;
if (asyncDef) { if (asyncDef) {
...@@ -9700,10 +9718,10 @@ class VueElement extends BaseClass { ...@@ -9700,10 +9718,10 @@ class VueElement extends BaseClass {
/** /**
* @internal * @internal
*/ */
_setProp(key, val, shouldReflect = true) { _setProp(key, val, shouldReflect = true, shouldUpdate = true) {
if (val !== this._props[key]) { if (val !== this._props[key]) {
this._props[key] = val; this._props[key] = val;
if (this._instance) { if (shouldUpdate && this._instance) {
this._update(); this._update();
} }
// reflect // reflect
......
...@@ -2284,7 +2284,7 @@ return withDirectives(h(comp), [ ...@@ -2284,7 +2284,7 @@ return withDirectives(h(comp), [
[bar, this.y] [bar, this.y]
]) ])
*/ */
const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text'); const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
function validateDirectiveName(name) { function validateDirectiveName(name) {
if (isBuiltInDirective(name)) { if (isBuiltInDirective(name)) {
warn$1('Do not use built-in directive ids as custom directive id: ' + name); warn$1('Do not use built-in directive ids as custom directive id: ' + name);
...@@ -4284,7 +4284,7 @@ const useSSRContext = () => { ...@@ -4284,7 +4284,7 @@ const useSSRContext = () => {
}; };
// Core API ------------------------------------------------------------------ // Core API ------------------------------------------------------------------
const version = "3.2.20"; const version = "3.2.21";
/** /**
* @internal only exposed in compat builds * @internal only exposed in compat builds
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册