@vue/compat 3.5.10 → 3.5.12
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/vue.cjs.js +228 -259
- package/dist/vue.cjs.prod.js +204 -245
- package/dist/vue.esm-browser.js +227 -258
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +227 -258
- package/dist/vue.global.js +218 -254
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +223 -257
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +223 -257
- package/dist/vue.runtime.global.js +214 -253
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +2 -2
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.12
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -589,8 +589,14 @@ class ReactiveEffect {
|
|
|
589
589
|
}
|
|
590
590
|
let batchDepth = 0;
|
|
591
591
|
let batchedSub;
|
|
592
|
-
|
|
592
|
+
let batchedComputed;
|
|
593
|
+
function batch(sub, isComputed = false) {
|
|
593
594
|
sub.flags |= 8;
|
|
595
|
+
if (isComputed) {
|
|
596
|
+
sub.next = batchedComputed;
|
|
597
|
+
batchedComputed = sub;
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
594
600
|
sub.next = batchedSub;
|
|
595
601
|
batchedSub = sub;
|
|
596
602
|
}
|
|
@@ -601,20 +607,22 @@ function endBatch() {
|
|
|
601
607
|
if (--batchDepth > 0) {
|
|
602
608
|
return;
|
|
603
609
|
}
|
|
610
|
+
if (batchedComputed) {
|
|
611
|
+
let e = batchedComputed;
|
|
612
|
+
batchedComputed = void 0;
|
|
613
|
+
while (e) {
|
|
614
|
+
const next = e.next;
|
|
615
|
+
e.next = void 0;
|
|
616
|
+
e.flags &= ~8;
|
|
617
|
+
e = next;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
604
620
|
let error;
|
|
605
621
|
while (batchedSub) {
|
|
606
622
|
let e = batchedSub;
|
|
607
|
-
let next;
|
|
608
|
-
while (e) {
|
|
609
|
-
if (!(e.flags & 1)) {
|
|
610
|
-
e.flags &= ~8;
|
|
611
|
-
}
|
|
612
|
-
e = e.next;
|
|
613
|
-
}
|
|
614
|
-
e = batchedSub;
|
|
615
623
|
batchedSub = void 0;
|
|
616
624
|
while (e) {
|
|
617
|
-
next = e.next;
|
|
625
|
+
const next = e.next;
|
|
618
626
|
e.next = void 0;
|
|
619
627
|
e.flags &= ~8;
|
|
620
628
|
if (e.flags & 1) {
|
|
@@ -716,11 +724,11 @@ function removeSub(link, soft = false) {
|
|
|
716
724
|
}
|
|
717
725
|
if (dep.subs === link) {
|
|
718
726
|
dep.subs = prevSub;
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
727
|
+
if (!prevSub && dep.computed) {
|
|
728
|
+
dep.computed.flags &= ~4;
|
|
729
|
+
for (let l = dep.computed.deps; l; l = l.nextDep) {
|
|
730
|
+
removeSub(l, true);
|
|
731
|
+
}
|
|
724
732
|
}
|
|
725
733
|
}
|
|
726
734
|
if (!soft && !--dep.sc && dep.map) {
|
|
@@ -807,7 +815,6 @@ class Dep {
|
|
|
807
815
|
/**
|
|
808
816
|
* For object property deps cleanup
|
|
809
817
|
*/
|
|
810
|
-
this.target = void 0;
|
|
811
818
|
this.map = void 0;
|
|
812
819
|
this.key = void 0;
|
|
813
820
|
/**
|
|
@@ -906,7 +913,6 @@ function track(target, type, key) {
|
|
|
906
913
|
let dep = depsMap.get(key);
|
|
907
914
|
if (!dep) {
|
|
908
915
|
depsMap.set(key, dep = new Dep());
|
|
909
|
-
dep.target = target;
|
|
910
916
|
dep.map = depsMap;
|
|
911
917
|
dep.key = key;
|
|
912
918
|
}
|
|
@@ -942,7 +948,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
942
948
|
}
|
|
943
949
|
});
|
|
944
950
|
} else {
|
|
945
|
-
if (key !== void 0) {
|
|
951
|
+
if (key !== void 0 || depsMap.has(void 0)) {
|
|
946
952
|
run(depsMap.get(key));
|
|
947
953
|
}
|
|
948
954
|
if (isArrayIndex) {
|
|
@@ -1305,112 +1311,6 @@ const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true
|
|
|
1305
1311
|
|
|
1306
1312
|
const toShallow = (value) => value;
|
|
1307
1313
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
1308
|
-
function get(target, key, isReadonly2 = false, isShallow2 = false) {
|
|
1309
|
-
target = target["__v_raw"];
|
|
1310
|
-
const rawTarget = toRaw(target);
|
|
1311
|
-
const rawKey = toRaw(key);
|
|
1312
|
-
if (!isReadonly2) {
|
|
1313
|
-
if (hasChanged(key, rawKey)) {
|
|
1314
|
-
track(rawTarget, "get", key);
|
|
1315
|
-
}
|
|
1316
|
-
track(rawTarget, "get", rawKey);
|
|
1317
|
-
}
|
|
1318
|
-
const { has: has2 } = getProto(rawTarget);
|
|
1319
|
-
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1320
|
-
if (has2.call(rawTarget, key)) {
|
|
1321
|
-
return wrap(target.get(key));
|
|
1322
|
-
} else if (has2.call(rawTarget, rawKey)) {
|
|
1323
|
-
return wrap(target.get(rawKey));
|
|
1324
|
-
} else if (target !== rawTarget) {
|
|
1325
|
-
target.get(key);
|
|
1326
|
-
}
|
|
1327
|
-
}
|
|
1328
|
-
function has(key, isReadonly2 = false) {
|
|
1329
|
-
const target = this["__v_raw"];
|
|
1330
|
-
const rawTarget = toRaw(target);
|
|
1331
|
-
const rawKey = toRaw(key);
|
|
1332
|
-
if (!isReadonly2) {
|
|
1333
|
-
if (hasChanged(key, rawKey)) {
|
|
1334
|
-
track(rawTarget, "has", key);
|
|
1335
|
-
}
|
|
1336
|
-
track(rawTarget, "has", rawKey);
|
|
1337
|
-
}
|
|
1338
|
-
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1339
|
-
}
|
|
1340
|
-
function size(target, isReadonly2 = false) {
|
|
1341
|
-
target = target["__v_raw"];
|
|
1342
|
-
!isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1343
|
-
return Reflect.get(target, "size", target);
|
|
1344
|
-
}
|
|
1345
|
-
function add(value, _isShallow = false) {
|
|
1346
|
-
if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
|
|
1347
|
-
value = toRaw(value);
|
|
1348
|
-
}
|
|
1349
|
-
const target = toRaw(this);
|
|
1350
|
-
const proto = getProto(target);
|
|
1351
|
-
const hadKey = proto.has.call(target, value);
|
|
1352
|
-
if (!hadKey) {
|
|
1353
|
-
target.add(value);
|
|
1354
|
-
trigger(target, "add", value, value);
|
|
1355
|
-
}
|
|
1356
|
-
return this;
|
|
1357
|
-
}
|
|
1358
|
-
function set(key, value, _isShallow = false) {
|
|
1359
|
-
if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
|
|
1360
|
-
value = toRaw(value);
|
|
1361
|
-
}
|
|
1362
|
-
const target = toRaw(this);
|
|
1363
|
-
const { has: has2, get: get2 } = getProto(target);
|
|
1364
|
-
let hadKey = has2.call(target, key);
|
|
1365
|
-
if (!hadKey) {
|
|
1366
|
-
key = toRaw(key);
|
|
1367
|
-
hadKey = has2.call(target, key);
|
|
1368
|
-
}
|
|
1369
|
-
const oldValue = get2.call(target, key);
|
|
1370
|
-
target.set(key, value);
|
|
1371
|
-
if (!hadKey) {
|
|
1372
|
-
trigger(target, "add", key, value);
|
|
1373
|
-
} else if (hasChanged(value, oldValue)) {
|
|
1374
|
-
trigger(target, "set", key, value);
|
|
1375
|
-
}
|
|
1376
|
-
return this;
|
|
1377
|
-
}
|
|
1378
|
-
function deleteEntry(key) {
|
|
1379
|
-
const target = toRaw(this);
|
|
1380
|
-
const { has: has2, get: get2 } = getProto(target);
|
|
1381
|
-
let hadKey = has2.call(target, key);
|
|
1382
|
-
if (!hadKey) {
|
|
1383
|
-
key = toRaw(key);
|
|
1384
|
-
hadKey = has2.call(target, key);
|
|
1385
|
-
}
|
|
1386
|
-
get2 ? get2.call(target, key) : void 0;
|
|
1387
|
-
const result = target.delete(key);
|
|
1388
|
-
if (hadKey) {
|
|
1389
|
-
trigger(target, "delete", key, void 0);
|
|
1390
|
-
}
|
|
1391
|
-
return result;
|
|
1392
|
-
}
|
|
1393
|
-
function clear() {
|
|
1394
|
-
const target = toRaw(this);
|
|
1395
|
-
const hadItems = target.size !== 0;
|
|
1396
|
-
const result = target.clear();
|
|
1397
|
-
if (hadItems) {
|
|
1398
|
-
trigger(target, "clear", void 0, void 0);
|
|
1399
|
-
}
|
|
1400
|
-
return result;
|
|
1401
|
-
}
|
|
1402
|
-
function createForEach(isReadonly2, isShallow2) {
|
|
1403
|
-
return function forEach(callback, thisArg) {
|
|
1404
|
-
const observed = this;
|
|
1405
|
-
const target = observed["__v_raw"];
|
|
1406
|
-
const rawTarget = toRaw(target);
|
|
1407
|
-
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1408
|
-
!isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1409
|
-
return target.forEach((value, key) => {
|
|
1410
|
-
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1411
|
-
});
|
|
1412
|
-
};
|
|
1413
|
-
}
|
|
1414
1314
|
function createIterableMethod(method, isReadonly2, isShallow2) {
|
|
1415
1315
|
return function(...args) {
|
|
1416
1316
|
const target = this["__v_raw"];
|
|
@@ -1446,71 +1346,127 @@ function createReadonlyMethod(type) {
|
|
|
1446
1346
|
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1447
1347
|
};
|
|
1448
1348
|
}
|
|
1449
|
-
function createInstrumentations() {
|
|
1450
|
-
const
|
|
1451
|
-
get(key) {
|
|
1452
|
-
return get(this, key);
|
|
1453
|
-
},
|
|
1454
|
-
get size() {
|
|
1455
|
-
return size(this);
|
|
1456
|
-
},
|
|
1457
|
-
has,
|
|
1458
|
-
add,
|
|
1459
|
-
set,
|
|
1460
|
-
delete: deleteEntry,
|
|
1461
|
-
clear,
|
|
1462
|
-
forEach: createForEach(false, false)
|
|
1463
|
-
};
|
|
1464
|
-
const shallowInstrumentations2 = {
|
|
1465
|
-
get(key) {
|
|
1466
|
-
return get(this, key, false, true);
|
|
1467
|
-
},
|
|
1468
|
-
get size() {
|
|
1469
|
-
return size(this);
|
|
1470
|
-
},
|
|
1471
|
-
has,
|
|
1472
|
-
add(value) {
|
|
1473
|
-
return add.call(this, value, true);
|
|
1474
|
-
},
|
|
1475
|
-
set(key, value) {
|
|
1476
|
-
return set.call(this, key, value, true);
|
|
1477
|
-
},
|
|
1478
|
-
delete: deleteEntry,
|
|
1479
|
-
clear,
|
|
1480
|
-
forEach: createForEach(false, true)
|
|
1481
|
-
};
|
|
1482
|
-
const readonlyInstrumentations2 = {
|
|
1483
|
-
get(key) {
|
|
1484
|
-
return get(this, key, true);
|
|
1485
|
-
},
|
|
1486
|
-
get size() {
|
|
1487
|
-
return size(this, true);
|
|
1488
|
-
},
|
|
1489
|
-
has(key) {
|
|
1490
|
-
return has.call(this, key, true);
|
|
1491
|
-
},
|
|
1492
|
-
add: createReadonlyMethod("add"),
|
|
1493
|
-
set: createReadonlyMethod("set"),
|
|
1494
|
-
delete: createReadonlyMethod("delete"),
|
|
1495
|
-
clear: createReadonlyMethod("clear"),
|
|
1496
|
-
forEach: createForEach(true, false)
|
|
1497
|
-
};
|
|
1498
|
-
const shallowReadonlyInstrumentations2 = {
|
|
1349
|
+
function createInstrumentations(readonly, shallow) {
|
|
1350
|
+
const instrumentations = {
|
|
1499
1351
|
get(key) {
|
|
1500
|
-
|
|
1352
|
+
const target = this["__v_raw"];
|
|
1353
|
+
const rawTarget = toRaw(target);
|
|
1354
|
+
const rawKey = toRaw(key);
|
|
1355
|
+
if (!readonly) {
|
|
1356
|
+
if (hasChanged(key, rawKey)) {
|
|
1357
|
+
track(rawTarget, "get", key);
|
|
1358
|
+
}
|
|
1359
|
+
track(rawTarget, "get", rawKey);
|
|
1360
|
+
}
|
|
1361
|
+
const { has } = getProto(rawTarget);
|
|
1362
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1363
|
+
if (has.call(rawTarget, key)) {
|
|
1364
|
+
return wrap(target.get(key));
|
|
1365
|
+
} else if (has.call(rawTarget, rawKey)) {
|
|
1366
|
+
return wrap(target.get(rawKey));
|
|
1367
|
+
} else if (target !== rawTarget) {
|
|
1368
|
+
target.get(key);
|
|
1369
|
+
}
|
|
1501
1370
|
},
|
|
1502
1371
|
get size() {
|
|
1503
|
-
|
|
1372
|
+
const target = this["__v_raw"];
|
|
1373
|
+
!readonly && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1374
|
+
return Reflect.get(target, "size", target);
|
|
1504
1375
|
},
|
|
1505
1376
|
has(key) {
|
|
1506
|
-
|
|
1377
|
+
const target = this["__v_raw"];
|
|
1378
|
+
const rawTarget = toRaw(target);
|
|
1379
|
+
const rawKey = toRaw(key);
|
|
1380
|
+
if (!readonly) {
|
|
1381
|
+
if (hasChanged(key, rawKey)) {
|
|
1382
|
+
track(rawTarget, "has", key);
|
|
1383
|
+
}
|
|
1384
|
+
track(rawTarget, "has", rawKey);
|
|
1385
|
+
}
|
|
1386
|
+
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1507
1387
|
},
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1388
|
+
forEach(callback, thisArg) {
|
|
1389
|
+
const observed = this;
|
|
1390
|
+
const target = observed["__v_raw"];
|
|
1391
|
+
const rawTarget = toRaw(target);
|
|
1392
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1393
|
+
!readonly && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1394
|
+
return target.forEach((value, key) => {
|
|
1395
|
+
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1396
|
+
});
|
|
1397
|
+
}
|
|
1513
1398
|
};
|
|
1399
|
+
extend$1(
|
|
1400
|
+
instrumentations,
|
|
1401
|
+
readonly ? {
|
|
1402
|
+
add: createReadonlyMethod("add"),
|
|
1403
|
+
set: createReadonlyMethod("set"),
|
|
1404
|
+
delete: createReadonlyMethod("delete"),
|
|
1405
|
+
clear: createReadonlyMethod("clear")
|
|
1406
|
+
} : {
|
|
1407
|
+
add(value) {
|
|
1408
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1409
|
+
value = toRaw(value);
|
|
1410
|
+
}
|
|
1411
|
+
const target = toRaw(this);
|
|
1412
|
+
const proto = getProto(target);
|
|
1413
|
+
const hadKey = proto.has.call(target, value);
|
|
1414
|
+
if (!hadKey) {
|
|
1415
|
+
target.add(value);
|
|
1416
|
+
trigger(target, "add", value, value);
|
|
1417
|
+
}
|
|
1418
|
+
return this;
|
|
1419
|
+
},
|
|
1420
|
+
set(key, value) {
|
|
1421
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1422
|
+
value = toRaw(value);
|
|
1423
|
+
}
|
|
1424
|
+
const target = toRaw(this);
|
|
1425
|
+
const { has, get } = getProto(target);
|
|
1426
|
+
let hadKey = has.call(target, key);
|
|
1427
|
+
if (!hadKey) {
|
|
1428
|
+
key = toRaw(key);
|
|
1429
|
+
hadKey = has.call(target, key);
|
|
1430
|
+
}
|
|
1431
|
+
const oldValue = get.call(target, key);
|
|
1432
|
+
target.set(key, value);
|
|
1433
|
+
if (!hadKey) {
|
|
1434
|
+
trigger(target, "add", key, value);
|
|
1435
|
+
} else if (hasChanged(value, oldValue)) {
|
|
1436
|
+
trigger(target, "set", key, value);
|
|
1437
|
+
}
|
|
1438
|
+
return this;
|
|
1439
|
+
},
|
|
1440
|
+
delete(key) {
|
|
1441
|
+
const target = toRaw(this);
|
|
1442
|
+
const { has, get } = getProto(target);
|
|
1443
|
+
let hadKey = has.call(target, key);
|
|
1444
|
+
if (!hadKey) {
|
|
1445
|
+
key = toRaw(key);
|
|
1446
|
+
hadKey = has.call(target, key);
|
|
1447
|
+
}
|
|
1448
|
+
get ? get.call(target, key) : void 0;
|
|
1449
|
+
const result = target.delete(key);
|
|
1450
|
+
if (hadKey) {
|
|
1451
|
+
trigger(target, "delete", key, void 0);
|
|
1452
|
+
}
|
|
1453
|
+
return result;
|
|
1454
|
+
},
|
|
1455
|
+
clear() {
|
|
1456
|
+
const target = toRaw(this);
|
|
1457
|
+
const hadItems = target.size !== 0;
|
|
1458
|
+
const result = target.clear();
|
|
1459
|
+
if (hadItems) {
|
|
1460
|
+
trigger(
|
|
1461
|
+
target,
|
|
1462
|
+
"clear",
|
|
1463
|
+
void 0,
|
|
1464
|
+
void 0);
|
|
1465
|
+
}
|
|
1466
|
+
return result;
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
);
|
|
1514
1470
|
const iteratorMethods = [
|
|
1515
1471
|
"keys",
|
|
1516
1472
|
"values",
|
|
@@ -1518,30 +1474,12 @@ function createInstrumentations() {
|
|
|
1518
1474
|
Symbol.iterator
|
|
1519
1475
|
];
|
|
1520
1476
|
iteratorMethods.forEach((method) => {
|
|
1521
|
-
|
|
1522
|
-
readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
|
|
1523
|
-
shallowInstrumentations2[method] = createIterableMethod(method, false, true);
|
|
1524
|
-
shallowReadonlyInstrumentations2[method] = createIterableMethod(
|
|
1525
|
-
method,
|
|
1526
|
-
true,
|
|
1527
|
-
true
|
|
1528
|
-
);
|
|
1477
|
+
instrumentations[method] = createIterableMethod(method, readonly, shallow);
|
|
1529
1478
|
});
|
|
1530
|
-
return
|
|
1531
|
-
mutableInstrumentations2,
|
|
1532
|
-
readonlyInstrumentations2,
|
|
1533
|
-
shallowInstrumentations2,
|
|
1534
|
-
shallowReadonlyInstrumentations2
|
|
1535
|
-
];
|
|
1479
|
+
return instrumentations;
|
|
1536
1480
|
}
|
|
1537
|
-
const [
|
|
1538
|
-
mutableInstrumentations,
|
|
1539
|
-
readonlyInstrumentations,
|
|
1540
|
-
shallowInstrumentations,
|
|
1541
|
-
shallowReadonlyInstrumentations
|
|
1542
|
-
] = /* @__PURE__ */ createInstrumentations();
|
|
1543
1481
|
function createInstrumentationGetter(isReadonly2, shallow) {
|
|
1544
|
-
const instrumentations =
|
|
1482
|
+
const instrumentations = createInstrumentations(isReadonly2, shallow);
|
|
1545
1483
|
return (target, key, receiver) => {
|
|
1546
1484
|
if (key === "__v_isReactive") {
|
|
1547
1485
|
return !isReadonly2;
|
|
@@ -1873,7 +1811,7 @@ class ComputedRefImpl {
|
|
|
1873
1811
|
this.flags |= 16;
|
|
1874
1812
|
if (!(this.flags & 8) && // avoid infinite self recursion
|
|
1875
1813
|
activeSub !== this) {
|
|
1876
|
-
batch(this);
|
|
1814
|
+
batch(this, true);
|
|
1877
1815
|
return true;
|
|
1878
1816
|
}
|
|
1879
1817
|
}
|
|
@@ -2239,10 +2177,8 @@ function logError(err, type, contextVNode, throwInDev = true, throwInProd = fals
|
|
|
2239
2177
|
}
|
|
2240
2178
|
}
|
|
2241
2179
|
|
|
2242
|
-
let isFlushing = false;
|
|
2243
|
-
let isFlushPending = false;
|
|
2244
2180
|
const queue = [];
|
|
2245
|
-
let flushIndex =
|
|
2181
|
+
let flushIndex = -1;
|
|
2246
2182
|
const pendingPostFlushCbs = [];
|
|
2247
2183
|
let activePostFlushCbs = null;
|
|
2248
2184
|
let postFlushIndex = 0;
|
|
@@ -2253,7 +2189,7 @@ function nextTick(fn) {
|
|
|
2253
2189
|
return fn ? p.then(this ? fn.bind(this) : fn) : p;
|
|
2254
2190
|
}
|
|
2255
2191
|
function findInsertionIndex(id) {
|
|
2256
|
-
let start =
|
|
2192
|
+
let start = flushIndex + 1;
|
|
2257
2193
|
let end = queue.length;
|
|
2258
2194
|
while (start < end) {
|
|
2259
2195
|
const middle = start + end >>> 1;
|
|
@@ -2282,8 +2218,7 @@ function queueJob(job) {
|
|
|
2282
2218
|
}
|
|
2283
2219
|
}
|
|
2284
2220
|
function queueFlush() {
|
|
2285
|
-
if (!
|
|
2286
|
-
isFlushPending = true;
|
|
2221
|
+
if (!currentFlushPromise) {
|
|
2287
2222
|
currentFlushPromise = resolvedPromise.then(flushJobs);
|
|
2288
2223
|
}
|
|
2289
2224
|
}
|
|
@@ -2300,7 +2235,7 @@ function queuePostFlushCb(cb) {
|
|
|
2300
2235
|
}
|
|
2301
2236
|
queueFlush();
|
|
2302
2237
|
}
|
|
2303
|
-
function flushPreFlushCbs(instance, seen, i =
|
|
2238
|
+
function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
2304
2239
|
for (; i < queue.length; i++) {
|
|
2305
2240
|
const cb = queue[i];
|
|
2306
2241
|
if (cb && cb.flags & 2) {
|
|
@@ -2344,8 +2279,6 @@ function flushPostFlushCbs(seen) {
|
|
|
2344
2279
|
}
|
|
2345
2280
|
const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
|
|
2346
2281
|
function flushJobs(seen) {
|
|
2347
|
-
isFlushPending = false;
|
|
2348
|
-
isFlushing = true;
|
|
2349
2282
|
try {
|
|
2350
2283
|
for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
|
|
2351
2284
|
const job = queue[flushIndex];
|
|
@@ -2371,10 +2304,9 @@ function flushJobs(seen) {
|
|
|
2371
2304
|
job.flags &= ~1;
|
|
2372
2305
|
}
|
|
2373
2306
|
}
|
|
2374
|
-
flushIndex =
|
|
2307
|
+
flushIndex = -1;
|
|
2375
2308
|
queue.length = 0;
|
|
2376
2309
|
flushPostFlushCbs();
|
|
2377
|
-
isFlushing = false;
|
|
2378
2310
|
currentFlushPromise = null;
|
|
2379
2311
|
if (queue.length || pendingPostFlushCbs.length) {
|
|
2380
2312
|
flushJobs();
|
|
@@ -2798,13 +2730,13 @@ const TeleportImpl = {
|
|
|
2798
2730
|
}
|
|
2799
2731
|
if (!disabled) {
|
|
2800
2732
|
mount(target, targetAnchor);
|
|
2801
|
-
updateCssVars(n2);
|
|
2733
|
+
updateCssVars(n2, false);
|
|
2802
2734
|
}
|
|
2803
2735
|
}
|
|
2804
2736
|
};
|
|
2805
2737
|
if (disabled) {
|
|
2806
2738
|
mount(container, mainAnchor);
|
|
2807
|
-
updateCssVars(n2);
|
|
2739
|
+
updateCssVars(n2, true);
|
|
2808
2740
|
}
|
|
2809
2741
|
if (isTeleportDeferred(n2.props)) {
|
|
2810
2742
|
queuePostRenderEffect(mountToTarget, parentSuspense);
|
|
@@ -2888,7 +2820,7 @@ const TeleportImpl = {
|
|
|
2888
2820
|
);
|
|
2889
2821
|
}
|
|
2890
2822
|
}
|
|
2891
|
-
updateCssVars(n2);
|
|
2823
|
+
updateCssVars(n2, disabled);
|
|
2892
2824
|
}
|
|
2893
2825
|
},
|
|
2894
2826
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
@@ -2956,9 +2888,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
2956
2888
|
querySelector
|
|
2957
2889
|
);
|
|
2958
2890
|
if (target) {
|
|
2891
|
+
const disabled = isTeleportDisabled(vnode.props);
|
|
2959
2892
|
const targetNode = target._lpa || target.firstChild;
|
|
2960
2893
|
if (vnode.shapeFlag & 16) {
|
|
2961
|
-
if (
|
|
2894
|
+
if (disabled) {
|
|
2962
2895
|
vnode.anchor = hydrateChildren(
|
|
2963
2896
|
nextSibling(node),
|
|
2964
2897
|
vnode,
|
|
@@ -2999,16 +2932,23 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
2999
2932
|
);
|
|
3000
2933
|
}
|
|
3001
2934
|
}
|
|
3002
|
-
updateCssVars(vnode);
|
|
2935
|
+
updateCssVars(vnode, disabled);
|
|
3003
2936
|
}
|
|
3004
2937
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
3005
2938
|
}
|
|
3006
2939
|
const Teleport = TeleportImpl;
|
|
3007
|
-
function updateCssVars(vnode) {
|
|
2940
|
+
function updateCssVars(vnode, isDisabled) {
|
|
3008
2941
|
const ctx = vnode.ctx;
|
|
3009
2942
|
if (ctx && ctx.ut) {
|
|
3010
|
-
let node
|
|
3011
|
-
|
|
2943
|
+
let node, anchor;
|
|
2944
|
+
if (isDisabled) {
|
|
2945
|
+
node = vnode.el;
|
|
2946
|
+
anchor = vnode.anchor;
|
|
2947
|
+
} else {
|
|
2948
|
+
node = vnode.targetStart;
|
|
2949
|
+
anchor = vnode.targetAnchor;
|
|
2950
|
+
}
|
|
2951
|
+
while (node && node !== anchor) {
|
|
3012
2952
|
if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
|
|
3013
2953
|
node = node.nextSibling;
|
|
3014
2954
|
}
|
|
@@ -3700,7 +3640,11 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3700
3640
|
}
|
|
3701
3641
|
let needCallTransitionHooks = false;
|
|
3702
3642
|
if (isTemplateNode(el)) {
|
|
3703
|
-
needCallTransitionHooks = needTransition(
|
|
3643
|
+
needCallTransitionHooks = needTransition(
|
|
3644
|
+
null,
|
|
3645
|
+
// no need check parentSuspense in hydration
|
|
3646
|
+
transition
|
|
3647
|
+
) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
3704
3648
|
const content = el.content.firstChild;
|
|
3705
3649
|
if (needCallTransitionHooks) {
|
|
3706
3650
|
transition.beforeEnter(content);
|
|
@@ -3943,6 +3887,8 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
3943
3887
|
}
|
|
3944
3888
|
}
|
|
3945
3889
|
|
|
3890
|
+
const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
|
|
3891
|
+
const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
|
|
3946
3892
|
const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
|
|
3947
3893
|
const id = requestIdleCallback(hydrate, { timeout });
|
|
3948
3894
|
return () => cancelIdleCallback(id);
|
|
@@ -4893,12 +4839,13 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
4893
4839
|
}
|
|
4894
4840
|
openBlock();
|
|
4895
4841
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
4842
|
+
const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
|
|
4843
|
+
// key attached in the `createSlots` helper, respect that
|
|
4844
|
+
validSlotContent && validSlotContent.key;
|
|
4896
4845
|
const rendered = createBlock(
|
|
4897
4846
|
Fragment,
|
|
4898
4847
|
{
|
|
4899
|
-
key: (
|
|
4900
|
-
// key attached in the `createSlots` helper, respect that
|
|
4901
|
-
validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
4848
|
+
key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
4902
4849
|
(!validSlotContent && fallback ? "_fb" : "")
|
|
4903
4850
|
},
|
|
4904
4851
|
validSlotContent || (fallback ? fallback() : []),
|
|
@@ -5814,7 +5761,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5814
5761
|
return vm;
|
|
5815
5762
|
}
|
|
5816
5763
|
}
|
|
5817
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
5764
|
+
Vue.version = `2.6.14-compat:${"3.5.12"}`;
|
|
5818
5765
|
Vue.config = singletonApp.config;
|
|
5819
5766
|
Vue.use = (plugin, ...options) => {
|
|
5820
5767
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8153,14 +8100,13 @@ function watch(source, cb, options) {
|
|
|
8153
8100
|
function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
8154
8101
|
const { immediate, deep, flush, once } = options;
|
|
8155
8102
|
const baseWatchOptions = extend$1({}, options);
|
|
8103
|
+
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
8156
8104
|
let ssrCleanup;
|
|
8157
8105
|
if (isInSSRComponentSetup) {
|
|
8158
8106
|
if (flush === "sync") {
|
|
8159
8107
|
const ctx = useSSRContext();
|
|
8160
8108
|
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
8161
|
-
} else if (!
|
|
8162
|
-
baseWatchOptions.once = true;
|
|
8163
|
-
} else {
|
|
8109
|
+
} else if (!runsImmediately) {
|
|
8164
8110
|
const watchStopHandle = () => {
|
|
8165
8111
|
};
|
|
8166
8112
|
watchStopHandle.stop = NOOP;
|
|
@@ -8199,7 +8145,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
8199
8145
|
}
|
|
8200
8146
|
};
|
|
8201
8147
|
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
8202
|
-
if (
|
|
8148
|
+
if (isInSSRComponentSetup) {
|
|
8149
|
+
if (ssrCleanup) {
|
|
8150
|
+
ssrCleanup.push(watchHandle);
|
|
8151
|
+
} else if (runsImmediately) {
|
|
8152
|
+
watchHandle();
|
|
8153
|
+
}
|
|
8154
|
+
}
|
|
8203
8155
|
return watchHandle;
|
|
8204
8156
|
}
|
|
8205
8157
|
function instanceWatch(source, value, options) {
|
|
@@ -8232,13 +8184,13 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
8232
8184
|
const i = getCurrentInstance();
|
|
8233
8185
|
const camelizedName = camelize(name);
|
|
8234
8186
|
const hyphenatedName = hyphenate(name);
|
|
8235
|
-
const modifiers = getModelModifiers(props,
|
|
8187
|
+
const modifiers = getModelModifiers(props, camelizedName);
|
|
8236
8188
|
const res = customRef((track, trigger) => {
|
|
8237
8189
|
let localValue;
|
|
8238
8190
|
let prevSetValue = EMPTY_OBJ;
|
|
8239
8191
|
let prevEmittedValue;
|
|
8240
8192
|
watchSyncEffect(() => {
|
|
8241
|
-
const propValue = props[
|
|
8193
|
+
const propValue = props[camelizedName];
|
|
8242
8194
|
if (hasChanged(localValue, propValue)) {
|
|
8243
8195
|
localValue = propValue;
|
|
8244
8196
|
trigger();
|
|
@@ -9731,9 +9683,9 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
9731
9683
|
instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
|
|
9732
9684
|
const { setup } = Component;
|
|
9733
9685
|
if (setup) {
|
|
9686
|
+
pauseTracking();
|
|
9734
9687
|
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
9735
9688
|
const reset = setCurrentInstance(instance);
|
|
9736
|
-
pauseTracking();
|
|
9737
9689
|
const setupResult = callWithErrorHandling(
|
|
9738
9690
|
setup,
|
|
9739
9691
|
instance,
|
|
@@ -9743,10 +9695,13 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
9743
9695
|
setupContext
|
|
9744
9696
|
]
|
|
9745
9697
|
);
|
|
9698
|
+
const isAsyncSetup = isPromise(setupResult);
|
|
9746
9699
|
resetTracking();
|
|
9747
9700
|
reset();
|
|
9748
|
-
if (
|
|
9749
|
-
|
|
9701
|
+
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
|
|
9702
|
+
markAsyncBoundary(instance);
|
|
9703
|
+
}
|
|
9704
|
+
if (isAsyncSetup) {
|
|
9750
9705
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
9751
9706
|
if (isSSR) {
|
|
9752
9707
|
return setupResult.then((resolvedResult) => {
|
|
@@ -9935,7 +9890,7 @@ function isMemoSame(cached, memo) {
|
|
|
9935
9890
|
return true;
|
|
9936
9891
|
}
|
|
9937
9892
|
|
|
9938
|
-
const version = "3.5.
|
|
9893
|
+
const version = "3.5.12";
|
|
9939
9894
|
const warn$1 = NOOP;
|
|
9940
9895
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9941
9896
|
const devtools = void 0;
|
|
@@ -10559,7 +10514,7 @@ function compatCoerceAttr(el, key, value, instance = null) {
|
|
|
10559
10514
|
return false;
|
|
10560
10515
|
}
|
|
10561
10516
|
|
|
10562
|
-
function patchDOMProp(el, key, value, parentComponent) {
|
|
10517
|
+
function patchDOMProp(el, key, value, parentComponent, attrName) {
|
|
10563
10518
|
if (key === "innerHTML" || key === "textContent") {
|
|
10564
10519
|
if (value != null) {
|
|
10565
10520
|
el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
|
|
@@ -10612,7 +10567,7 @@ function patchDOMProp(el, key, value, parentComponent) {
|
|
|
10612
10567
|
el[key] = value;
|
|
10613
10568
|
} catch (e) {
|
|
10614
10569
|
}
|
|
10615
|
-
needRemove && el.removeAttribute(key);
|
|
10570
|
+
needRemove && el.removeAttribute(attrName || key);
|
|
10616
10571
|
}
|
|
10617
10572
|
|
|
10618
10573
|
function addEventListener(el, event, handler, options) {
|
|
@@ -10712,7 +10667,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
|
|
|
10712
10667
|
// #11081 force set props for possible async custom element
|
|
10713
10668
|
el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
|
|
10714
10669
|
) {
|
|
10715
|
-
patchDOMProp(el, camelize(key), nextValue, parentComponent);
|
|
10670
|
+
patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
|
|
10716
10671
|
} else {
|
|
10717
10672
|
if (key === "true-value") {
|
|
10718
10673
|
el._trueValue = nextValue;
|
|
@@ -11375,7 +11330,7 @@ const vModelCheckbox = {
|
|
|
11375
11330
|
setChecked(el, binding, vnode);
|
|
11376
11331
|
}
|
|
11377
11332
|
};
|
|
11378
|
-
function setChecked(el, { value }, vnode) {
|
|
11333
|
+
function setChecked(el, { value, oldValue }, vnode) {
|
|
11379
11334
|
el._modelValue = value;
|
|
11380
11335
|
let checked;
|
|
11381
11336
|
if (isArray(value)) {
|
|
@@ -11383,6 +11338,7 @@ function setChecked(el, { value }, vnode) {
|
|
|
11383
11338
|
} else if (isSet(value)) {
|
|
11384
11339
|
checked = value.has(vnode.props.value);
|
|
11385
11340
|
} else {
|
|
11341
|
+
if (value === oldValue) return;
|
|
11386
11342
|
checked = looseEqual(value, getCheckboxValue(el, true));
|
|
11387
11343
|
}
|
|
11388
11344
|
if (el.checked !== checked) {
|
|
@@ -14359,6 +14315,9 @@ function getLoc(start, end) {
|
|
|
14359
14315
|
source: end == null ? end : getSlice(start, end)
|
|
14360
14316
|
};
|
|
14361
14317
|
}
|
|
14318
|
+
function cloneLoc(loc) {
|
|
14319
|
+
return getLoc(loc.start.offset, loc.end.offset);
|
|
14320
|
+
}
|
|
14362
14321
|
function setLocEnd(loc, end) {
|
|
14363
14322
|
loc.end = tokenizer.getPos(end);
|
|
14364
14323
|
loc.source = getSlice(loc.start.offset, end);
|
|
@@ -16079,7 +16038,7 @@ function processIf(node, dir, context, processCodegen) {
|
|
|
16079
16038
|
const branch = createIfBranch(node, dir);
|
|
16080
16039
|
const ifNode = {
|
|
16081
16040
|
type: 9,
|
|
16082
|
-
loc: node.loc,
|
|
16041
|
+
loc: cloneLoc(node.loc),
|
|
16083
16042
|
branches: [branch]
|
|
16084
16043
|
};
|
|
16085
16044
|
context.replaceNode(ifNode);
|
|
@@ -18483,7 +18442,7 @@ function analyzeNode(node) {
|
|
|
18483
18442
|
if (p.exp && (p.exp.type === 8 || p.exp.constType < 3)) {
|
|
18484
18443
|
return bail();
|
|
18485
18444
|
}
|
|
18486
|
-
if (isOptionTag && isStaticArgOf(p.arg, "value") && p.exp && p.exp.
|
|
18445
|
+
if (isOptionTag && isStaticArgOf(p.arg, "value") && p.exp && !p.exp.isStatic) {
|
|
18487
18446
|
return bail();
|
|
18488
18447
|
}
|
|
18489
18448
|
}
|