@vue/runtime-dom 3.4.14 → 3.4.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/runtime-dom.cjs.js +26 -9
- package/dist/runtime-dom.cjs.prod.js +26 -9
- package/dist/runtime-dom.d.ts +1 -0
- package/dist/runtime-dom.esm-browser.js +57 -25
- package/dist/runtime-dom.esm-browser.prod.js +6 -6
- package/dist/runtime-dom.esm-bundler.js +26 -9
- package/dist/runtime-dom.global.js +57 -25
- package/dist/runtime-dom.global.prod.js +6 -6
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.4.
|
|
2
|
+
* @vue/runtime-dom v3.4.15
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -203,6 +203,13 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
203
203
|
const isKnownSvgAttr = /* @__PURE__ */ makeMap(
|
|
204
204
|
`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`
|
|
205
205
|
);
|
|
206
|
+
function isRenderableAttrValue(value) {
|
|
207
|
+
if (value == null) {
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
const type = typeof value;
|
|
211
|
+
return type === "string" || type === "number" || type === "boolean";
|
|
212
|
+
}
|
|
206
213
|
|
|
207
214
|
function looseCompareArrays(a, b) {
|
|
208
215
|
if (a.length !== b.length)
|
|
@@ -565,10 +572,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
565
572
|
var _a;
|
|
566
573
|
pauseScheduling();
|
|
567
574
|
for (const effect2 of dep.keys()) {
|
|
568
|
-
if (dep.get(effect2)
|
|
569
|
-
continue;
|
|
570
|
-
}
|
|
571
|
-
if (effect2._dirtyLevel < dirtyLevel && !(effect2._runnings && !effect2.allowRecurse)) {
|
|
575
|
+
if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) {
|
|
572
576
|
const lastDirtyLevel = effect2._dirtyLevel;
|
|
573
577
|
effect2._dirtyLevel = dirtyLevel;
|
|
574
578
|
if (lastDirtyLevel === 0) {
|
|
@@ -579,12 +583,17 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
579
583
|
effect2.trigger();
|
|
580
584
|
}
|
|
581
585
|
}
|
|
582
|
-
|
|
586
|
+
}
|
|
587
|
+
scheduleEffects(dep);
|
|
588
|
+
resetScheduling();
|
|
589
|
+
}
|
|
590
|
+
function scheduleEffects(dep) {
|
|
591
|
+
for (const effect2 of dep.keys()) {
|
|
592
|
+
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) {
|
|
583
593
|
effect2._shouldSchedule = false;
|
|
584
594
|
queueEffectSchedulers.push(effect2.scheduler);
|
|
585
595
|
}
|
|
586
596
|
}
|
|
587
|
-
resetScheduling();
|
|
588
597
|
}
|
|
589
598
|
|
|
590
599
|
const createDep = (cleanup, computed) => {
|
|
@@ -1267,7 +1276,8 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1267
1276
|
this["__v_isReadonly"] = false;
|
|
1268
1277
|
this.effect = new ReactiveEffect(
|
|
1269
1278
|
() => getter(this._value),
|
|
1270
|
-
() => triggerRefValue(this, 1)
|
|
1279
|
+
() => triggerRefValue(this, 1),
|
|
1280
|
+
() => this.dep && scheduleEffects(this.dep)
|
|
1271
1281
|
);
|
|
1272
1282
|
this.effect.computed = this;
|
|
1273
1283
|
this.effect.active = this._cacheable = !isSSR;
|
|
@@ -1281,6 +1291,9 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1281
1291
|
}
|
|
1282
1292
|
}
|
|
1283
1293
|
trackRefValue(self);
|
|
1294
|
+
if (self.effect._dirtyLevel >= 1) {
|
|
1295
|
+
triggerRefValue(self, 1);
|
|
1296
|
+
}
|
|
1284
1297
|
return self._value;
|
|
1285
1298
|
}
|
|
1286
1299
|
set value(newValue) {
|
|
@@ -5861,7 +5874,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5861
5874
|
return rawSlot;
|
|
5862
5875
|
}
|
|
5863
5876
|
const normalized = withCtx((...args) => {
|
|
5864
|
-
if (currentInstance) {
|
|
5877
|
+
if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
|
|
5865
5878
|
warn$1(
|
|
5866
5879
|
`Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
|
|
5867
5880
|
);
|
|
@@ -5997,9 +6010,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5997
6010
|
} else {
|
|
5998
6011
|
const _isString = isString(ref);
|
|
5999
6012
|
const _isRef = isRef(ref);
|
|
6013
|
+
const isVFor = rawRef.f;
|
|
6000
6014
|
if (_isString || _isRef) {
|
|
6001
6015
|
const doSet = () => {
|
|
6002
|
-
if (
|
|
6016
|
+
if (isVFor) {
|
|
6003
6017
|
const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value;
|
|
6004
6018
|
if (isUnmount) {
|
|
6005
6019
|
isArray(existing) && remove(existing, refValue);
|
|
@@ -6032,11 +6046,11 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6032
6046
|
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
6033
6047
|
}
|
|
6034
6048
|
};
|
|
6035
|
-
if (
|
|
6049
|
+
if (isUnmount || isVFor) {
|
|
6050
|
+
doSet();
|
|
6051
|
+
} else {
|
|
6036
6052
|
doSet.id = -1;
|
|
6037
6053
|
queuePostRenderEffect(doSet, parentSuspense);
|
|
6038
|
-
} else {
|
|
6039
|
-
doSet();
|
|
6040
6054
|
}
|
|
6041
6055
|
} else {
|
|
6042
6056
|
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
@@ -6546,11 +6560,12 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
6546
6560
|
} else {
|
|
6547
6561
|
if (el.hasAttribute(key)) {
|
|
6548
6562
|
actual = el.getAttribute(key);
|
|
6563
|
+
} else if (key === "value" && el.tagName === "TEXTAREA") {
|
|
6564
|
+
actual = el.value;
|
|
6549
6565
|
} else {
|
|
6550
|
-
|
|
6551
|
-
actual = isObject(serverValue) || serverValue == null ? "" : String(serverValue);
|
|
6566
|
+
actual = false;
|
|
6552
6567
|
}
|
|
6553
|
-
expected =
|
|
6568
|
+
expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
|
|
6554
6569
|
}
|
|
6555
6570
|
if (actual !== expected) {
|
|
6556
6571
|
mismatchType = `attribute`;
|
|
@@ -9498,7 +9513,7 @@ Component that was made reactive: `,
|
|
|
9498
9513
|
return true;
|
|
9499
9514
|
}
|
|
9500
9515
|
|
|
9501
|
-
const version = "3.4.
|
|
9516
|
+
const version = "3.4.15";
|
|
9502
9517
|
const warn = warn$1 ;
|
|
9503
9518
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9504
9519
|
const devtools = devtools$1 ;
|
|
@@ -10749,35 +10764,52 @@ Component that was made reactive: `,
|
|
|
10749
10764
|
el[assignKey](
|
|
10750
10765
|
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
|
10751
10766
|
);
|
|
10767
|
+
el._assigning = true;
|
|
10768
|
+
nextTick(() => {
|
|
10769
|
+
el._assigning = false;
|
|
10770
|
+
});
|
|
10752
10771
|
});
|
|
10753
10772
|
el[assignKey] = getModelAssigner(vnode);
|
|
10754
10773
|
},
|
|
10755
10774
|
// set value in mounted & updated because <select> relies on its children
|
|
10756
10775
|
// <option>s.
|
|
10757
|
-
mounted(el, { value }) {
|
|
10758
|
-
setSelected(el, value);
|
|
10776
|
+
mounted(el, { value, oldValue, modifiers: { number } }) {
|
|
10777
|
+
setSelected(el, value, oldValue, number);
|
|
10759
10778
|
},
|
|
10760
10779
|
beforeUpdate(el, _binding, vnode) {
|
|
10761
10780
|
el[assignKey] = getModelAssigner(vnode);
|
|
10762
10781
|
},
|
|
10763
|
-
updated(el, { value }) {
|
|
10764
|
-
|
|
10782
|
+
updated(el, { value, oldValue, modifiers: { number } }) {
|
|
10783
|
+
if (!el._assigning) {
|
|
10784
|
+
setSelected(el, value, oldValue, number);
|
|
10785
|
+
}
|
|
10765
10786
|
}
|
|
10766
10787
|
};
|
|
10767
|
-
function setSelected(el, value) {
|
|
10788
|
+
function setSelected(el, value, oldValue, number) {
|
|
10768
10789
|
const isMultiple = el.multiple;
|
|
10769
|
-
|
|
10790
|
+
const isArrayValue = isArray(value);
|
|
10791
|
+
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
10770
10792
|
warn(
|
|
10771
10793
|
`<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`
|
|
10772
10794
|
);
|
|
10773
10795
|
return;
|
|
10774
10796
|
}
|
|
10797
|
+
if (isArrayValue && looseEqual(value, oldValue)) {
|
|
10798
|
+
return;
|
|
10799
|
+
}
|
|
10775
10800
|
for (let i = 0, l = el.options.length; i < l; i++) {
|
|
10776
10801
|
const option = el.options[i];
|
|
10777
10802
|
const optionValue = getValue(option);
|
|
10778
10803
|
if (isMultiple) {
|
|
10779
|
-
if (
|
|
10780
|
-
|
|
10804
|
+
if (isArrayValue) {
|
|
10805
|
+
const optionType = typeof optionValue;
|
|
10806
|
+
if (optionType === "string" || optionType === "number") {
|
|
10807
|
+
option.selected = value.includes(
|
|
10808
|
+
number ? looseToNumber(optionValue) : optionValue
|
|
10809
|
+
);
|
|
10810
|
+
} else {
|
|
10811
|
+
option.selected = looseIndexOf(value, optionValue) > -1;
|
|
10812
|
+
}
|
|
10781
10813
|
} else {
|
|
10782
10814
|
option.selected = value.has(optionValue);
|
|
10783
10815
|
}
|