提交 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) {
var devtools;
var buffer = [];
var devtoolsNotInstalled = false;
function emit(event) {
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) {
if (devtools) {
devtools.emit(event, ...args);
} else {
} else if (!devtoolsNotInstalled) {
buffer.push({
event,
args
......@@ -2530,7 +2531,11 @@ export default function vueFactory(exports) {
return devtools.emit(event, ...args);
});
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__ || [];
replay.push(newHook => {
setDevtoolsHook(newHook, target);
......@@ -2538,8 +2543,16 @@ export default function vueFactory(exports) {
// at all, and keeping the buffer will cause memory leaks (#4738)
setTimeout(() => {
buffer = [];
if (!devtools) {
target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
devtoolsNotInstalled = true;
buffer = [];
}
}, 3000);
} else {
// non-browser env, assume not installed
devtoolsNotInstalled = true;
buffer = [];
}
}
......@@ -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) {
if (isBuiltInDirective(name)) {
......@@ -11554,7 +11567,7 @@ export default function vueFactory(exports) {
} // Core API ------------------------------------------------------------------
var version = "3.2.20";
var version = "3.2.21";
var _ssrUtils = {
createComponentInstance,
setupComponent,
......
......@@ -2242,7 +2242,11 @@ export default function vueFactory(exports) {
return devtools.emit(event, ...args);
});
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__ || [];
replay.push(newHook => {
setDevtoolsHook(newHook, target);
......@@ -2250,8 +2254,13 @@ export default function vueFactory(exports) {
// at all, and keeping the buffer will cause memory leaks (#4738)
setTimeout(() => {
buffer = [];
if (!devtools) {
target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
buffer = [];
}
}, 3000);
} else {
buffer = [];
}
}
......@@ -9704,7 +9713,7 @@ export default function vueFactory(exports) {
} // Core API ------------------------------------------------------------------
var version = "3.2.20";
var version = "3.2.21";
var _ssrUtils = {
createComponentInstance,
setupComponent,
......
......@@ -1589,11 +1589,12 @@ function tryWrap(fn) {
let devtools;
let buffer = [];
let devtoolsNotInstalled = false;
function emit(event, ...args) {
if (devtools) {
devtools.emit(event, ...args);
}
else {
else if (!devtoolsNotInstalled) {
buffer.push({ event, args });
}
}
......@@ -1604,7 +1605,13 @@ function setDevtoolsHook(hook, target) {
buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
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__ =
target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);
replay.push((newHook) => {
......@@ -1613,9 +1620,18 @@ function setDevtoolsHook(hook, target) {
// clear buffer after 3s - the user probably doesn't have devtools installed
// at all, and keeping the buffer will cause memory leaks (#4738)
setTimeout(() => {
buffer = [];
if (!devtools) {
target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
devtoolsNotInstalled = true;
buffer = [];
}
}, 3000);
}
else {
// non-browser env, assume not installed
devtoolsNotInstalled = true;
buffer = [];
}
}
function devtoolsInitApp(app, version) {
emit("app:init" /* APP_INIT */, app, version, {
......@@ -4412,7 +4428,7 @@ return withDirectives(h(comp), [
[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) {
if (isBuiltInDirective(name)) {
warn$1('Do not use built-in directive ids as custom directive id: ' + name);
......@@ -9085,7 +9101,7 @@ function isMemoSame(cached, memo) {
}
// Core API ------------------------------------------------------------------
const version = "3.2.20";
const version = "3.2.21";
const _ssrUtils = {
createComponentInstance,
setupComponent,
......@@ -9215,16 +9231,8 @@ function patchClass(el, value, isSVG) {
function patchStyle(el, prev, next) {
const style = el.style;
const currentDisplay = style.display;
if (!next) {
el.removeAttribute('style');
}
else if (isString(next)) {
if (prev !== next) {
style.cssText = next;
}
}
else {
const isCssString = isString(next);
if (next && !isCssString) {
for (const key in next) {
setStyle(style, key, next[key]);
}
......@@ -9236,11 +9244,22 @@ function patchStyle(el, prev, next) {
}
}
}
// 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;
else {
const currentDisplay = style.display;
if (isCssString) {
if (prev !== next) {
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$/;
......@@ -9603,22 +9622,11 @@ class VueElement extends BaseClass {
}
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() {
this._connected = true;
if (!this._instance) {
this._resolveDef();
this._update();
}
}
disconnectedCallback() {
......@@ -9637,8 +9645,18 @@ class VueElement extends BaseClass {
if (this._resolved) {
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) => {
this._resolved = true;
const { props, styles } = def;
const hasOptions = !isArray(props);
const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : [];
......@@ -9653,14 +9671,11 @@ class VueElement extends BaseClass {
}
}
}
if (numberProps) {
this._numberProps = numberProps;
this._update();
}
this._numberProps = numberProps;
// check if there are props set pre-upgrade or connect
for (const key of Object.keys(this)) {
if (key[0] !== '_') {
this._setProp(key, this[key]);
this._setProp(key, this[key], true, false);
}
}
// defining getter/setters on prototype
......@@ -9674,7 +9689,10 @@ class VueElement extends BaseClass {
}
});
}
// apply CSS
this._applyStyles(styles);
// initial render
this._update();
};
const asyncDef = this._def.__asyncLoader;
if (asyncDef) {
......@@ -9700,10 +9718,10 @@ class VueElement extends BaseClass {
/**
* @internal
*/
_setProp(key, val, shouldReflect = true) {
_setProp(key, val, shouldReflect = true, shouldUpdate = true) {
if (val !== this._props[key]) {
this._props[key] = val;
if (this._instance) {
if (shouldUpdate && this._instance) {
this._update();
}
// reflect
......
......@@ -2284,7 +2284,7 @@ return withDirectives(h(comp), [
[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) {
if (isBuiltInDirective(name)) {
warn$1('Do not use built-in directive ids as custom directive id: ' + name);
......@@ -4284,7 +4284,7 @@ const useSSRContext = () => {
};
// Core API ------------------------------------------------------------------
const version = "3.2.20";
const version = "3.2.21";
/**
* @internal only exposed in compat builds
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册