讨论加特殊图标

This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-03-21 15:49:12 +08:00
parent 0ed747a035
commit dd619643c9
202 changed files with 2973 additions and 2866 deletions

View File

@@ -1,3 +1,8 @@
/**
* @vue/compiler-core v3.4.15
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
@@ -1509,7 +1514,7 @@ function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [
if (includeAll || isRefed && !isLocal) {
onIdentifier(node, parent, parentStack, isRefed, isLocal);
}
} else if (node.type === "ObjectProperty" && parent.type === "ObjectPattern") {
} else if (node.type === "ObjectProperty" && (parent == null ? void 0 : parent.type) === "ObjectPattern") {
node.inPattern = true;
} else if (isFunctionType(node)) {
if (node.scopeIds) {
@@ -2562,7 +2567,7 @@ function onCloseTag(el, end, isImplied = false) {
}
{
const props = el.props;
if (isCompatEnabled(
if (!tokenizer.inSFCRoot && isCompatEnabled(
"COMPILER_NATIVE_TEMPLATE",
currentOptions
) && el.tag === "template" && !isFragmentTemplate(el)) {
@@ -3171,8 +3176,7 @@ function createTransformContext(root, {
}
context.parent.children.splice(removalIndex, 1);
},
onNodeRemoved: () => {
},
onNodeRemoved: shared.NOOP,
addIdentifiers(exp) {
{
if (shared.isString(exp)) {

View File

@@ -1,6 +1,6 @@
{
"name": "@vue/compiler-core",
"version": "3.4.5",
"version": "3.4.15",
"description": "@vue/compiler-core",
"main": "index.js",
"module": "dist/compiler-core.esm-bundler.js",
@@ -17,6 +17,7 @@
"development": "./dist/compiler-core.cjs.js",
"default": "./dist/compiler-core.cjs.prod.js"
},
"module": "./dist/compiler-core.esm-bundler.js",
"import": "./dist/compiler-core.esm-bundler.js",
"require": "./index.js"
},
@@ -49,7 +50,7 @@
"entities": "^4.5.0",
"estree-walker": "^2.0.2",
"source-map-js": "^1.0.2",
"@vue/shared": "3.4.5"
"@vue/shared": "3.4.15"
},
"devDependencies": {
"@babel/types": "^7.23.6"

View File

@@ -1,3 +1,8 @@
/**
* @vue/compiler-dom v3.4.15
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });

View File

@@ -1,6 +1,6 @@
{
"name": "@vue/compiler-dom",
"version": "3.4.5",
"version": "3.4.15",
"description": "@vue/compiler-dom",
"main": "index.js",
"module": "dist/compiler-dom.esm-bundler.js",
@@ -19,6 +19,7 @@
"development": "./dist/compiler-dom.cjs.js",
"default": "./dist/compiler-dom.cjs.prod.js"
},
"module": "./dist/compiler-dom.esm-bundler.js",
"import": "./dist/compiler-dom.esm-bundler.js",
"require": "./index.js"
},
@@ -50,7 +51,7 @@
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-dom#readme",
"dependencies": {
"@vue/shared": "3.4.5",
"@vue/compiler-core": "3.4.5"
"@vue/shared": "3.4.15",
"@vue/compiler-core": "3.4.15"
}
}

View File

@@ -1,3 +1,8 @@
/**
* @vue/compiler-ssr v3.4.15
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });

View File

@@ -1,6 +1,6 @@
{
"name": "@vue/compiler-ssr",
"version": "3.4.5",
"version": "3.4.15",
"description": "@vue/compiler-ssr",
"main": "dist/compiler-ssr.cjs.js",
"types": "dist/compiler-ssr.d.ts",
@@ -28,7 +28,7 @@
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-ssr#readme",
"dependencies": {
"@vue/shared": "3.4.5",
"@vue/compiler-dom": "3.4.5"
"@vue/shared": "3.4.15",
"@vue/compiler-dom": "3.4.15"
}
}

View File

@@ -1,3 +1,8 @@
/**
* @vue/reactivity v3.4.15
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
@@ -109,7 +114,7 @@ class ReactiveEffect {
/**
* @internal
*/
this._dirtyLevel = 3;
this._dirtyLevel = 2;
/**
* @internal
*/
@@ -121,7 +126,7 @@ class ReactiveEffect {
/**
* @internal
*/
this._queryings = 0;
this._shouldSchedule = false;
/**
* @internal
*/
@@ -130,10 +135,9 @@ class ReactiveEffect {
}
get dirty() {
if (this._dirtyLevel === 1) {
this._dirtyLevel = 0;
this._queryings++;
pauseTracking();
for (const dep of this.deps) {
for (let i = 0; i < this._depsLength; i++) {
const dep = this.deps[i];
if (dep.computed) {
triggerComputed(dep.computed);
if (this._dirtyLevel >= 2) {
@@ -141,13 +145,15 @@ class ReactiveEffect {
}
}
}
if (this._dirtyLevel < 2) {
this._dirtyLevel = 0;
}
resetTracking();
this._queryings--;
}
return this._dirtyLevel >= 2;
}
set dirty(v) {
this._dirtyLevel = v ? 3 : 0;
this._dirtyLevel = v ? 2 : 0;
}
run() {
this._dirtyLevel = 0;
@@ -269,22 +275,26 @@ const queueEffectSchedulers = [];
function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
pauseScheduling();
for (const effect2 of dep.keys()) {
if (!effect2.allowRecurse && effect2._runnings) {
continue;
}
if (effect2._dirtyLevel < dirtyLevel && (!effect2._runnings || dirtyLevel !== 2)) {
if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) {
const lastDirtyLevel = effect2._dirtyLevel;
effect2._dirtyLevel = dirtyLevel;
if (lastDirtyLevel === 0 && (!effect2._queryings || dirtyLevel !== 2)) {
if (lastDirtyLevel === 0) {
effect2._shouldSchedule = true;
effect2.trigger();
if (effect2.scheduler) {
queueEffectSchedulers.push(effect2.scheduler);
}
}
}
}
scheduleEffects(dep);
resetScheduling();
}
function scheduleEffects(dep) {
for (const effect2 of dep.keys()) {
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) {
effect2._shouldSchedule = false;
queueEffectSchedulers.push(effect2.scheduler);
}
}
}
const createDep = (cleanup, computed) => {
const dep = /* @__PURE__ */ new Map();
@@ -361,7 +371,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
if (dep) {
triggerEffects(
dep,
3);
2);
}
}
resetScheduling();
@@ -915,7 +925,8 @@ class ComputedRefImpl {
this["__v_isReadonly"] = false;
this.effect = new ReactiveEffect(
() => getter(this._value),
() => triggerRefValue(this, 1)
() => triggerRefValue(this, 1),
() => this.dep && scheduleEffects(this.dep)
);
this.effect.computed = this;
this.effect.active = this._cacheable = !isSSR;
@@ -923,12 +934,15 @@ class ComputedRefImpl {
}
get value() {
const self = toRaw(this);
trackRefValue(self);
if (!self._cacheable || self.effect.dirty) {
if (shared.hasChanged(self._value, self._value = self.effect.run())) {
triggerRefValue(self, 2);
}
}
trackRefValue(self);
if (self.effect._dirtyLevel >= 1) {
triggerRefValue(self, 1);
}
return self._value;
}
set value(newValue) {
@@ -969,7 +983,7 @@ function trackRefValue(ref2) {
)));
}
}
function triggerRefValue(ref2, dirtyLevel = 3, newVal) {
function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
ref2 = toRaw(ref2);
const dep = ref2.dep;
if (dep) {
@@ -1011,12 +1025,12 @@ class RefImpl {
if (shared.hasChanged(newVal, this._rawValue)) {
this._rawValue = newVal;
this._value = useDirectValue ? newVal : toReactive(newVal);
triggerRefValue(this, 3);
triggerRefValue(this, 2);
}
}
}
function triggerRef(ref2) {
triggerRefValue(ref2, 3);
triggerRefValue(ref2, 2);
}
function unref(ref2) {
return isRef(ref2) ? ref2.value : ref2;

View File

@@ -1,6 +1,6 @@
{
"name": "@vue/reactivity",
"version": "3.4.5",
"version": "3.4.15",
"description": "@vue/reactivity",
"main": "index.js",
"module": "dist/reactivity.esm-bundler.js",
@@ -19,6 +19,7 @@
"development": "./dist/reactivity.cjs.js",
"default": "./dist/reactivity.cjs.prod.js"
},
"module": "./dist/reactivity.esm-bundler.js",
"import": "./dist/reactivity.esm-bundler.js",
"require": "./index.js"
},
@@ -49,6 +50,6 @@
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/reactivity#readme",
"dependencies": {
"@vue/shared": "3.4.5"
"@vue/shared": "3.4.15"
}
}

