mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-21 14:13:36 +08:00
chore:更换到主分支
This commit is contained in:
211
node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js
generated
vendored
211
node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js
generated
vendored
@@ -197,25 +197,34 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (value === '' && typeof el[key] === 'boolean') {
|
||||
// e.g. <select multiple> compiles to { multiple: '' }
|
||||
el[key] = true;
|
||||
}
|
||||
else if (value == null && typeof el[key] === 'string') {
|
||||
// e.g. <div :id="null">
|
||||
el[key] = '';
|
||||
el.removeAttribute(key);
|
||||
}
|
||||
else {
|
||||
// some properties perform value validation and throw
|
||||
try {
|
||||
el[key] = value;
|
||||
if (value === '' || value == null) {
|
||||
const type = typeof el[key];
|
||||
if (value === '' && type === 'boolean') {
|
||||
// e.g. <select multiple> compiles to { multiple: '' }
|
||||
el[key] = true;
|
||||
return;
|
||||
}
|
||||
catch (e) {
|
||||
{
|
||||
runtimeCore.warn(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +
|
||||
`value ${value} is invalid.`, e);
|
||||
}
|
||||
else if (value == null && type === 'string') {
|
||||
// e.g. <div :id="null">
|
||||
el[key] = '';
|
||||
el.removeAttribute(key);
|
||||
return;
|
||||
}
|
||||
else if (type === 'number') {
|
||||
// e.g. <img :width="null">
|
||||
el[key] = 0;
|
||||
el.removeAttribute(key);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// some properties perform value validation and throw
|
||||
try {
|
||||
el[key] = value;
|
||||
}
|
||||
catch (e) {
|
||||
{
|
||||
runtimeCore.warn(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +
|
||||
`value ${value} is invalid.`, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -280,7 +289,7 @@ function parseName(name) {
|
||||
options[m[0].toLowerCase()] = true;
|
||||
}
|
||||
}
|
||||
return [name.slice(2).toLowerCase(), options];
|
||||
return [shared.hyphenate(name.slice(2)), options];
|
||||
}
|
||||
function createInvoker(initialValue, instance) {
|
||||
const invoker = (e) => {
|
||||
@@ -372,15 +381,19 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
||||
if (key === 'spellcheck' || key === 'draggable') {
|
||||
return false;
|
||||
}
|
||||
// #1787 form as an attribute must be a string, while it accepts an Element as
|
||||
// a prop
|
||||
if (key === 'form' && typeof value === 'string') {
|
||||
// #1787, #2840 form property on form elements is readonly and must be set as
|
||||
// attribute.
|
||||
if (key === 'form') {
|
||||
return false;
|
||||
}
|
||||
// #1526 <input list> must be set as attribute
|
||||
if (key === 'list' && el.tagName === 'INPUT') {
|
||||
return false;
|
||||
}
|
||||
// #2766 <textarea type> must be set as attribute
|
||||
if (key === 'type' && el.tagName === 'TEXTAREA') {
|
||||
return false;
|
||||
}
|
||||
// native onclick with string value, must be set as attribute
|
||||
if (nativeOnRE.test(key) && shared.isString(value)) {
|
||||
return false;
|
||||
@@ -393,62 +406,29 @@ function useCssModule(name = '$style') {
|
||||
{
|
||||
const instance = runtimeCore.getCurrentInstance();
|
||||
if (!instance) {
|
||||
runtimeCore.warn(`useCssModule must be called inside setup()`);
|
||||
runtimeCore.warn(`useCssModule must be called inside setup()`);
|
||||
return shared.EMPTY_OBJ;
|
||||
}
|
||||
const modules = instance.type.__cssModules;
|
||||
if (!modules) {
|
||||
runtimeCore.warn(`Current instance does not have CSS modules injected.`);
|
||||
runtimeCore.warn(`Current instance does not have CSS modules injected.`);
|
||||
return shared.EMPTY_OBJ;
|
||||
}
|
||||
const mod = modules[name];
|
||||
if (!mod) {
|
||||
|
||||
runtimeCore.warn(`Current instance does not have CSS module named "${name}".`);
|
||||
runtimeCore.warn(`Current instance does not have CSS module named "${name}".`);
|
||||
return shared.EMPTY_OBJ;
|
||||
}
|
||||
return mod;
|
||||
}
|
||||
}
|
||||
|
||||
function useCssVars(getter, scoped = false) {
|
||||
const instance = runtimeCore.getCurrentInstance();
|
||||
/* istanbul ignore next */
|
||||
if (!instance) {
|
||||
|
||||
runtimeCore.warn(`useCssVars is called without current active component instance.`);
|
||||
return;
|
||||
}
|
||||
const prefix = scoped && instance.type.__scopeId
|
||||
? `${instance.type.__scopeId.replace(/^data-v-/, '')}-`
|
||||
: ``;
|
||||
const setVars = () => setVarsOnVNode(instance.subTree, getter(instance.proxy), prefix);
|
||||
runtimeCore.onMounted(() => runtimeCore.watchEffect(setVars));
|
||||
runtimeCore.onUpdated(setVars);
|
||||
}
|
||||
function setVarsOnVNode(vnode, vars, prefix) {
|
||||
if ( vnode.shapeFlag & 128 /* SUSPENSE */) {
|
||||
const suspense = vnode.suspense;
|
||||
vnode = suspense.activeBranch;
|
||||
if (suspense.pendingBranch && !suspense.isHydrating) {
|
||||
suspense.effects.push(() => {
|
||||
setVarsOnVNode(suspense.activeBranch, vars, prefix);
|
||||
});
|
||||
}
|
||||
}
|
||||
// drill down HOCs until it's a non-component vnode
|
||||
while (vnode.component) {
|
||||
vnode = vnode.component.subTree;
|
||||
}
|
||||
if (vnode.shapeFlag & 1 /* ELEMENT */ && vnode.el) {
|
||||
const style = vnode.el.style;
|
||||
for (const key in vars) {
|
||||
style.setProperty(`--${prefix}${key}`, runtimeCore.unref(vars[key]));
|
||||
}
|
||||
}
|
||||
else if (vnode.type === runtimeCore.Fragment) {
|
||||
vnode.children.forEach(c => setVarsOnVNode(c, vars, prefix));
|
||||
}
|
||||
/**
|
||||
* Runtime helper for SFC's CSS variable injection feature.
|
||||
* @private
|
||||
*/
|
||||
function useCssVars(getter) {
|
||||
return;
|
||||
}
|
||||
|
||||
const TRANSITION = 'transition';
|
||||
@@ -510,12 +490,7 @@ function resolveTransitionProps(rawProps) {
|
||||
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
||||
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
||||
if (!(hook && hook.length > 1)) {
|
||||
if (enterDuration) {
|
||||
setTimeout(resolve, enterDuration);
|
||||
}
|
||||
else {
|
||||
whenTransitionEnds(el, type, resolve);
|
||||
}
|
||||
whenTransitionEnds(el, type, enterDuration, resolve);
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -523,30 +498,27 @@ function resolveTransitionProps(rawProps) {
|
||||
return shared.extend(baseProps, {
|
||||
onBeforeEnter(el) {
|
||||
onBeforeEnter && onBeforeEnter(el);
|
||||
addTransitionClass(el, enterActiveClass);
|
||||
addTransitionClass(el, enterFromClass);
|
||||
addTransitionClass(el, enterActiveClass);
|
||||
},
|
||||
onBeforeAppear(el) {
|
||||
onBeforeAppear && onBeforeAppear(el);
|
||||
addTransitionClass(el, appearActiveClass);
|
||||
addTransitionClass(el, appearFromClass);
|
||||
addTransitionClass(el, appearActiveClass);
|
||||
},
|
||||
onEnter: makeEnterHook(false),
|
||||
onAppear: makeEnterHook(true),
|
||||
onLeave(el, done) {
|
||||
const resolve = () => finishLeave(el, done);
|
||||
addTransitionClass(el, leaveActiveClass);
|
||||
addTransitionClass(el, leaveFromClass);
|
||||
// force reflow so *-leave-from classes immediately take effect (#2593)
|
||||
forceReflow();
|
||||
addTransitionClass(el, leaveActiveClass);
|
||||
nextFrame(() => {
|
||||
removeTransitionClass(el, leaveFromClass);
|
||||
addTransitionClass(el, leaveToClass);
|
||||
if (!(onLeave && onLeave.length > 1)) {
|
||||
if (leaveDuration) {
|
||||
setTimeout(resolve, leaveDuration);
|
||||
}
|
||||
else {
|
||||
whenTransitionEnds(el, type, resolve);
|
||||
}
|
||||
whenTransitionEnds(el, type, leaveDuration, resolve);
|
||||
}
|
||||
});
|
||||
onLeave && onLeave(el, resolve);
|
||||
@@ -612,22 +584,30 @@ function nextFrame(cb) {
|
||||
requestAnimationFrame(cb);
|
||||
});
|
||||
}
|
||||
function whenTransitionEnds(el, expectedType, cb) {
|
||||
let endId = 0;
|
||||
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
|
||||
const id = (el._endId = ++endId);
|
||||
const resolveIfNotStale = () => {
|
||||
if (id === el._endId) {
|
||||
resolve();
|
||||
}
|
||||
};
|
||||
if (explicitTimeout) {
|
||||
return setTimeout(resolveIfNotStale, explicitTimeout);
|
||||
}
|
||||
const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
|
||||
if (!type) {
|
||||
return cb();
|
||||
return resolve();
|
||||
}
|
||||
const endEvent = type + 'end';
|
||||
let ended = 0;
|
||||
const end = () => {
|
||||
el.removeEventListener(endEvent, onEnd);
|
||||
cb();
|
||||
resolveIfNotStale();
|
||||
};
|
||||
const onEnd = (e) => {
|
||||
if (e.target === el) {
|
||||
if (++ended >= propCount) {
|
||||
end();
|
||||
}
|
||||
if (e.target === el && ++ended >= propCount) {
|
||||
end();
|
||||
}
|
||||
};
|
||||
setTimeout(() => {
|
||||
@@ -701,9 +681,9 @@ function getTimeout(delays, durations) {
|
||||
function toMs(s) {
|
||||
return Number(s.slice(0, -1).replace(',', '.')) * 1000;
|
||||
}
|
||||
|
||||
function toRaw(observed) {
|
||||
return ((observed && toRaw(observed["__v_raw" /* RAW */])) || observed);
|
||||
// synchronously force layout to put elements into a certain state
|
||||
function forceReflow() {
|
||||
return document.body.offsetHeight;
|
||||
}
|
||||
|
||||
const positionMap = new WeakMap();
|
||||
@@ -754,7 +734,7 @@ const TransitionGroupImpl = {
|
||||
});
|
||||
});
|
||||
return () => {
|
||||
const rawProps = toRaw(props);
|
||||
const rawProps = runtimeCore.toRaw(props);
|
||||
const cssTransitionProps = resolveTransitionProps(rawProps);
|
||||
const tag = rawProps.tag || runtimeCore.Fragment;
|
||||
prevChildren = children;
|
||||
@@ -804,10 +784,6 @@ function applyTranslation(c) {
|
||||
return c;
|
||||
}
|
||||
}
|
||||
// this is put in a dedicated function to avoid the line from being treeshaken
|
||||
function forceReflow() {
|
||||
return document.body.offsetHeight;
|
||||
}
|
||||
function hasCSSTransform(el, root, moveClass) {
|
||||
// Detect whether an element with the move class applied has
|
||||
// CSS transitions. Since the element may be inside an entering
|
||||
@@ -907,8 +883,7 @@ const vModelText = {
|
||||
}
|
||||
};
|
||||
const vModelCheckbox = {
|
||||
created(el, binding, vnode) {
|
||||
setChecked(el, binding, vnode);
|
||||
created(el, _, vnode) {
|
||||
el._assign = getModelAssigner(vnode);
|
||||
addEventListener(el, 'change', () => {
|
||||
const modelValue = el._modelValue;
|
||||
@@ -928,18 +903,22 @@ const vModelCheckbox = {
|
||||
}
|
||||
}
|
||||
else if (shared.isSet(modelValue)) {
|
||||
const cloned = new Set(modelValue);
|
||||
if (checked) {
|
||||
modelValue.add(elementValue);
|
||||
cloned.add(elementValue);
|
||||
}
|
||||
else {
|
||||
modelValue.delete(elementValue);
|
||||
cloned.delete(elementValue);
|
||||
}
|
||||
assign(cloned);
|
||||
}
|
||||
else {
|
||||
assign(getCheckboxValue(el, checked));
|
||||
}
|
||||
});
|
||||
},
|
||||
// set initial checked on mount to wait for true-value/false-value
|
||||
mounted: setChecked,
|
||||
beforeUpdate(el, binding, vnode) {
|
||||
el._assign = getModelAssigner(vnode);
|
||||
setChecked(el, binding, vnode);
|
||||
@@ -973,12 +952,17 @@ const vModelRadio = {
|
||||
}
|
||||
};
|
||||
const vModelSelect = {
|
||||
created(el, { modifiers: { number } }, vnode) {
|
||||
created(el, { value, modifiers: { number } }, vnode) {
|
||||
const isSetModel = shared.isSet(value);
|
||||
addEventListener(el, 'change', () => {
|
||||
const selectedVal = Array.prototype.filter
|
||||
.call(el.options, (o) => o.selected)
|
||||
.map((o) => number ? shared.toNumber(getValue(o)) : getValue(o));
|
||||
el._assign(el.multiple ? selectedVal : selectedVal[0]);
|
||||
el._assign(el.multiple
|
||||
? isSetModel
|
||||
? new Set(selectedVal)
|
||||
: selectedVal
|
||||
: selectedVal[0]);
|
||||
});
|
||||
el._assign = getModelAssigner(vnode);
|
||||
},
|
||||
@@ -997,8 +981,7 @@ const vModelSelect = {
|
||||
function setSelected(el, value) {
|
||||
const isMultiple = el.multiple;
|
||||
if (isMultiple && !shared.isArray(value) && !shared.isSet(value)) {
|
||||
|
||||
runtimeCore.warn(`<select multiple v-model> expects an Array or Set value for its binding, ` +
|
||||
runtimeCore.warn(`<select multiple v-model> expects an Array or Set value for its binding, ` +
|
||||
`but got ${Object.prototype.toString.call(value).slice(8, -1)}.`);
|
||||
return;
|
||||
}
|
||||
@@ -1167,9 +1150,7 @@ const vShow = {
|
||||
}
|
||||
},
|
||||
updated(el, { value, oldValue }, { transition }) {
|
||||
if (!value === !oldValue)
|
||||
return;
|
||||
if (transition) {
|
||||
if (transition && value !== oldValue) {
|
||||
if (value) {
|
||||
transition.beforeEnter(el);
|
||||
setDisplay(el, true);
|
||||
@@ -1239,8 +1220,10 @@ const createApp = ((...args) => {
|
||||
// clear content before mounting
|
||||
container.innerHTML = '';
|
||||
const proxy = mount(container);
|
||||
container.removeAttribute('v-cloak');
|
||||
container.setAttribute('data-v-app', '');
|
||||
if (container instanceof Element) {
|
||||
container.removeAttribute('v-cloak');
|
||||
container.setAttribute('data-v-app', '');
|
||||
}
|
||||
return proxy;
|
||||
};
|
||||
return app;
|
||||
@@ -1270,17 +1253,18 @@ function injectNativeTagCheck(app) {
|
||||
function normalizeContainer(container) {
|
||||
if (shared.isString(container)) {
|
||||
const res = document.querySelector(container);
|
||||
if ( !res) {
|
||||
runtimeCore.warn(`Failed to mount app: mount target selector returned null.`);
|
||||
if (!res) {
|
||||
runtimeCore.warn(`Failed to mount app: mount target selector "${container}" returned null.`);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
if (container instanceof window.ShadowRoot &&
|
||||
container.mode === 'closed') {
|
||||
runtimeCore.warn(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`);
|
||||
}
|
||||
return container;
|
||||
}
|
||||
|
||||
Object.keys(runtimeCore).forEach(function (k) {
|
||||
if (k !== 'default') exports[k] = runtimeCore[k];
|
||||
});
|
||||
exports.Transition = Transition;
|
||||
exports.TransitionGroup = TransitionGroup;
|
||||
exports.createApp = createApp;
|
||||
@@ -1297,3 +1281,6 @@ exports.vModelText = vModelText;
|
||||
exports.vShow = vShow;
|
||||
exports.withKeys = withKeys;
|
||||
exports.withModifiers = withModifiers;
|
||||
Object.keys(runtimeCore).forEach(function (k) {
|
||||
if (k !== 'default' && !exports.hasOwnProperty(k)) exports[k] = runtimeCore[k];
|
||||
});
|
||||
|
||||
183
node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js
generated
vendored
183
node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js
generated
vendored
@@ -197,22 +197,31 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (value === '' && typeof el[key] === 'boolean') {
|
||||
// e.g. <select multiple> compiles to { multiple: '' }
|
||||
el[key] = true;
|
||||
}
|
||||
else if (value == null && typeof el[key] === 'string') {
|
||||
// e.g. <div :id="null">
|
||||
el[key] = '';
|
||||
el.removeAttribute(key);
|
||||
}
|
||||
else {
|
||||
// some properties perform value validation and throw
|
||||
try {
|
||||
el[key] = value;
|
||||
if (value === '' || value == null) {
|
||||
const type = typeof el[key];
|
||||
if (value === '' && type === 'boolean') {
|
||||
// e.g. <select multiple> compiles to { multiple: '' }
|
||||
el[key] = true;
|
||||
return;
|
||||
}
|
||||
catch (e) {
|
||||
else if (value == null && type === 'string') {
|
||||
// e.g. <div :id="null">
|
||||
el[key] = '';
|
||||
el.removeAttribute(key);
|
||||
return;
|
||||
}
|
||||
else if (type === 'number') {
|
||||
// e.g. <img :width="null">
|
||||
el[key] = 0;
|
||||
el.removeAttribute(key);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// some properties perform value validation and throw
|
||||
try {
|
||||
el[key] = value;
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,7 +285,7 @@ function parseName(name) {
|
||||
options[m[0].toLowerCase()] = true;
|
||||
}
|
||||
}
|
||||
return [name.slice(2).toLowerCase(), options];
|
||||
return [shared.hyphenate(name.slice(2)), options];
|
||||
}
|
||||
function createInvoker(initialValue, instance) {
|
||||
const invoker = (e) => {
|
||||
@@ -368,15 +377,19 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
||||
if (key === 'spellcheck' || key === 'draggable') {
|
||||
return false;
|
||||
}
|
||||
// #1787 form as an attribute must be a string, while it accepts an Element as
|
||||
// a prop
|
||||
if (key === 'form' && typeof value === 'string') {
|
||||
// #1787, #2840 form property on form elements is readonly and must be set as
|
||||
// attribute.
|
||||
if (key === 'form') {
|
||||
return false;
|
||||
}
|
||||
// #1526 <input list> must be set as attribute
|
||||
if (key === 'list' && el.tagName === 'INPUT') {
|
||||
return false;
|
||||
}
|
||||
// #2766 <textarea type> must be set as attribute
|
||||
if (key === 'type' && el.tagName === 'TEXTAREA') {
|
||||
return false;
|
||||
}
|
||||
// native onclick with string value, must be set as attribute
|
||||
if (nativeOnRE.test(key) && shared.isString(value)) {
|
||||
return false;
|
||||
@@ -403,42 +416,12 @@ function useCssModule(name = '$style') {
|
||||
}
|
||||
}
|
||||
|
||||
function useCssVars(getter, scoped = false) {
|
||||
const instance = runtimeCore.getCurrentInstance();
|
||||
/* istanbul ignore next */
|
||||
if (!instance) {
|
||||
return;
|
||||
}
|
||||
const prefix = scoped && instance.type.__scopeId
|
||||
? `${instance.type.__scopeId.replace(/^data-v-/, '')}-`
|
||||
: ``;
|
||||
const setVars = () => setVarsOnVNode(instance.subTree, getter(instance.proxy), prefix);
|
||||
runtimeCore.onMounted(() => runtimeCore.watchEffect(setVars));
|
||||
runtimeCore.onUpdated(setVars);
|
||||
}
|
||||
function setVarsOnVNode(vnode, vars, prefix) {
|
||||
if ( vnode.shapeFlag & 128 /* SUSPENSE */) {
|
||||
const suspense = vnode.suspense;
|
||||
vnode = suspense.activeBranch;
|
||||
if (suspense.pendingBranch && !suspense.isHydrating) {
|
||||
suspense.effects.push(() => {
|
||||
setVarsOnVNode(suspense.activeBranch, vars, prefix);
|
||||
});
|
||||
}
|
||||
}
|
||||
// drill down HOCs until it's a non-component vnode
|
||||
while (vnode.component) {
|
||||
vnode = vnode.component.subTree;
|
||||
}
|
||||
if (vnode.shapeFlag & 1 /* ELEMENT */ && vnode.el) {
|
||||
const style = vnode.el.style;
|
||||
for (const key in vars) {
|
||||
style.setProperty(`--${prefix}${key}`, runtimeCore.unref(vars[key]));
|
||||
}
|
||||
}
|
||||
else if (vnode.type === runtimeCore.Fragment) {
|
||||
vnode.children.forEach(c => setVarsOnVNode(c, vars, prefix));
|
||||
}
|
||||
/**
|
||||
* Runtime helper for SFC's CSS variable injection feature.
|
||||
* @private
|
||||
*/
|
||||
function useCssVars(getter) {
|
||||
return;
|
||||
}
|
||||
|
||||
const TRANSITION = 'transition';
|
||||
@@ -500,12 +483,7 @@ function resolveTransitionProps(rawProps) {
|
||||
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
||||
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
||||
if (!(hook && hook.length > 1)) {
|
||||
if (enterDuration) {
|
||||
setTimeout(resolve, enterDuration);
|
||||
}
|
||||
else {
|
||||
whenTransitionEnds(el, type, resolve);
|
||||
}
|
||||
whenTransitionEnds(el, type, enterDuration, resolve);
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -513,30 +491,27 @@ function resolveTransitionProps(rawProps) {
|
||||
return shared.extend(baseProps, {
|
||||
onBeforeEnter(el) {
|
||||
onBeforeEnter && onBeforeEnter(el);
|
||||
addTransitionClass(el, enterActiveClass);
|
||||
addTransitionClass(el, enterFromClass);
|
||||
addTransitionClass(el, enterActiveClass);
|
||||
},
|
||||
onBeforeAppear(el) {
|
||||
onBeforeAppear && onBeforeAppear(el);
|
||||
addTransitionClass(el, appearActiveClass);
|
||||
addTransitionClass(el, appearFromClass);
|
||||
addTransitionClass(el, appearActiveClass);
|
||||
},
|
||||
onEnter: makeEnterHook(false),
|
||||
onAppear: makeEnterHook(true),
|
||||
onLeave(el, done) {
|
||||
const resolve = () => finishLeave(el, done);
|
||||
addTransitionClass(el, leaveActiveClass);
|
||||
addTransitionClass(el, leaveFromClass);
|
||||
// force reflow so *-leave-from classes immediately take effect (#2593)
|
||||
forceReflow();
|
||||
addTransitionClass(el, leaveActiveClass);
|
||||
nextFrame(() => {
|
||||
removeTransitionClass(el, leaveFromClass);
|
||||
addTransitionClass(el, leaveToClass);
|
||||
if (!(onLeave && onLeave.length > 1)) {
|
||||
if (leaveDuration) {
|
||||
setTimeout(resolve, leaveDuration);
|
||||
}
|
||||
else {
|
||||
whenTransitionEnds(el, type, resolve);
|
||||
}
|
||||
whenTransitionEnds(el, type, leaveDuration, resolve);
|
||||
}
|
||||
});
|
||||
onLeave && onLeave(el, resolve);
|
||||
@@ -591,22 +566,30 @@ function nextFrame(cb) {
|
||||
requestAnimationFrame(cb);
|
||||
});
|
||||
}
|
||||
function whenTransitionEnds(el, expectedType, cb) {
|
||||
let endId = 0;
|
||||
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
|
||||
const id = (el._endId = ++endId);
|
||||
const resolveIfNotStale = () => {
|
||||
if (id === el._endId) {
|
||||
resolve();
|
||||
}
|
||||
};
|
||||
if (explicitTimeout) {
|
||||
return setTimeout(resolveIfNotStale, explicitTimeout);
|
||||
}
|
||||
const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
|
||||
if (!type) {
|
||||
return cb();
|
||||
return resolve();
|
||||
}
|
||||
const endEvent = type + 'end';
|
||||
let ended = 0;
|
||||
const end = () => {
|
||||
el.removeEventListener(endEvent, onEnd);
|
||||
cb();
|
||||
resolveIfNotStale();
|
||||
};
|
||||
const onEnd = (e) => {
|
||||
if (e.target === el) {
|
||||
if (++ended >= propCount) {
|
||||
end();
|
||||
}
|
||||
if (e.target === el && ++ended >= propCount) {
|
||||
end();
|
||||
}
|
||||
};
|
||||
setTimeout(() => {
|
||||
@@ -680,9 +663,9 @@ function getTimeout(delays, durations) {
|
||||
function toMs(s) {
|
||||
return Number(s.slice(0, -1).replace(',', '.')) * 1000;
|
||||
}
|
||||
|
||||
function toRaw(observed) {
|
||||
return ((observed && toRaw(observed["__v_raw" /* RAW */])) || observed);
|
||||
// synchronously force layout to put elements into a certain state
|
||||
function forceReflow() {
|
||||
return document.body.offsetHeight;
|
||||
}
|
||||
|
||||
const positionMap = new WeakMap();
|
||||
@@ -733,7 +716,7 @@ const TransitionGroupImpl = {
|
||||
});
|
||||
});
|
||||
return () => {
|
||||
const rawProps = toRaw(props);
|
||||
const rawProps = runtimeCore.toRaw(props);
|
||||
const cssTransitionProps = resolveTransitionProps(rawProps);
|
||||
const tag = rawProps.tag || runtimeCore.Fragment;
|
||||
prevChildren = children;
|
||||
@@ -780,10 +763,6 @@ function applyTranslation(c) {
|
||||
return c;
|
||||
}
|
||||
}
|
||||
// this is put in a dedicated function to avoid the line from being treeshaken
|
||||
function forceReflow() {
|
||||
return document.body.offsetHeight;
|
||||
}
|
||||
function hasCSSTransform(el, root, moveClass) {
|
||||
// Detect whether an element with the move class applied has
|
||||
// CSS transitions. Since the element may be inside an entering
|
||||
@@ -883,8 +862,7 @@ const vModelText = {
|
||||
}
|
||||
};
|
||||
const vModelCheckbox = {
|
||||
created(el, binding, vnode) {
|
||||
setChecked(el, binding, vnode);
|
||||
created(el, _, vnode) {
|
||||
el._assign = getModelAssigner(vnode);
|
||||
addEventListener(el, 'change', () => {
|
||||
const modelValue = el._modelValue;
|
||||
@@ -904,18 +882,22 @@ const vModelCheckbox = {
|
||||
}
|
||||
}
|
||||
else if (shared.isSet(modelValue)) {
|
||||
const cloned = new Set(modelValue);
|
||||
if (checked) {
|
||||
modelValue.add(elementValue);
|
||||
cloned.add(elementValue);
|
||||
}
|
||||
else {
|
||||
modelValue.delete(elementValue);
|
||||
cloned.delete(elementValue);
|
||||
}
|
||||
assign(cloned);
|
||||
}
|
||||
else {
|
||||
assign(getCheckboxValue(el, checked));
|
||||
}
|
||||
});
|
||||
},
|
||||
// set initial checked on mount to wait for true-value/false-value
|
||||
mounted: setChecked,
|
||||
beforeUpdate(el, binding, vnode) {
|
||||
el._assign = getModelAssigner(vnode);
|
||||
setChecked(el, binding, vnode);
|
||||
@@ -949,12 +931,17 @@ const vModelRadio = {
|
||||
}
|
||||
};
|
||||
const vModelSelect = {
|
||||
created(el, { modifiers: { number } }, vnode) {
|
||||
created(el, { value, modifiers: { number } }, vnode) {
|
||||
const isSetModel = shared.isSet(value);
|
||||
addEventListener(el, 'change', () => {
|
||||
const selectedVal = Array.prototype.filter
|
||||
.call(el.options, (o) => o.selected)
|
||||
.map((o) => number ? shared.toNumber(getValue(o)) : getValue(o));
|
||||
el._assign(el.multiple ? selectedVal : selectedVal[0]);
|
||||
el._assign(el.multiple
|
||||
? isSetModel
|
||||
? new Set(selectedVal)
|
||||
: selectedVal
|
||||
: selectedVal[0]);
|
||||
});
|
||||
el._assign = getModelAssigner(vnode);
|
||||
},
|
||||
@@ -1140,9 +1127,7 @@ const vShow = {
|
||||
}
|
||||
},
|
||||
updated(el, { value, oldValue }, { transition }) {
|
||||
if (!value === !oldValue)
|
||||
return;
|
||||
if (transition) {
|
||||
if (transition && value !== oldValue) {
|
||||
if (value) {
|
||||
transition.beforeEnter(el);
|
||||
setDisplay(el, true);
|
||||
@@ -1209,8 +1194,10 @@ const createApp = ((...args) => {
|
||||
// clear content before mounting
|
||||
container.innerHTML = '';
|
||||
const proxy = mount(container);
|
||||
container.removeAttribute('v-cloak');
|
||||
container.setAttribute('data-v-app', '');
|
||||
if (container instanceof Element) {
|
||||
container.removeAttribute('v-cloak');
|
||||
container.setAttribute('data-v-app', '');
|
||||
}
|
||||
return proxy;
|
||||
};
|
||||
return app;
|
||||
@@ -1234,9 +1221,6 @@ function normalizeContainer(container) {
|
||||
return container;
|
||||
}
|
||||
|
||||
Object.keys(runtimeCore).forEach(function (k) {
|
||||
if (k !== 'default') exports[k] = runtimeCore[k];
|
||||
});
|
||||
exports.Transition = Transition;
|
||||
exports.TransitionGroup = TransitionGroup;
|
||||
exports.createApp = createApp;
|
||||
@@ -1253,3 +1237,6 @@ exports.vModelText = vModelText;
|
||||
exports.vShow = vShow;
|
||||
exports.withKeys = withKeys;
|
||||
exports.withModifiers = withModifiers;
|
||||
Object.keys(runtimeCore).forEach(function (k) {
|
||||
if (k !== 'default' && !exports.hasOwnProperty(k)) exports[k] = runtimeCore[k];
|
||||
});
|
||||
|
||||
9
node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts
generated
vendored
9
node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts
generated
vendored
@@ -1,5 +1,4 @@
|
||||
import { BaseTransitionProps } from '@vue/runtime-core';
|
||||
import { ComponentPublicInstance } from '@vue/runtime-core';
|
||||
import { CreateAppFunction } from '@vue/runtime-core';
|
||||
import { FunctionalComponent } from '@vue/runtime-core';
|
||||
import { ObjectDirective } from '@vue/runtime-core';
|
||||
@@ -56,7 +55,11 @@ export declare interface TransitionProps extends BaseTransitionProps<Element> {
|
||||
|
||||
export declare function useCssModule(name?: string): Record<string, string>;
|
||||
|
||||
export declare function useCssVars(getter: (ctx: ComponentPublicInstance) => Record<string, string>, scoped?: boolean): void;
|
||||
/**
|
||||
* Runtime helper for SFC's CSS variable injection feature.
|
||||
* @private
|
||||
*/
|
||||
export declare function useCssVars(getter: (ctx: any) => Record<string, string>): void;
|
||||
|
||||
export declare const vModelCheckbox: ModelDirective<HTMLInputElement>;
|
||||
|
||||
@@ -1304,6 +1307,8 @@ export interface Events {
|
||||
|
||||
// focus events
|
||||
onFocus: FocusEvent
|
||||
onFocusin: FocusEvent
|
||||
onFocusout: FocusEvent
|
||||
onBlur: FocusEvent
|
||||
|
||||
// form events
|
||||
|
||||
1151
node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js
generated
vendored
1151
node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js
generated
vendored
File diff suppressed because it is too large
Load Diff
2
node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js
generated
vendored
2
node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js
generated
vendored
File diff suppressed because one or more lines are too long
173
node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
generated
vendored
173
node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
generated
vendored
@@ -1,4 +1,4 @@
|
||||
import { camelize, warn, callWithAsyncErrorHandling, getCurrentInstance, onMounted, watchEffect, onUpdated, unref, Fragment, h, BaseTransition, useTransitionState, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, createVNode, createRenderer, createHydrationRenderer } from '@vue/runtime-core';
|
||||
import { camelize, warn, callWithAsyncErrorHandling, getCurrentInstance, onMounted, watchEffect, onUpdated, Fragment, h, BaseTransition, useTransitionState, toRaw, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, createVNode, createRenderer, createHydrationRenderer } from '@vue/runtime-core';
|
||||
export * from '@vue/runtime-core';
|
||||
import { isString, isArray, hyphenate, capitalize, isSpecialBooleanAttr, isOn, isModelListener, isFunction, EMPTY_OBJ, extend, isObject, toNumber, invokeArrayFns, looseIndexOf, isSet, looseEqual, isHTMLTag, isSVGTag } from '@vue/shared';
|
||||
|
||||
@@ -194,25 +194,34 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (value === '' && typeof el[key] === 'boolean') {
|
||||
// e.g. <select multiple> compiles to { multiple: '' }
|
||||
el[key] = true;
|
||||
}
|
||||
else if (value == null && typeof el[key] === 'string') {
|
||||
// e.g. <div :id="null">
|
||||
el[key] = '';
|
||||
el.removeAttribute(key);
|
||||
}
|
||||
else {
|
||||
// some properties perform value validation and throw
|
||||
try {
|
||||
el[key] = value;
|
||||
if (value === '' || value == null) {
|
||||
const type = typeof el[key];
|
||||
if (value === '' && type === 'boolean') {
|
||||
// e.g. <select multiple> compiles to { multiple: '' }
|
||||
el[key] = true;
|
||||
return;
|
||||
}
|
||||
catch (e) {
|
||||
if ((process.env.NODE_ENV !== 'production')) {
|
||||
warn(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +
|
||||
`value ${value} is invalid.`, e);
|
||||
}
|
||||
else if (value == null && type === 'string') {
|
||||
// e.g. <div :id="null">
|
||||
el[key] = '';
|
||||
el.removeAttribute(key);
|
||||
return;
|
||||
}
|
||||
else if (type === 'number') {
|
||||
// e.g. <img :width="null">
|
||||
el[key] = 0;
|
||||
el.removeAttribute(key);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// some properties perform value validation and throw
|
||||
try {
|
||||
el[key] = value;
|
||||
}
|
||||
catch (e) {
|
||||
if ((process.env.NODE_ENV !== 'production')) {
|
||||
warn(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +
|
||||
`value ${value} is invalid.`, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -277,7 +286,7 @@ function parseName(name) {
|
||||
options[m[0].toLowerCase()] = true;
|
||||
}
|
||||
}
|
||||
return [name.slice(2).toLowerCase(), options];
|
||||
return [hyphenate(name.slice(2)), options];
|
||||
}
|
||||
function createInvoker(initialValue, instance) {
|
||||
const invoker = (e) => {
|
||||
@@ -369,15 +378,19 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
||||
if (key === 'spellcheck' || key === 'draggable') {
|
||||
return false;
|
||||
}
|
||||
// #1787 form as an attribute must be a string, while it accepts an Element as
|
||||
// a prop
|
||||
if (key === 'form' && typeof value === 'string') {
|
||||
// #1787, #2840 form property on form elements is readonly and must be set as
|
||||
// attribute.
|
||||
if (key === 'form') {
|
||||
return false;
|
||||
}
|
||||
// #1526 <input list> must be set as attribute
|
||||
if (key === 'list' && el.tagName === 'INPUT') {
|
||||
return false;
|
||||
}
|
||||
// #2766 <textarea type> must be set as attribute
|
||||
if (key === 'type' && el.tagName === 'TEXTAREA') {
|
||||
return false;
|
||||
}
|
||||
// native onclick with string value, must be set as attribute
|
||||
if (nativeOnRE.test(key) && isString(value)) {
|
||||
return false;
|
||||
@@ -408,7 +421,11 @@ function useCssModule(name = '$style') {
|
||||
}
|
||||
}
|
||||
|
||||
function useCssVars(getter, scoped = false) {
|
||||
/**
|
||||
* Runtime helper for SFC's CSS variable injection feature.
|
||||
* @private
|
||||
*/
|
||||
function useCssVars(getter) {
|
||||
const instance = getCurrentInstance();
|
||||
/* istanbul ignore next */
|
||||
if (!instance) {
|
||||
@@ -416,20 +433,17 @@ function useCssVars(getter, scoped = false) {
|
||||
warn(`useCssVars is called without current active component instance.`);
|
||||
return;
|
||||
}
|
||||
const prefix = scoped && instance.type.__scopeId
|
||||
? `${instance.type.__scopeId.replace(/^data-v-/, '')}-`
|
||||
: ``;
|
||||
const setVars = () => setVarsOnVNode(instance.subTree, getter(instance.proxy), prefix);
|
||||
onMounted(() => watchEffect(setVars));
|
||||
const setVars = () => setVarsOnVNode(instance.subTree, getter(instance.proxy));
|
||||
onMounted(() => watchEffect(setVars, { flush: 'post' }));
|
||||
onUpdated(setVars);
|
||||
}
|
||||
function setVarsOnVNode(vnode, vars, prefix) {
|
||||
if ( vnode.shapeFlag & 128 /* SUSPENSE */) {
|
||||
function setVarsOnVNode(vnode, vars) {
|
||||
if (vnode.shapeFlag & 128 /* SUSPENSE */) {
|
||||
const suspense = vnode.suspense;
|
||||
vnode = suspense.activeBranch;
|
||||
if (suspense.pendingBranch && !suspense.isHydrating) {
|
||||
suspense.effects.push(() => {
|
||||
setVarsOnVNode(suspense.activeBranch, vars, prefix);
|
||||
setVarsOnVNode(suspense.activeBranch, vars);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -440,11 +454,11 @@ function setVarsOnVNode(vnode, vars, prefix) {
|
||||
if (vnode.shapeFlag & 1 /* ELEMENT */ && vnode.el) {
|
||||
const style = vnode.el.style;
|
||||
for (const key in vars) {
|
||||
style.setProperty(`--${prefix}${key}`, unref(vars[key]));
|
||||
style.setProperty(`--${key}`, vars[key]);
|
||||
}
|
||||
}
|
||||
else if (vnode.type === Fragment) {
|
||||
vnode.children.forEach(c => setVarsOnVNode(c, vars, prefix));
|
||||
vnode.children.forEach(c => setVarsOnVNode(c, vars));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -507,12 +521,7 @@ function resolveTransitionProps(rawProps) {
|
||||
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
||||
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
||||
if (!(hook && hook.length > 1)) {
|
||||
if (enterDuration) {
|
||||
setTimeout(resolve, enterDuration);
|
||||
}
|
||||
else {
|
||||
whenTransitionEnds(el, type, resolve);
|
||||
}
|
||||
whenTransitionEnds(el, type, enterDuration, resolve);
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -520,30 +529,27 @@ function resolveTransitionProps(rawProps) {
|
||||
return extend(baseProps, {
|
||||
onBeforeEnter(el) {
|
||||
onBeforeEnter && onBeforeEnter(el);
|
||||
addTransitionClass(el, enterActiveClass);
|
||||
addTransitionClass(el, enterFromClass);
|
||||
addTransitionClass(el, enterActiveClass);
|
||||
},
|
||||
onBeforeAppear(el) {
|
||||
onBeforeAppear && onBeforeAppear(el);
|
||||
addTransitionClass(el, appearActiveClass);
|
||||
addTransitionClass(el, appearFromClass);
|
||||
addTransitionClass(el, appearActiveClass);
|
||||
},
|
||||
onEnter: makeEnterHook(false),
|
||||
onAppear: makeEnterHook(true),
|
||||
onLeave(el, done) {
|
||||
const resolve = () => finishLeave(el, done);
|
||||
addTransitionClass(el, leaveActiveClass);
|
||||
addTransitionClass(el, leaveFromClass);
|
||||
// force reflow so *-leave-from classes immediately take effect (#2593)
|
||||
forceReflow();
|
||||
addTransitionClass(el, leaveActiveClass);
|
||||
nextFrame(() => {
|
||||
removeTransitionClass(el, leaveFromClass);
|
||||
addTransitionClass(el, leaveToClass);
|
||||
if (!(onLeave && onLeave.length > 1)) {
|
||||
if (leaveDuration) {
|
||||
setTimeout(resolve, leaveDuration);
|
||||
}
|
||||
else {
|
||||
whenTransitionEnds(el, type, resolve);
|
||||
}
|
||||
whenTransitionEnds(el, type, leaveDuration, resolve);
|
||||
}
|
||||
});
|
||||
onLeave && onLeave(el, resolve);
|
||||
@@ -610,22 +616,30 @@ function nextFrame(cb) {
|
||||
requestAnimationFrame(cb);
|
||||
});
|
||||
}
|
||||
function whenTransitionEnds(el, expectedType, cb) {
|
||||
let endId = 0;
|
||||
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
|
||||
const id = (el._endId = ++endId);
|
||||
const resolveIfNotStale = () => {
|
||||
if (id === el._endId) {
|
||||
resolve();
|
||||
}
|
||||
};
|
||||
if (explicitTimeout) {
|
||||
return setTimeout(resolveIfNotStale, explicitTimeout);
|
||||
}
|
||||
const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
|
||||
if (!type) {
|
||||
return cb();
|
||||
return resolve();
|
||||
}
|
||||
const endEvent = type + 'end';
|
||||
let ended = 0;
|
||||
const end = () => {
|
||||
el.removeEventListener(endEvent, onEnd);
|
||||
cb();
|
||||
resolveIfNotStale();
|
||||
};
|
||||
const onEnd = (e) => {
|
||||
if (e.target === el) {
|
||||
if (++ended >= propCount) {
|
||||
end();
|
||||
}
|
||||
if (e.target === el && ++ended >= propCount) {
|
||||
end();
|
||||
}
|
||||
};
|
||||
setTimeout(() => {
|
||||
@@ -699,9 +713,9 @@ function getTimeout(delays, durations) {
|
||||
function toMs(s) {
|
||||
return Number(s.slice(0, -1).replace(',', '.')) * 1000;
|
||||
}
|
||||
|
||||
function toRaw(observed) {
|
||||
return ((observed && toRaw(observed["__v_raw" /* RAW */])) || observed);
|
||||
// synchronously force layout to put elements into a certain state
|
||||
function forceReflow() {
|
||||
return document.body.offsetHeight;
|
||||
}
|
||||
|
||||
const positionMap = new WeakMap();
|
||||
@@ -802,10 +816,6 @@ function applyTranslation(c) {
|
||||
return c;
|
||||
}
|
||||
}
|
||||
// this is put in a dedicated function to avoid the line from being treeshaken
|
||||
function forceReflow() {
|
||||
return document.body.offsetHeight;
|
||||
}
|
||||
function hasCSSTransform(el, root, moveClass) {
|
||||
// Detect whether an element with the move class applied has
|
||||
// CSS transitions. Since the element may be inside an entering
|
||||
@@ -905,8 +915,7 @@ const vModelText = {
|
||||
}
|
||||
};
|
||||
const vModelCheckbox = {
|
||||
created(el, binding, vnode) {
|
||||
setChecked(el, binding, vnode);
|
||||
created(el, _, vnode) {
|
||||
el._assign = getModelAssigner(vnode);
|
||||
addEventListener(el, 'change', () => {
|
||||
const modelValue = el._modelValue;
|
||||
@@ -926,18 +935,22 @@ const vModelCheckbox = {
|
||||
}
|
||||
}
|
||||
else if (isSet(modelValue)) {
|
||||
const cloned = new Set(modelValue);
|
||||
if (checked) {
|
||||
modelValue.add(elementValue);
|
||||
cloned.add(elementValue);
|
||||
}
|
||||
else {
|
||||
modelValue.delete(elementValue);
|
||||
cloned.delete(elementValue);
|
||||
}
|
||||
assign(cloned);
|
||||
}
|
||||
else {
|
||||
assign(getCheckboxValue(el, checked));
|
||||
}
|
||||
});
|
||||
},
|
||||
// set initial checked on mount to wait for true-value/false-value
|
||||
mounted: setChecked,
|
||||
beforeUpdate(el, binding, vnode) {
|
||||
el._assign = getModelAssigner(vnode);
|
||||
setChecked(el, binding, vnode);
|
||||
@@ -971,12 +984,17 @@ const vModelRadio = {
|
||||
}
|
||||
};
|
||||
const vModelSelect = {
|
||||
created(el, { modifiers: { number } }, vnode) {
|
||||
created(el, { value, modifiers: { number } }, vnode) {
|
||||
const isSetModel = isSet(value);
|
||||
addEventListener(el, 'change', () => {
|
||||
const selectedVal = Array.prototype.filter
|
||||
.call(el.options, (o) => o.selected)
|
||||
.map((o) => number ? toNumber(getValue(o)) : getValue(o));
|
||||
el._assign(el.multiple ? selectedVal : selectedVal[0]);
|
||||
el._assign(el.multiple
|
||||
? isSetModel
|
||||
? new Set(selectedVal)
|
||||
: selectedVal
|
||||
: selectedVal[0]);
|
||||
});
|
||||
el._assign = getModelAssigner(vnode);
|
||||
},
|
||||
@@ -1141,9 +1159,7 @@ const vShow = {
|
||||
}
|
||||
},
|
||||
updated(el, { value, oldValue }, { transition }) {
|
||||
if (!value === !oldValue)
|
||||
return;
|
||||
if (transition) {
|
||||
if (transition && value !== oldValue) {
|
||||
if (value) {
|
||||
transition.beforeEnter(el);
|
||||
setDisplay(el, true);
|
||||
@@ -1206,8 +1222,10 @@ const createApp = ((...args) => {
|
||||
// clear content before mounting
|
||||
container.innerHTML = '';
|
||||
const proxy = mount(container);
|
||||
container.removeAttribute('v-cloak');
|
||||
container.setAttribute('data-v-app', '');
|
||||
if (container instanceof Element) {
|
||||
container.removeAttribute('v-cloak');
|
||||
container.setAttribute('data-v-app', '');
|
||||
}
|
||||
return proxy;
|
||||
};
|
||||
return app;
|
||||
@@ -1238,10 +1256,15 @@ function normalizeContainer(container) {
|
||||
if (isString(container)) {
|
||||
const res = document.querySelector(container);
|
||||
if ((process.env.NODE_ENV !== 'production') && !res) {
|
||||
warn(`Failed to mount app: mount target selector returned null.`);
|
||||
warn(`Failed to mount app: mount target selector "${container}" returned null.`);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
if ((process.env.NODE_ENV !== 'production') &&
|
||||
container instanceof window.ShadowRoot &&
|
||||
container.mode === 'closed') {
|
||||
warn(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`);
|
||||
}
|
||||
return container;
|
||||
}
|
||||
|
||||
|
||||
1148
node_modules/@vue/runtime-dom/dist/runtime-dom.global.js
generated
vendored
1148
node_modules/@vue/runtime-dom/dist/runtime-dom.global.js
generated
vendored
File diff suppressed because it is too large
Load Diff
2
node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js
generated
vendored
2
node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js
generated
vendored
File diff suppressed because one or more lines are too long
25
node_modules/@vue/runtime-dom/package.json
generated
vendored
25
node_modules/@vue/runtime-dom/package.json
generated
vendored
@@ -1,33 +1,32 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"@vue/runtime-dom@3.0.2",
|
||||
"@vue/runtime-dom@3.0.6",
|
||||
"J:\\Github\\CURD-TS"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "@vue/runtime-dom@3.0.2",
|
||||
"_id": "@vue/runtime-dom@3.0.2",
|
||||
"_from": "@vue/runtime-dom@3.0.6",
|
||||
"_id": "@vue/runtime-dom@3.0.6",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-nRZtAyJVWAJdPYD1A5tkbgBRtxw=",
|
||||
"_integrity": "sha1-59bGGRPYcfHwIKmoG1WMj8vrqMY=",
|
||||
"_location": "/@vue/runtime-dom",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@vue/runtime-dom@3.0.2",
|
||||
"raw": "@vue/runtime-dom@3.0.6",
|
||||
"name": "@vue/runtime-dom",
|
||||
"escapedName": "@vue%2fruntime-dom",
|
||||
"scope": "@vue",
|
||||
"rawSpec": "3.0.2",
|
||||
"rawSpec": "3.0.6",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "3.0.2"
|
||||
"fetchSpec": "3.0.6"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/vue"
|
||||
],
|
||||
"_resolved": "http://192.168.250.101:4873/@vue%2fruntime-dom/-/runtime-dom-3.0.2.tgz",
|
||||
"_spec": "3.0.2",
|
||||
"_resolved": "http://192.168.250.101:4873/@vue%2fruntime-dom/-/runtime-dom-3.0.6.tgz",
|
||||
"_spec": "3.0.6",
|
||||
"_where": "J:\\Github\\CURD-TS",
|
||||
"author": {
|
||||
"name": "Evan You"
|
||||
@@ -45,8 +44,8 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@vue/runtime-core": "3.0.2",
|
||||
"@vue/shared": "3.0.2",
|
||||
"@vue/runtime-core": "3.0.6",
|
||||
"@vue/shared": "3.0.6",
|
||||
"csstype": "^2.6.8"
|
||||
},
|
||||
"description": "@vue/runtime-dom",
|
||||
@@ -70,5 +69,5 @@
|
||||
"sideEffects": false,
|
||||
"types": "dist/runtime-dom.d.ts",
|
||||
"unpkg": "dist/runtime-dom.global.js",
|
||||
"version": "3.0.2"
|
||||
"version": "3.0.6"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user