@vue/runtime-dom 3.4.14 → 3.4.16
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 +25 -10
- package/dist/runtime-dom.cjs.prod.js +25 -10
- package/dist/runtime-dom.d.ts +1 -0
- package/dist/runtime-dom.esm-browser.js +90 -51
- package/dist/runtime-dom.esm-browser.prod.js +4 -4
- package/dist/runtime-dom.esm-bundler.js +28 -10
- package/dist/runtime-dom.global.js +90 -51
- package/dist/runtime-dom.global.prod.js +5 -5
- package/package.json +3 -3
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.4.
|
|
2
|
+
* @vue/runtime-dom v3.4.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -377,7 +377,7 @@ const vShow = {
|
|
|
377
377
|
}
|
|
378
378
|
},
|
|
379
379
|
updated(el, { value, oldValue }, { transition }) {
|
|
380
|
-
if (!value === !oldValue)
|
|
380
|
+
if (!value === !oldValue && el.style.display === el[vShowOldKey])
|
|
381
381
|
return;
|
|
382
382
|
if (transition) {
|
|
383
383
|
if (value) {
|
|
@@ -445,6 +445,7 @@ function patchStyle(el, prev, next) {
|
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
447
|
if (vShowOldKey in el) {
|
|
448
|
+
el[vShowOldKey] = style.display;
|
|
448
449
|
style.display = currentDisplay;
|
|
449
450
|
}
|
|
450
451
|
}
|
|
@@ -1212,24 +1213,31 @@ const vModelSelect = {
|
|
|
1212
1213
|
el[assignKey](
|
|
1213
1214
|
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
|
1214
1215
|
);
|
|
1216
|
+
el._assigning = true;
|
|
1217
|
+
runtimeCore.nextTick(() => {
|
|
1218
|
+
el._assigning = false;
|
|
1219
|
+
});
|
|
1215
1220
|
});
|
|
1216
1221
|
el[assignKey] = getModelAssigner(vnode);
|
|
1217
1222
|
},
|
|
1218
1223
|
// set value in mounted & updated because <select> relies on its children
|
|
1219
1224
|
// <option>s.
|
|
1220
|
-
mounted(el, { value }) {
|
|
1221
|
-
setSelected(el, value);
|
|
1225
|
+
mounted(el, { value, oldValue, modifiers: { number } }) {
|
|
1226
|
+
setSelected(el, value, oldValue, number);
|
|
1222
1227
|
},
|
|
1223
1228
|
beforeUpdate(el, _binding, vnode) {
|
|
1224
1229
|
el[assignKey] = getModelAssigner(vnode);
|
|
1225
1230
|
},
|
|
1226
|
-
updated(el, { value }) {
|
|
1227
|
-
|
|
1231
|
+
updated(el, { value, oldValue, modifiers: { number } }) {
|
|
1232
|
+
if (!el._assigning) {
|
|
1233
|
+
setSelected(el, value, oldValue, number);
|
|
1234
|
+
}
|
|
1228
1235
|
}
|
|
1229
1236
|
};
|
|
1230
|
-
function setSelected(el, value) {
|
|
1237
|
+
function setSelected(el, value, oldValue, number) {
|
|
1231
1238
|
const isMultiple = el.multiple;
|
|
1232
|
-
|
|
1239
|
+
const isArrayValue = shared.isArray(value);
|
|
1240
|
+
if (isMultiple && !isArrayValue && !shared.isSet(value)) {
|
|
1233
1241
|
runtimeCore.warn(
|
|
1234
1242
|
`<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`
|
|
1235
1243
|
);
|
|
@@ -1239,8 +1247,15 @@ function setSelected(el, value) {
|
|
|
1239
1247
|
const option = el.options[i];
|
|
1240
1248
|
const optionValue = getValue(option);
|
|
1241
1249
|
if (isMultiple) {
|
|
1242
|
-
if (
|
|
1243
|
-
|
|
1250
|
+
if (isArrayValue) {
|
|
1251
|
+
const optionType = typeof optionValue;
|
|
1252
|
+
if (optionType === "string" || optionType === "number") {
|
|
1253
|
+
option.selected = value.includes(
|
|
1254
|
+
number ? shared.looseToNumber(optionValue) : optionValue
|
|
1255
|
+
);
|
|
1256
|
+
} else {
|
|
1257
|
+
option.selected = shared.looseIndexOf(value, optionValue) > -1;
|
|
1258
|
+
}
|
|
1244
1259
|
} else {
|
|
1245
1260
|
option.selected = value.has(optionValue);
|
|
1246
1261
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.4.
|
|
2
|
+
* @vue/runtime-dom v3.4.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -374,7 +374,7 @@ const vShow = {
|
|
|
374
374
|
}
|
|
375
375
|
},
|
|
376
376
|
updated(el, { value, oldValue }, { transition }) {
|
|
377
|
-
if (!value === !oldValue)
|
|
377
|
+
if (!value === !oldValue && el.style.display === el[vShowOldKey])
|
|
378
378
|
return;
|
|
379
379
|
if (transition) {
|
|
380
380
|
if (value) {
|
|
@@ -439,6 +439,7 @@ function patchStyle(el, prev, next) {
|
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
if (vShowOldKey in el) {
|
|
442
|
+
el[vShowOldKey] = style.display;
|
|
442
443
|
style.display = currentDisplay;
|
|
443
444
|
}
|
|
444
445
|
}
|
|
@@ -1168,32 +1169,46 @@ const vModelSelect = {
|
|
|
1168
1169
|
el[assignKey](
|
|
1169
1170
|
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
|
1170
1171
|
);
|
|
1172
|
+
el._assigning = true;
|
|
1173
|
+
runtimeCore.nextTick(() => {
|
|
1174
|
+
el._assigning = false;
|
|
1175
|
+
});
|
|
1171
1176
|
});
|
|
1172
1177
|
el[assignKey] = getModelAssigner(vnode);
|
|
1173
1178
|
},
|
|
1174
1179
|
// set value in mounted & updated because <select> relies on its children
|
|
1175
1180
|
// <option>s.
|
|
1176
|
-
mounted(el, { value }) {
|
|
1177
|
-
setSelected(el, value);
|
|
1181
|
+
mounted(el, { value, oldValue, modifiers: { number } }) {
|
|
1182
|
+
setSelected(el, value, oldValue, number);
|
|
1178
1183
|
},
|
|
1179
1184
|
beforeUpdate(el, _binding, vnode) {
|
|
1180
1185
|
el[assignKey] = getModelAssigner(vnode);
|
|
1181
1186
|
},
|
|
1182
|
-
updated(el, { value }) {
|
|
1183
|
-
|
|
1187
|
+
updated(el, { value, oldValue, modifiers: { number } }) {
|
|
1188
|
+
if (!el._assigning) {
|
|
1189
|
+
setSelected(el, value, oldValue, number);
|
|
1190
|
+
}
|
|
1184
1191
|
}
|
|
1185
1192
|
};
|
|
1186
|
-
function setSelected(el, value) {
|
|
1193
|
+
function setSelected(el, value, oldValue, number) {
|
|
1187
1194
|
const isMultiple = el.multiple;
|
|
1188
|
-
|
|
1195
|
+
const isArrayValue = shared.isArray(value);
|
|
1196
|
+
if (isMultiple && !isArrayValue && !shared.isSet(value)) {
|
|
1189
1197
|
return;
|
|
1190
1198
|
}
|
|
1191
1199
|
for (let i = 0, l = el.options.length; i < l; i++) {
|
|
1192
1200
|
const option = el.options[i];
|
|
1193
1201
|
const optionValue = getValue(option);
|
|
1194
1202
|
if (isMultiple) {
|
|
1195
|
-
if (
|
|
1196
|
-
|
|
1203
|
+
if (isArrayValue) {
|
|
1204
|
+
const optionType = typeof optionValue;
|
|
1205
|
+
if (optionType === "string" || optionType === "number") {
|
|
1206
|
+
option.selected = value.includes(
|
|
1207
|
+
number ? shared.looseToNumber(optionValue) : optionValue
|
|
1208
|
+
);
|
|
1209
|
+
} else {
|
|
1210
|
+
option.selected = shared.looseIndexOf(value, optionValue) > -1;
|
|
1211
|
+
}
|
|
1197
1212
|
} else {
|
|
1198
1213
|
option.selected = value.has(optionValue);
|
|
1199
1214
|
}
|
package/dist/runtime-dom.d.ts
CHANGED
|
@@ -92,6 +92,7 @@ type AssignerFn = (value: any) => void;
|
|
|
92
92
|
declare const assignKey: unique symbol;
|
|
93
93
|
type ModelDirective<T> = ObjectDirective<T & {
|
|
94
94
|
[assignKey]: AssignerFn;
|
|
95
|
+
_assigning?: boolean;
|
|
95
96
|
}>;
|
|
96
97
|
export declare const vModelText: ModelDirective<HTMLInputElement | HTMLTextAreaElement>;
|
|
97
98
|
export declare const vModelCheckbox: ModelDirective<HTMLInputElement>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.4.
|
|
2
|
+
* @vue/runtime-dom v3.4.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -200,6 +200,13 @@ const isKnownHtmlAttr = /* @__PURE__ */ makeMap(
|
|
|
200
200
|
const isKnownSvgAttr = /* @__PURE__ */ makeMap(
|
|
201
201
|
`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`
|
|
202
202
|
);
|
|
203
|
+
function isRenderableAttrValue(value) {
|
|
204
|
+
if (value == null) {
|
|
205
|
+
return false;
|
|
206
|
+
}
|
|
207
|
+
const type = typeof value;
|
|
208
|
+
return type === "string" || type === "number" || type === "boolean";
|
|
209
|
+
}
|
|
203
210
|
|
|
204
211
|
function looseCompareArrays(a, b) {
|
|
205
212
|
if (a.length !== b.length)
|
|
@@ -400,7 +407,7 @@ class ReactiveEffect {
|
|
|
400
407
|
/**
|
|
401
408
|
* @internal
|
|
402
409
|
*/
|
|
403
|
-
this._dirtyLevel =
|
|
410
|
+
this._dirtyLevel = 4;
|
|
404
411
|
/**
|
|
405
412
|
* @internal
|
|
406
413
|
*/
|
|
@@ -420,26 +427,27 @@ class ReactiveEffect {
|
|
|
420
427
|
recordEffectScope(this, scope);
|
|
421
428
|
}
|
|
422
429
|
get dirty() {
|
|
423
|
-
if (this._dirtyLevel ===
|
|
430
|
+
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
431
|
+
this._dirtyLevel = 1;
|
|
424
432
|
pauseTracking();
|
|
425
433
|
for (let i = 0; i < this._depsLength; i++) {
|
|
426
434
|
const dep = this.deps[i];
|
|
427
435
|
if (dep.computed) {
|
|
428
436
|
triggerComputed(dep.computed);
|
|
429
|
-
if (this._dirtyLevel >=
|
|
437
|
+
if (this._dirtyLevel >= 4) {
|
|
430
438
|
break;
|
|
431
439
|
}
|
|
432
440
|
}
|
|
433
441
|
}
|
|
434
|
-
if (this._dirtyLevel
|
|
442
|
+
if (this._dirtyLevel === 1) {
|
|
435
443
|
this._dirtyLevel = 0;
|
|
436
444
|
}
|
|
437
445
|
resetTracking();
|
|
438
446
|
}
|
|
439
|
-
return this._dirtyLevel >=
|
|
447
|
+
return this._dirtyLevel >= 4;
|
|
440
448
|
}
|
|
441
449
|
set dirty(v) {
|
|
442
|
-
this._dirtyLevel = v ?
|
|
450
|
+
this._dirtyLevel = v ? 4 : 0;
|
|
443
451
|
}
|
|
444
452
|
run() {
|
|
445
453
|
this._dirtyLevel = 0;
|
|
@@ -479,7 +487,7 @@ function preCleanupEffect(effect2) {
|
|
|
479
487
|
effect2._depsLength = 0;
|
|
480
488
|
}
|
|
481
489
|
function postCleanupEffect(effect2) {
|
|
482
|
-
if (effect2.deps
|
|
490
|
+
if (effect2.deps.length > effect2._depsLength) {
|
|
483
491
|
for (let i = effect2._depsLength; i < effect2.deps.length; i++) {
|
|
484
492
|
cleanupDepEffect(effect2.deps[i], effect2);
|
|
485
493
|
}
|
|
@@ -562,24 +570,23 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
|
562
570
|
var _a;
|
|
563
571
|
pauseScheduling();
|
|
564
572
|
for (const effect2 of dep.keys()) {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
if (effect2._dirtyLevel < dirtyLevel && !(effect2._runnings && !effect2.allowRecurse)) {
|
|
569
|
-
const lastDirtyLevel = effect2._dirtyLevel;
|
|
573
|
+
let tracking;
|
|
574
|
+
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
575
|
+
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
570
576
|
effect2._dirtyLevel = dirtyLevel;
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
577
|
+
}
|
|
578
|
+
if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
579
|
+
{
|
|
580
|
+
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
|
581
|
+
}
|
|
582
|
+
effect2.trigger();
|
|
583
|
+
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
|
|
584
|
+
effect2._shouldSchedule = false;
|
|
585
|
+
if (effect2.scheduler) {
|
|
586
|
+
queueEffectSchedulers.push(effect2.scheduler);
|
|
575
587
|
}
|
|
576
|
-
effect2.trigger();
|
|
577
588
|
}
|
|
578
589
|
}
|
|
579
|
-
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse)) {
|
|
580
|
-
effect2._shouldSchedule = false;
|
|
581
|
-
queueEffectSchedulers.push(effect2.scheduler);
|
|
582
|
-
}
|
|
583
590
|
}
|
|
584
591
|
resetScheduling();
|
|
585
592
|
}
|
|
@@ -665,7 +672,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
665
672
|
if (dep) {
|
|
666
673
|
triggerEffects(
|
|
667
674
|
dep,
|
|
668
|
-
|
|
675
|
+
4,
|
|
669
676
|
{
|
|
670
677
|
target,
|
|
671
678
|
type,
|
|
@@ -1250,7 +1257,9 @@ function toRaw(observed) {
|
|
|
1250
1257
|
return raw ? toRaw(raw) : observed;
|
|
1251
1258
|
}
|
|
1252
1259
|
function markRaw(value) {
|
|
1253
|
-
|
|
1260
|
+
if (Object.isExtensible(value)) {
|
|
1261
|
+
def(value, "__v_skip", true);
|
|
1262
|
+
}
|
|
1254
1263
|
return value;
|
|
1255
1264
|
}
|
|
1256
1265
|
const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
@@ -1264,7 +1273,10 @@ class ComputedRefImpl {
|
|
|
1264
1273
|
this["__v_isReadonly"] = false;
|
|
1265
1274
|
this.effect = new ReactiveEffect(
|
|
1266
1275
|
() => getter(this._value),
|
|
1267
|
-
() => triggerRefValue(
|
|
1276
|
+
() => triggerRefValue(
|
|
1277
|
+
this,
|
|
1278
|
+
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
1279
|
+
)
|
|
1268
1280
|
);
|
|
1269
1281
|
this.effect.computed = this;
|
|
1270
1282
|
this.effect.active = this._cacheable = !isSSR;
|
|
@@ -1272,12 +1284,13 @@ class ComputedRefImpl {
|
|
|
1272
1284
|
}
|
|
1273
1285
|
get value() {
|
|
1274
1286
|
const self = toRaw(this);
|
|
1275
|
-
if (!self._cacheable || self.effect.dirty) {
|
|
1276
|
-
|
|
1277
|
-
triggerRefValue(self, 2);
|
|
1278
|
-
}
|
|
1287
|
+
if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
|
|
1288
|
+
triggerRefValue(self, 4);
|
|
1279
1289
|
}
|
|
1280
1290
|
trackRefValue(self);
|
|
1291
|
+
if (self.effect._dirtyLevel >= 2) {
|
|
1292
|
+
triggerRefValue(self, 2);
|
|
1293
|
+
}
|
|
1281
1294
|
return self._value;
|
|
1282
1295
|
}
|
|
1283
1296
|
set value(newValue) {
|
|
@@ -1314,14 +1327,15 @@ function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
|
1314
1327
|
}
|
|
1315
1328
|
|
|
1316
1329
|
function trackRefValue(ref2) {
|
|
1330
|
+
var _a;
|
|
1317
1331
|
if (shouldTrack && activeEffect) {
|
|
1318
1332
|
ref2 = toRaw(ref2);
|
|
1319
1333
|
trackEffect(
|
|
1320
1334
|
activeEffect,
|
|
1321
|
-
ref2.dep
|
|
1335
|
+
(_a = ref2.dep) != null ? _a : ref2.dep = createDep(
|
|
1322
1336
|
() => ref2.dep = void 0,
|
|
1323
1337
|
ref2 instanceof ComputedRefImpl ? ref2 : void 0
|
|
1324
|
-
)
|
|
1338
|
+
),
|
|
1325
1339
|
{
|
|
1326
1340
|
target: ref2,
|
|
1327
1341
|
type: "get",
|
|
@@ -1330,7 +1344,7 @@ function trackRefValue(ref2) {
|
|
|
1330
1344
|
);
|
|
1331
1345
|
}
|
|
1332
1346
|
}
|
|
1333
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1347
|
+
function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
|
|
1334
1348
|
ref2 = toRaw(ref2);
|
|
1335
1349
|
const dep = ref2.dep;
|
|
1336
1350
|
if (dep) {
|
|
@@ -1379,12 +1393,12 @@ class RefImpl {
|
|
|
1379
1393
|
if (hasChanged(newVal, this._rawValue)) {
|
|
1380
1394
|
this._rawValue = newVal;
|
|
1381
1395
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1382
|
-
triggerRefValue(this,
|
|
1396
|
+
triggerRefValue(this, 4, newVal);
|
|
1383
1397
|
}
|
|
1384
1398
|
}
|
|
1385
1399
|
}
|
|
1386
1400
|
function triggerRef(ref2) {
|
|
1387
|
-
triggerRefValue(ref2,
|
|
1401
|
+
triggerRefValue(ref2, 4, ref2.value );
|
|
1388
1402
|
}
|
|
1389
1403
|
function unref(ref2) {
|
|
1390
1404
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -5415,11 +5429,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5415
5429
|
return app;
|
|
5416
5430
|
},
|
|
5417
5431
|
runWithContext(fn) {
|
|
5432
|
+
const lastApp = currentApp;
|
|
5418
5433
|
currentApp = app;
|
|
5419
5434
|
try {
|
|
5420
5435
|
return fn();
|
|
5421
5436
|
} finally {
|
|
5422
|
-
currentApp =
|
|
5437
|
+
currentApp = lastApp;
|
|
5423
5438
|
}
|
|
5424
5439
|
}
|
|
5425
5440
|
};
|
|
@@ -5864,7 +5879,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
|
|
|
5864
5879
|
return rawSlot;
|
|
5865
5880
|
}
|
|
5866
5881
|
const normalized = withCtx((...args) => {
|
|
5867
|
-
if (currentInstance) {
|
|
5882
|
+
if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
|
|
5868
5883
|
warn$1(
|
|
5869
5884
|
`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.`
|
|
5870
5885
|
);
|
|
@@ -6338,7 +6353,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
6338
6353
|
if (props) {
|
|
6339
6354
|
{
|
|
6340
6355
|
for (const key in props) {
|
|
6341
|
-
if (propHasMismatch(el, key, props[key], vnode)) {
|
|
6356
|
+
if (propHasMismatch(el, key, props[key], vnode, parentComponent)) {
|
|
6342
6357
|
hasMismatch = true;
|
|
6343
6358
|
}
|
|
6344
6359
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
@@ -6513,7 +6528,8 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
6513
6528
|
};
|
|
6514
6529
|
return [hydrate, hydrateNode];
|
|
6515
6530
|
}
|
|
6516
|
-
function propHasMismatch(el, key, clientValue, vnode) {
|
|
6531
|
+
function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
6532
|
+
var _a;
|
|
6517
6533
|
let mismatchType;
|
|
6518
6534
|
let mismatchKey;
|
|
6519
6535
|
let actual;
|
|
@@ -6536,6 +6552,10 @@ function propHasMismatch(el, key, clientValue, vnode) {
|
|
|
6536
6552
|
}
|
|
6537
6553
|
}
|
|
6538
6554
|
}
|
|
6555
|
+
const cssVars = (_a = instance == null ? void 0 : instance.getCssVars) == null ? void 0 : _a.call(instance);
|
|
6556
|
+
for (const key2 in cssVars) {
|
|
6557
|
+
expectedMap.set(`--${key2}`, String(cssVars[key2]));
|
|
6558
|
+
}
|
|
6539
6559
|
if (!isMapEqual(actualMap, expectedMap)) {
|
|
6540
6560
|
mismatchType = mismatchKey = "style";
|
|
6541
6561
|
}
|
|
@@ -6549,11 +6569,12 @@ function propHasMismatch(el, key, clientValue, vnode) {
|
|
|
6549
6569
|
} else {
|
|
6550
6570
|
if (el.hasAttribute(key)) {
|
|
6551
6571
|
actual = el.getAttribute(key);
|
|
6572
|
+
} else if (key === "value" && el.tagName === "TEXTAREA") {
|
|
6573
|
+
actual = el.value;
|
|
6552
6574
|
} else {
|
|
6553
|
-
|
|
6554
|
-
actual = isObject(serverValue) || serverValue == null ? "" : String(serverValue);
|
|
6575
|
+
actual = false;
|
|
6555
6576
|
}
|
|
6556
|
-
expected =
|
|
6577
|
+
expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
|
|
6557
6578
|
}
|
|
6558
6579
|
if (actual !== expected) {
|
|
6559
6580
|
mismatchType = `attribute`;
|
|
@@ -9501,7 +9522,7 @@ function isMemoSame(cached, memo) {
|
|
|
9501
9522
|
return true;
|
|
9502
9523
|
}
|
|
9503
9524
|
|
|
9504
|
-
const version = "3.4.
|
|
9525
|
+
const version = "3.4.16";
|
|
9505
9526
|
const warn = warn$1 ;
|
|
9506
9527
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9507
9528
|
const devtools = devtools$1 ;
|
|
@@ -9878,7 +9899,7 @@ const vShow = {
|
|
|
9878
9899
|
}
|
|
9879
9900
|
},
|
|
9880
9901
|
updated(el, { value, oldValue }, { transition }) {
|
|
9881
|
-
if (!value === !oldValue)
|
|
9902
|
+
if (!value === !oldValue && el.style.display === el[vShowOldKey])
|
|
9882
9903
|
return;
|
|
9883
9904
|
if (transition) {
|
|
9884
9905
|
if (value) {
|
|
@@ -9917,6 +9938,9 @@ function useCssVars(getter) {
|
|
|
9917
9938
|
document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
|
|
9918
9939
|
).forEach((node) => setVarsOnNode(node, vars));
|
|
9919
9940
|
};
|
|
9941
|
+
{
|
|
9942
|
+
instance.getCssVars = () => getter(instance.proxy);
|
|
9943
|
+
}
|
|
9920
9944
|
const setVars = () => {
|
|
9921
9945
|
const vars = getter(instance.proxy);
|
|
9922
9946
|
setVarsOnVNode(instance.subTree, vars);
|
|
@@ -9997,6 +10021,7 @@ function patchStyle(el, prev, next) {
|
|
|
9997
10021
|
}
|
|
9998
10022
|
}
|
|
9999
10023
|
if (vShowOldKey in el) {
|
|
10024
|
+
el[vShowOldKey] = style.display;
|
|
10000
10025
|
style.display = currentDisplay;
|
|
10001
10026
|
}
|
|
10002
10027
|
}
|
|
@@ -10764,24 +10789,31 @@ const vModelSelect = {
|
|
|
10764
10789
|
el[assignKey](
|
|
10765
10790
|
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
|
10766
10791
|
);
|
|
10792
|
+
el._assigning = true;
|
|
10793
|
+
nextTick(() => {
|
|
10794
|
+
el._assigning = false;
|
|
10795
|
+
});
|
|
10767
10796
|
});
|
|
10768
10797
|
el[assignKey] = getModelAssigner(vnode);
|
|
10769
10798
|
},
|
|
10770
10799
|
// set value in mounted & updated because <select> relies on its children
|
|
10771
10800
|
// <option>s.
|
|
10772
|
-
mounted(el, { value }) {
|
|
10773
|
-
setSelected(el, value);
|
|
10801
|
+
mounted(el, { value, oldValue, modifiers: { number } }) {
|
|
10802
|
+
setSelected(el, value, oldValue, number);
|
|
10774
10803
|
},
|
|
10775
10804
|
beforeUpdate(el, _binding, vnode) {
|
|
10776
10805
|
el[assignKey] = getModelAssigner(vnode);
|
|
10777
10806
|
},
|
|
10778
|
-
updated(el, { value }) {
|
|
10779
|
-
|
|
10807
|
+
updated(el, { value, oldValue, modifiers: { number } }) {
|
|
10808
|
+
if (!el._assigning) {
|
|
10809
|
+
setSelected(el, value, oldValue, number);
|
|
10810
|
+
}
|
|
10780
10811
|
}
|
|
10781
10812
|
};
|
|
10782
|
-
function setSelected(el, value) {
|
|
10813
|
+
function setSelected(el, value, oldValue, number) {
|
|
10783
10814
|
const isMultiple = el.multiple;
|
|
10784
|
-
|
|
10815
|
+
const isArrayValue = isArray(value);
|
|
10816
|
+
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
10785
10817
|
warn(
|
|
10786
10818
|
`<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`
|
|
10787
10819
|
);
|
|
@@ -10791,8 +10823,15 @@ function setSelected(el, value) {
|
|
|
10791
10823
|
const option = el.options[i];
|
|
10792
10824
|
const optionValue = getValue(option);
|
|
10793
10825
|
if (isMultiple) {
|
|
10794
|
-
if (
|
|
10795
|
-
|
|
10826
|
+
if (isArrayValue) {
|
|
10827
|
+
const optionType = typeof optionValue;
|
|
10828
|
+
if (optionType === "string" || optionType === "number") {
|
|
10829
|
+
option.selected = value.includes(
|
|
10830
|
+
number ? looseToNumber(optionValue) : optionValue
|
|
10831
|
+
);
|
|
10832
|
+
} else {
|
|
10833
|
+
option.selected = looseIndexOf(value, optionValue) > -1;
|
|
10834
|
+
}
|
|
10796
10835
|
} else {
|
|
10797
10836
|
option.selected = value.has(optionValue);
|
|
10798
10837
|
}
|