View File

@@ -1,3 +1,8 @@
/**
* @vue/runtime-core v3.4.15
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
@@ -102,7 +107,7 @@ function handleError(err, instance, type, throwInDev = true) {
if (instance) {
let cur = instance.parent;
const exposedInstance = instance.proxy;
const errorInfo = `https://vuejs.org/errors/#runtime-${type}`;
const errorInfo = `https://vuejs.org/error-reference/#runtime-${type}`;
while (cur) {
const errorCapturedHooks = cur.ec;
if (errorCapturedHooks) {
@@ -214,14 +219,15 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
}
function flushPostFlushCbs(seen) {
if (pendingPostFlushCbs.length) {
const deduped = [...new Set(pendingPostFlushCbs)];
const deduped = [...new Set(pendingPostFlushCbs)].sort(
(a, b) => getId(a) - getId(b)
);
pendingPostFlushCbs.length = 0;
if (activePostFlushCbs) {
activePostFlushCbs.push(...deduped);
return;
}
activePostFlushCbs = deduped;
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
activePostFlushCbs[postFlushIndex]();
}
@@ -509,7 +515,7 @@ function renderComponentRoot(instance) {
setCurrentRenderingInstance(prev);
return result;
}
function filterSingleRoot(children) {
function filterSingleRoot(children, recurse = true) {
let singleRoot;
for (let i = 0; i < children.length; i++) {
const child = children[i];
@@ -603,8 +609,6 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
return false;
}
function updateHOCHostEl({ vnode, parent }, el) {
if (!el)
return;
while (parent) {
const root = parent.subTree;
if (root.suspense && root.suspense.activeBranch === vnode) {
@@ -687,6 +691,10 @@ const SuspenseImpl = {
rendererInternals
);
} else {
if (parentSuspense && parentSuspense.deps > 0) {
n2.suspense = n1.suspense;
return;
}
patchSuspense(
n1,
n2,
@@ -935,6 +943,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
}
}
const timeout = vnode.props ? shared.toNumber(vnode.props.timeout) : void 0;
const initialAnchor = anchor;
const suspense = {
vnode,
parent: parentSuspense,
@@ -942,7 +951,6 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
namespace,
container,
hiddenContainer,
anchor,
deps: 0,
pendingId: suspenseId++,
timeout: typeof timeout === "number" ? timeout : -1,
@@ -973,20 +981,21 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
move(
pendingBranch,
container2,
next(activeBranch),
anchor === initialAnchor ? next(activeBranch) : anchor,
0
);
queuePostFlushCb(effects);
}
};
}
let { anchor: anchor2 } = suspense;
if (activeBranch) {
anchor2 = next(activeBranch);
if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {
anchor = next(activeBranch);
}
unmount(activeBranch, parentComponent2, suspense, true);
}
if (!delayEnter) {
move(pendingBranch, container2, anchor2, 0);
move(pendingBranch, container2, anchor, 0);
}
}
setActiveBranch(suspense, pendingBranch);
@@ -1204,7 +1213,12 @@ function queueEffectWithSuspense(fn, suspense) {
function setActiveBranch(suspense, branch) {
suspense.activeBranch = branch;
const { vnode, parentComponent } = suspense;
const el = vnode.el = branch.el;
let el = branch.el;
while (!el && branch.component) {
branch = branch.component.subTree;
el = branch.el;
}
vnode.el = el;
if (parentComponent && parentComponent.subTree === vnode) {
parentComponent.vnode.el = el;
updateHOCHostEl(parentComponent, el);
@@ -1405,14 +1419,9 @@ function instanceWatch(source, value, options) {
cb = value.handler;
options = value;
}
const cur = currentInstance;
setCurrentInstance(this);
const reset = setCurrentInstance(this);
const res = doWatch(getter, cb.bind(publicThis), options);
if (cur) {
setCurrentInstance(cur);
} else {
unsetCurrentInstance();
}
reset();
return res;
}
function createPathGetter(ctx, path) {
@@ -1459,11 +1468,10 @@ function traverse(value, depth, currentDepth = 0, seen) {
}
function withDirectives(vnode, directives) {
const internalInstance = currentRenderingInstance;
if (internalInstance === null) {
if (currentRenderingInstance === null) {
return vnode;
}
const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy;
const bindings = vnode.dirs || (vnode.dirs = []);
for (let i = 0; i < directives.length; i++) {
let [dir, value, arg, modifiers = shared.EMPTY_OBJ] = directives[i];
@@ -2219,9 +2227,9 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
return;
}
reactivity.pauseTracking();
setCurrentInstance(target);
const reset = setCurrentInstance(target);
const res = callWithAsyncErrorHandling(hook, target, type, args);
unsetCurrentInstance();
reset();
reactivity.resetTracking();
return res;
});
@@ -2527,50 +2535,6 @@ function useSlots() {
function useAttrs() {
return getContext().attrs;
}
function useModel(props, name, options = shared.EMPTY_OBJ) {
const i = getCurrentInstance();
const camelizedName = shared.camelize(name);
const hyphenatedName = shared.hyphenate(name);
const res = reactivity.customRef((track, trigger) => {
let localValue;
watchSyncEffect(() => {
const propValue = props[name];
if (shared.hasChanged(localValue, propValue)) {
localValue = propValue;
trigger();
}
});
return {
get() {
track();
return options.get ? options.get(localValue) : localValue;
},
set(value) {
const rawProps = i.vnode.props;
if (!(rawProps && // check if parent has passed v-model
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && shared.hasChanged(value, localValue)) {
localValue = value;
trigger();
}
i.emit(`update:${name}`, options.set ? options.set(value) : value);
}
};
});
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
res[Symbol.iterator] = () => {
let i2 = 0;
return {
next() {
if (i2 < 2) {
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
} else {
return { done: true };
}
}
};
};
return res;
}
function getContext() {
const i = getCurrentInstance();
return i.setupContext || (i.setupContext = createSetupContext(i));
@@ -3279,12 +3243,12 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
if (key in propsDefaults) {
value = propsDefaults[key];
} else {
setCurrentInstance(instance);
const reset = setCurrentInstance(instance);
value = propsDefaults[key] = defaultValue.call(
null,
props
);
unsetCurrentInstance();
reset();
}
} else {
value = defaultValue;
@@ -3507,9 +3471,10 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
} else {
const _isString = shared.isString(ref);
const _isRef = reactivity.isRef(ref);
const isVFor = rawRef.f;
if (_isString || _isRef) {
const doSet = () => {
if (rawRef.f) {
if (isVFor) {
const existing = _isString ? shared.hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value;
if (isUnmount) {
shared.isArray(existing) && shared.remove(existing, refValue);
@@ -3540,11 +3505,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
refs[rawRef.k] = value;
} else ;
};
if (value) {
if (isUnmount || isVFor) {
doSet();
} else {
doSet.id = -1;
queuePostRenderEffect(doSet, parentSuspense);
} else {
doSet();
}
}
}
@@ -4456,7 +4421,11 @@ function baseCreateRenderer(options, createHydrationFns) {
hostInsert(fragmentStartAnchor, container, anchor);
hostInsert(fragmentEndAnchor, container, anchor);
mountChildren(
n2.children,
// #10007
// such fragment like `<></>` will be compiled into
// a fragment which doesn't have a children.
// In this case fallback to an empty array
n2.children || [],
container,
fragmentEndAnchor,
parentComponent,
@@ -5204,6 +5173,7 @@ function baseCreateRenderer(options, createHydrationFns) {
}
return hostNextSibling(vnode.anchor || vnode.el);
};
let isFlushing = false;
const render = (vnode, container, namespace) => {
if (vnode == null) {
if (container._vnode) {
@@ -5220,8 +5190,12 @@ function baseCreateRenderer(options, createHydrationFns) {
namespace
);
}
flushPreFlushCbs();
flushPostFlushCbs();
if (!isFlushing) {
isFlushing = true;
flushPreFlushCbs();
flushPostFlushCbs();
isFlushing = false;
}
container._vnode = vnode;
};
const internals = {
@@ -6031,8 +6005,13 @@ let setInSSRSetupState;
);
}
const setCurrentInstance = (instance) => {
const prev = currentInstance;
internalSetCurrentInstance(instance);
instance.scope.on();
return () => {
instance.scope.off();
internalSetCurrentInstance(prev);
};
};
const unsetCurrentInstance = () => {
currentInstance && currentInstance.scope.off();
@@ -6059,7 +6038,7 @@ function setupStatefulComponent(instance, isSSR) {
const { setup } = Component;
if (setup) {
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
setCurrentInstance(instance);
const reset = setCurrentInstance(instance);
reactivity.pauseTracking();
const setupResult = callWithErrorHandling(
setup,
@@ -6071,7 +6050,7 @@ function setupStatefulComponent(instance, isSSR) {
]
);
reactivity.resetTracking();
unsetCurrentInstance();
reset();
if (shared.isPromise(setupResult)) {
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
if (isSSR) {
@@ -6140,13 +6119,13 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
}
}
{
setCurrentInstance(instance);
const reset = setCurrentInstance(instance);
reactivity.pauseTracking();
try {
applyOptions(instance);
} finally {
reactivity.resetTracking();
unsetCurrentInstance();
reset();
}
}
}
@@ -6203,6 +6182,51 @@ const computed = (getterOrOptions, debugOptions) => {
return reactivity.computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
};
function useModel(props, name, options = shared.EMPTY_OBJ) {
const i = getCurrentInstance();
const camelizedName = shared.camelize(name);
const hyphenatedName = shared.hyphenate(name);
const res = reactivity.customRef((track, trigger) => {
let localValue;
watchSyncEffect(() => {
const propValue = props[name];
if (shared.hasChanged(localValue, propValue)) {
localValue = propValue;
trigger();
}
});
return {
get() {
track();
return options.get ? options.get(localValue) : localValue;
},
set(value) {
const rawProps = i.vnode.props;
if (!(rawProps && // check if parent has passed v-model
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && shared.hasChanged(value, localValue)) {
localValue = value;
trigger();
}
i.emit(`update:${name}`, options.set ? options.set(value) : value);
}
};
});
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
res[Symbol.iterator] = () => {
let i2 = 0;
return {
next() {
if (i2 < 2) {
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
} else {
return { done: true };
}
}
};
};
return res;
}
function h(type, propsOrChildren, children) {
const l = arguments.length;
if (l === 2) {
@@ -6255,7 +6279,7 @@ function isMemoSame(cached, memo) {
return true;
}
const version = "3.4.5";
const version = "3.4.15";
const warn$1 = shared.NOOP;
const ErrorTypeStrings = ErrorTypeStrings$1 ;
const devtools = void 0;

View File

@@ -1,6 +1,6 @@
{
"name": "@vue/runtime-core",
"version": "3.4.5",
"version": "3.4.15",
"description": "@vue/runtime-core",
"main": "index.js",
"module": "dist/runtime-core.esm-bundler.js",
@@ -17,6 +17,7 @@
"development": "./dist/runtime-core.cjs.js",
"default": "./dist/runtime-core.cjs.prod.js"
},
"module": "./dist/runtime-core.esm-bundler.js",
"import": "./dist/runtime-core.esm-bundler.js",
"require": "./index.js"
},
@@ -45,7 +46,7 @@
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
"dependencies": {
"@vue/shared": "3.4.5",
"@vue/reactivity": "3.4.5"
"@vue/shared": "3.4.15",
"@vue/reactivity": "3.4.15"
}
}

View File

@@ -1,3 +1,8 @@
/**
* @vue/runtime-dom v3.4.15
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
@@ -407,6 +412,7 @@ function useCssVars(getter) {
function patchStyle(el, prev, next) {
const style = el.style;
const currentDisplay = style.display;
const isCssString = shared.isString(next);
if (next && !isCssString) {
if (prev && !shared.isString(prev)) {
@@ -420,7 +426,6 @@ function patchStyle(el, prev, next) {
setStyle(style, key, next[key]);
}
} else {
const currentDisplay = style.display;
if (isCssString) {
if (prev !== next) {
const cssVarText = style[CSS_VAR_TEXT];
@@ -432,9 +437,9 @@ function patchStyle(el, prev, next) {
} else if (prev) {
el.removeAttribute("style");
}
if (vShowOldKey in el) {
style.display = currentDisplay;
}
}
if (vShowOldKey in el) {
style.display = currentDisplay;
}
}
const importantRE = /\s*!important$/;
@@ -1163,32 +1168,49 @@ const vModelSelect = {
el[assignKey](
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
);
el._assigning = true;
runtimeCore.nextTick(() => {
el._assigning = false;
});
});
el[assignKey] = getModelAssigner(vnode);
},
// set value in mounted & updated because <select> relies on its children
// <option>s.
mounted(el, { value }) {
setSelected(el, value);
mounted(el, { value, oldValue, modifiers: { number } }) {
setSelected(el, value, oldValue, number);
},
beforeUpdate(el, _binding, vnode) {
el[assignKey] = getModelAssigner(vnode);
},
updated(el, { value }) {
setSelected(el, value);
updated(el, { value, oldValue, modifiers: { number } }) {
if (!el._assigning) {
setSelected(el, value, oldValue, number);
}
}
};
function setSelected(el, value) {
function setSelected(el, value, oldValue, number) {
const isMultiple = el.multiple;
if (isMultiple && !shared.isArray(value) && !shared.isSet(value)) {
const isArrayValue = shared.isArray(value);
if (isMultiple && !isArrayValue && !shared.isSet(value)) {
return;
}
if (isArrayValue && shared.looseEqual(value, oldValue)) {
return;
}
for (let i = 0, l = el.options.length; i < l; i++) {
const option = el.options[i];
const optionValue = getValue(option);
if (isMultiple) {
if (shared.isArray(value)) {
option.selected = shared.looseIndexOf(value, optionValue) > -1;
if (isArrayValue) {
const optionType = typeof optionValue;
if (optionType === "string" || optionType === "number") {
option.selected = value.includes(
number ? shared.looseToNumber(optionValue) : optionValue
);
} else {
option.selected = shared.looseIndexOf(value, optionValue) > -1;
}
} else {
option.selected = value.has(optionValue);
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vue/runtime-dom",
"version": "3.4.5",
"version": "3.4.15",
"description": "@vue/runtime-dom",
"main": "index.js",
"module": "dist/runtime-dom.esm-bundler.js",
@@ -18,6 +18,7 @@
"development": "./dist/runtime-dom.cjs.js",
"default": "./dist/runtime-dom.cjs.prod.js"
},
"module": "./dist/runtime-dom.esm-bundler.js",
"import": "./dist/runtime-dom.esm-bundler.js",
"require": "./index.js"
},
@@ -49,7 +50,7 @@
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-dom#readme",
"dependencies": {
"csstype": "^3.1.3",
"@vue/shared": "3.4.5",
"@vue/runtime-core": "3.4.5"
"@vue/shared": "3.4.15",
"@vue/runtime-core": "3.4.15"
}
}

View File

@@ -1,3 +1,8 @@
/**
* @vue/server-renderer v3.4.15
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
@@ -40,7 +45,7 @@ function ssrRenderAttrs(props, tag) {
return ret;
}
function ssrRenderDynamicAttr(key, value, tag) {
if (!isRenderableValue(value)) {
if (!shared.isRenderableAttrValue(value)) {
return ``;
}
const attrKey = tag && (tag.indexOf("-") > 0 || shared.isSVGTag(tag)) ? key : shared.propsToAttrMap[key] || key.toLowerCase();
@@ -56,18 +61,11 @@ function ssrRenderDynamicAttr(key, value, tag) {
}
}
function ssrRenderAttr(key, value) {
if (!isRenderableValue(value)) {
if (!shared.isRenderableAttrValue(value)) {
return ``;
}
return ` ${key}="${shared.escapeHtml(value)}"`;
}
function isRenderableValue(value) {
if (value == null) {
return false;
}
const type = typeof value;
return type === "string" || type === "number" || type === "boolean";
}
function ssrRenderClass(raw) {
return shared.escapeHtml(shared.normalizeClass(raw));
}
@@ -371,8 +369,7 @@ function renderComponentVNode(vnode, parentComponent = null, slotScopeId) {
() => Promise.all(
prefetches.map((prefetch) => prefetch.call(instance.proxy))
)
).catch(() => {
});
).catch(shared.NOOP);
}
return p.then(() => renderComponentSubTree(instance, slotScopeId));
} else {

View File

@@ -1,6 +1,6 @@
{
"name": "@vue/server-renderer",
"version": "3.4.5",
"version": "3.4.15",
"description": "@vue/server-renderer",
"main": "index.js",
"module": "dist/server-renderer.esm-bundler.js",
@@ -17,6 +17,7 @@
"development": "./dist/server-renderer.cjs.js",
"default": "./dist/server-renderer.cjs.prod.js"
},
"module": "./dist/server-renderer.esm-bundler.js",
"import": "./dist/server-renderer.esm-bundler.js",
"require": "./index.js"
},
@@ -45,10 +46,10 @@
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/server-renderer#readme",
"peerDependencies": {
"vue": "3.4.5"
"vue": "3.4.15"
},
"dependencies": {
"@vue/shared": "3.4.5",
"@vue/compiler-ssr": "3.4.5"
"@vue/compiler-ssr": "3.4.15",
"@vue/shared": "3.4.15"
}
}

View File

@@ -1,3 +1,8 @@
/**
* @vue/shared v3.4.15
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
@@ -350,6 +355,13 @@ const isKnownHtmlAttr = /* @__PURE__ */ makeMap(
const isKnownSvgAttr = /* @__PURE__ */ makeMap(
`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`
);
function isRenderableAttrValue(value) {
if (value == null) {
return false;
}
const type = typeof value;
return type === "string" || type === "number" || type === "boolean";
}
const escapeRE = /["'&<>]/;
function escapeHtml(string) {
@@ -520,6 +532,7 @@ exports.isOn = isOn;
exports.isPlainObject = isPlainObject;
exports.isPromise = isPromise;
exports.isRegExp = isRegExp;
exports.isRenderableAttrValue = isRenderableAttrValue;
exports.isReservedProp = isReservedProp;
exports.isSSRSafeAttrName = isSSRSafeAttrName;
exports.isSVGTag = isSVGTag;

View File

@@ -1,6 +1,6 @@
{
"name": "@vue/shared",
"version": "3.4.5",
"version": "3.4.15",
"description": "internal utils shared across @vue packages",
"main": "index.js",
"module": "dist/shared.esm-bundler.js",
@@ -17,6 +17,7 @@
"development": "./dist/shared.cjs.js",
"default": "./dist/shared.cjs.prod.js"
},
"module": "./dist/shared.esm-bundler.js",
"import": "./dist/shared.esm-bundler.js",
"require": "./index.js"
},