@vue/runtime-dom 3.5.11 → 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/runtime-dom.cjs.js +6 -5
- package/dist/runtime-dom.cjs.prod.js +6 -5
- package/dist/runtime-dom.esm-browser.js +198 -232
- package/dist/runtime-dom.esm-browser.prod.js +2 -2
- package/dist/runtime-dom.esm-bundler.js +6 -5
- package/dist/runtime-dom.global.js +189 -228
- package/dist/runtime-dom.global.prod.js +2 -2
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.12
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -690,16 +690,16 @@ function removeSub(link, soft = false) {
|
|
|
690
690
|
nextSub.prevSub = prevSub;
|
|
691
691
|
link.nextSub = void 0;
|
|
692
692
|
}
|
|
693
|
-
if (dep.subs === link) {
|
|
694
|
-
dep.subs = prevSub;
|
|
695
|
-
}
|
|
696
693
|
if (dep.subsHead === link) {
|
|
697
694
|
dep.subsHead = nextSub;
|
|
698
695
|
}
|
|
699
|
-
if (
|
|
700
|
-
dep.
|
|
701
|
-
|
|
702
|
-
|
|
696
|
+
if (dep.subs === link) {
|
|
697
|
+
dep.subs = prevSub;
|
|
698
|
+
if (!prevSub && dep.computed) {
|
|
699
|
+
dep.computed.flags &= ~4;
|
|
700
|
+
for (let l = dep.computed.deps; l; l = l.nextDep) {
|
|
701
|
+
removeSub(l, true);
|
|
702
|
+
}
|
|
703
703
|
}
|
|
704
704
|
}
|
|
705
705
|
if (!soft && !--dep.sc && dep.map) {
|
|
@@ -959,7 +959,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
959
959
|
}
|
|
960
960
|
});
|
|
961
961
|
} else {
|
|
962
|
-
if (key !== void 0) {
|
|
962
|
+
if (key !== void 0 || depsMap.has(void 0)) {
|
|
963
963
|
run(depsMap.get(key));
|
|
964
964
|
}
|
|
965
965
|
if (isArrayIndex) {
|
|
@@ -1334,117 +1334,6 @@ const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true
|
|
|
1334
1334
|
|
|
1335
1335
|
const toShallow = (value) => value;
|
|
1336
1336
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
1337
|
-
function get(target, key, isReadonly2 = false, isShallow2 = false) {
|
|
1338
|
-
target = target["__v_raw"];
|
|
1339
|
-
const rawTarget = toRaw(target);
|
|
1340
|
-
const rawKey = toRaw(key);
|
|
1341
|
-
if (!isReadonly2) {
|
|
1342
|
-
if (hasChanged(key, rawKey)) {
|
|
1343
|
-
track(rawTarget, "get", key);
|
|
1344
|
-
}
|
|
1345
|
-
track(rawTarget, "get", rawKey);
|
|
1346
|
-
}
|
|
1347
|
-
const { has: has2 } = getProto(rawTarget);
|
|
1348
|
-
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1349
|
-
if (has2.call(rawTarget, key)) {
|
|
1350
|
-
return wrap(target.get(key));
|
|
1351
|
-
} else if (has2.call(rawTarget, rawKey)) {
|
|
1352
|
-
return wrap(target.get(rawKey));
|
|
1353
|
-
} else if (target !== rawTarget) {
|
|
1354
|
-
target.get(key);
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
function has(key, isReadonly2 = false) {
|
|
1358
|
-
const target = this["__v_raw"];
|
|
1359
|
-
const rawTarget = toRaw(target);
|
|
1360
|
-
const rawKey = toRaw(key);
|
|
1361
|
-
if (!isReadonly2) {
|
|
1362
|
-
if (hasChanged(key, rawKey)) {
|
|
1363
|
-
track(rawTarget, "has", key);
|
|
1364
|
-
}
|
|
1365
|
-
track(rawTarget, "has", rawKey);
|
|
1366
|
-
}
|
|
1367
|
-
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1368
|
-
}
|
|
1369
|
-
function size(target, isReadonly2 = false) {
|
|
1370
|
-
target = target["__v_raw"];
|
|
1371
|
-
!isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1372
|
-
return Reflect.get(target, "size", target);
|
|
1373
|
-
}
|
|
1374
|
-
function add(value, _isShallow = false) {
|
|
1375
|
-
if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
|
|
1376
|
-
value = toRaw(value);
|
|
1377
|
-
}
|
|
1378
|
-
const target = toRaw(this);
|
|
1379
|
-
const proto = getProto(target);
|
|
1380
|
-
const hadKey = proto.has.call(target, value);
|
|
1381
|
-
if (!hadKey) {
|
|
1382
|
-
target.add(value);
|
|
1383
|
-
trigger(target, "add", value, value);
|
|
1384
|
-
}
|
|
1385
|
-
return this;
|
|
1386
|
-
}
|
|
1387
|
-
function set(key, value, _isShallow = false) {
|
|
1388
|
-
if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
|
|
1389
|
-
value = toRaw(value);
|
|
1390
|
-
}
|
|
1391
|
-
const target = toRaw(this);
|
|
1392
|
-
const { has: has2, get: get2 } = getProto(target);
|
|
1393
|
-
let hadKey = has2.call(target, key);
|
|
1394
|
-
if (!hadKey) {
|
|
1395
|
-
key = toRaw(key);
|
|
1396
|
-
hadKey = has2.call(target, key);
|
|
1397
|
-
} else {
|
|
1398
|
-
checkIdentityKeys(target, has2, key);
|
|
1399
|
-
}
|
|
1400
|
-
const oldValue = get2.call(target, key);
|
|
1401
|
-
target.set(key, value);
|
|
1402
|
-
if (!hadKey) {
|
|
1403
|
-
trigger(target, "add", key, value);
|
|
1404
|
-
} else if (hasChanged(value, oldValue)) {
|
|
1405
|
-
trigger(target, "set", key, value, oldValue);
|
|
1406
|
-
}
|
|
1407
|
-
return this;
|
|
1408
|
-
}
|
|
1409
|
-
function deleteEntry(key) {
|
|
1410
|
-
const target = toRaw(this);
|
|
1411
|
-
const { has: has2, get: get2 } = getProto(target);
|
|
1412
|
-
let hadKey = has2.call(target, key);
|
|
1413
|
-
if (!hadKey) {
|
|
1414
|
-
key = toRaw(key);
|
|
1415
|
-
hadKey = has2.call(target, key);
|
|
1416
|
-
} else {
|
|
1417
|
-
checkIdentityKeys(target, has2, key);
|
|
1418
|
-
}
|
|
1419
|
-
const oldValue = get2 ? get2.call(target, key) : void 0;
|
|
1420
|
-
const result = target.delete(key);
|
|
1421
|
-
if (hadKey) {
|
|
1422
|
-
trigger(target, "delete", key, void 0, oldValue);
|
|
1423
|
-
}
|
|
1424
|
-
return result;
|
|
1425
|
-
}
|
|
1426
|
-
function clear() {
|
|
1427
|
-
const target = toRaw(this);
|
|
1428
|
-
const hadItems = target.size !== 0;
|
|
1429
|
-
const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
|
|
1430
|
-
const result = target.clear();
|
|
1431
|
-
if (hadItems) {
|
|
1432
|
-
trigger(target, "clear", void 0, void 0, oldTarget);
|
|
1433
|
-
}
|
|
1434
|
-
return result;
|
|
1435
|
-
}
|
|
1436
|
-
function createForEach(isReadonly2, isShallow2) {
|
|
1437
|
-
return function forEach(callback, thisArg) {
|
|
1438
|
-
const observed = this;
|
|
1439
|
-
const target = observed["__v_raw"];
|
|
1440
|
-
const rawTarget = toRaw(target);
|
|
1441
|
-
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1442
|
-
!isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1443
|
-
return target.forEach((value, key) => {
|
|
1444
|
-
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1445
|
-
});
|
|
1446
|
-
};
|
|
1447
|
-
}
|
|
1448
1337
|
function createIterableMethod(method, isReadonly2, isShallow2) {
|
|
1449
1338
|
return function(...args) {
|
|
1450
1339
|
const target = this["__v_raw"];
|
|
@@ -1487,71 +1376,134 @@ function createReadonlyMethod(type) {
|
|
|
1487
1376
|
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1488
1377
|
};
|
|
1489
1378
|
}
|
|
1490
|
-
function createInstrumentations() {
|
|
1491
|
-
const
|
|
1492
|
-
get(key) {
|
|
1493
|
-
return get(this, key);
|
|
1494
|
-
},
|
|
1495
|
-
get size() {
|
|
1496
|
-
return size(this);
|
|
1497
|
-
},
|
|
1498
|
-
has,
|
|
1499
|
-
add,
|
|
1500
|
-
set,
|
|
1501
|
-
delete: deleteEntry,
|
|
1502
|
-
clear,
|
|
1503
|
-
forEach: createForEach(false, false)
|
|
1504
|
-
};
|
|
1505
|
-
const shallowInstrumentations2 = {
|
|
1379
|
+
function createInstrumentations(readonly, shallow) {
|
|
1380
|
+
const instrumentations = {
|
|
1506
1381
|
get(key) {
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
return get(this, key, true);
|
|
1526
|
-
},
|
|
1527
|
-
get size() {
|
|
1528
|
-
return size(this, true);
|
|
1529
|
-
},
|
|
1530
|
-
has(key) {
|
|
1531
|
-
return has.call(this, key, true);
|
|
1532
|
-
},
|
|
1533
|
-
add: createReadonlyMethod("add"),
|
|
1534
|
-
set: createReadonlyMethod("set"),
|
|
1535
|
-
delete: createReadonlyMethod("delete"),
|
|
1536
|
-
clear: createReadonlyMethod("clear"),
|
|
1537
|
-
forEach: createForEach(true, false)
|
|
1538
|
-
};
|
|
1539
|
-
const shallowReadonlyInstrumentations2 = {
|
|
1540
|
-
get(key) {
|
|
1541
|
-
return get(this, key, true, true);
|
|
1382
|
+
const target = this["__v_raw"];
|
|
1383
|
+
const rawTarget = toRaw(target);
|
|
1384
|
+
const rawKey = toRaw(key);
|
|
1385
|
+
if (!readonly) {
|
|
1386
|
+
if (hasChanged(key, rawKey)) {
|
|
1387
|
+
track(rawTarget, "get", key);
|
|
1388
|
+
}
|
|
1389
|
+
track(rawTarget, "get", rawKey);
|
|
1390
|
+
}
|
|
1391
|
+
const { has } = getProto(rawTarget);
|
|
1392
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1393
|
+
if (has.call(rawTarget, key)) {
|
|
1394
|
+
return wrap(target.get(key));
|
|
1395
|
+
} else if (has.call(rawTarget, rawKey)) {
|
|
1396
|
+
return wrap(target.get(rawKey));
|
|
1397
|
+
} else if (target !== rawTarget) {
|
|
1398
|
+
target.get(key);
|
|
1399
|
+
}
|
|
1542
1400
|
},
|
|
1543
1401
|
get size() {
|
|
1544
|
-
|
|
1402
|
+
const target = this["__v_raw"];
|
|
1403
|
+
!readonly && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1404
|
+
return Reflect.get(target, "size", target);
|
|
1545
1405
|
},
|
|
1546
1406
|
has(key) {
|
|
1547
|
-
|
|
1407
|
+
const target = this["__v_raw"];
|
|
1408
|
+
const rawTarget = toRaw(target);
|
|
1409
|
+
const rawKey = toRaw(key);
|
|
1410
|
+
if (!readonly) {
|
|
1411
|
+
if (hasChanged(key, rawKey)) {
|
|
1412
|
+
track(rawTarget, "has", key);
|
|
1413
|
+
}
|
|
1414
|
+
track(rawTarget, "has", rawKey);
|
|
1415
|
+
}
|
|
1416
|
+
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1548
1417
|
},
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1418
|
+
forEach(callback, thisArg) {
|
|
1419
|
+
const observed = this;
|
|
1420
|
+
const target = observed["__v_raw"];
|
|
1421
|
+
const rawTarget = toRaw(target);
|
|
1422
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1423
|
+
!readonly && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1424
|
+
return target.forEach((value, key) => {
|
|
1425
|
+
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1426
|
+
});
|
|
1427
|
+
}
|
|
1554
1428
|
};
|
|
1429
|
+
extend(
|
|
1430
|
+
instrumentations,
|
|
1431
|
+
readonly ? {
|
|
1432
|
+
add: createReadonlyMethod("add"),
|
|
1433
|
+
set: createReadonlyMethod("set"),
|
|
1434
|
+
delete: createReadonlyMethod("delete"),
|
|
1435
|
+
clear: createReadonlyMethod("clear")
|
|
1436
|
+
} : {
|
|
1437
|
+
add(value) {
|
|
1438
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1439
|
+
value = toRaw(value);
|
|
1440
|
+
}
|
|
1441
|
+
const target = toRaw(this);
|
|
1442
|
+
const proto = getProto(target);
|
|
1443
|
+
const hadKey = proto.has.call(target, value);
|
|
1444
|
+
if (!hadKey) {
|
|
1445
|
+
target.add(value);
|
|
1446
|
+
trigger(target, "add", value, value);
|
|
1447
|
+
}
|
|
1448
|
+
return this;
|
|
1449
|
+
},
|
|
1450
|
+
set(key, value) {
|
|
1451
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1452
|
+
value = toRaw(value);
|
|
1453
|
+
}
|
|
1454
|
+
const target = toRaw(this);
|
|
1455
|
+
const { has, get } = getProto(target);
|
|
1456
|
+
let hadKey = has.call(target, key);
|
|
1457
|
+
if (!hadKey) {
|
|
1458
|
+
key = toRaw(key);
|
|
1459
|
+
hadKey = has.call(target, key);
|
|
1460
|
+
} else {
|
|
1461
|
+
checkIdentityKeys(target, has, key);
|
|
1462
|
+
}
|
|
1463
|
+
const oldValue = get.call(target, key);
|
|
1464
|
+
target.set(key, value);
|
|
1465
|
+
if (!hadKey) {
|
|
1466
|
+
trigger(target, "add", key, value);
|
|
1467
|
+
} else if (hasChanged(value, oldValue)) {
|
|
1468
|
+
trigger(target, "set", key, value, oldValue);
|
|
1469
|
+
}
|
|
1470
|
+
return this;
|
|
1471
|
+
},
|
|
1472
|
+
delete(key) {
|
|
1473
|
+
const target = toRaw(this);
|
|
1474
|
+
const { has, get } = getProto(target);
|
|
1475
|
+
let hadKey = has.call(target, key);
|
|
1476
|
+
if (!hadKey) {
|
|
1477
|
+
key = toRaw(key);
|
|
1478
|
+
hadKey = has.call(target, key);
|
|
1479
|
+
} else {
|
|
1480
|
+
checkIdentityKeys(target, has, key);
|
|
1481
|
+
}
|
|
1482
|
+
const oldValue = get ? get.call(target, key) : void 0;
|
|
1483
|
+
const result = target.delete(key);
|
|
1484
|
+
if (hadKey) {
|
|
1485
|
+
trigger(target, "delete", key, void 0, oldValue);
|
|
1486
|
+
}
|
|
1487
|
+
return result;
|
|
1488
|
+
},
|
|
1489
|
+
clear() {
|
|
1490
|
+
const target = toRaw(this);
|
|
1491
|
+
const hadItems = target.size !== 0;
|
|
1492
|
+
const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
|
|
1493
|
+
const result = target.clear();
|
|
1494
|
+
if (hadItems) {
|
|
1495
|
+
trigger(
|
|
1496
|
+
target,
|
|
1497
|
+
"clear",
|
|
1498
|
+
void 0,
|
|
1499
|
+
void 0,
|
|
1500
|
+
oldTarget
|
|
1501
|
+
);
|
|
1502
|
+
}
|
|
1503
|
+
return result;
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
);
|
|
1555
1507
|
const iteratorMethods = [
|
|
1556
1508
|
"keys",
|
|
1557
1509
|
"values",
|
|
@@ -1559,30 +1511,12 @@ function createInstrumentations() {
|
|
|
1559
1511
|
Symbol.iterator
|
|
1560
1512
|
];
|
|
1561
1513
|
iteratorMethods.forEach((method) => {
|
|
1562
|
-
|
|
1563
|
-
readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
|
|
1564
|
-
shallowInstrumentations2[method] = createIterableMethod(method, false, true);
|
|
1565
|
-
shallowReadonlyInstrumentations2[method] = createIterableMethod(
|
|
1566
|
-
method,
|
|
1567
|
-
true,
|
|
1568
|
-
true
|
|
1569
|
-
);
|
|
1514
|
+
instrumentations[method] = createIterableMethod(method, readonly, shallow);
|
|
1570
1515
|
});
|
|
1571
|
-
return
|
|
1572
|
-
mutableInstrumentations2,
|
|
1573
|
-
readonlyInstrumentations2,
|
|
1574
|
-
shallowInstrumentations2,
|
|
1575
|
-
shallowReadonlyInstrumentations2
|
|
1576
|
-
];
|
|
1516
|
+
return instrumentations;
|
|
1577
1517
|
}
|
|
1578
|
-
const [
|
|
1579
|
-
mutableInstrumentations,
|
|
1580
|
-
readonlyInstrumentations,
|
|
1581
|
-
shallowInstrumentations,
|
|
1582
|
-
shallowReadonlyInstrumentations
|
|
1583
|
-
] = /* @__PURE__ */ createInstrumentations();
|
|
1584
1518
|
function createInstrumentationGetter(isReadonly2, shallow) {
|
|
1585
|
-
const instrumentations =
|
|
1519
|
+
const instrumentations = createInstrumentations(isReadonly2, shallow);
|
|
1586
1520
|
return (target, key, receiver) => {
|
|
1587
1521
|
if (key === "__v_isReactive") {
|
|
1588
1522
|
return !isReadonly2;
|
|
@@ -1610,9 +1544,9 @@ const readonlyCollectionHandlers = {
|
|
|
1610
1544
|
const shallowReadonlyCollectionHandlers = {
|
|
1611
1545
|
get: /* @__PURE__ */ createInstrumentationGetter(true, true)
|
|
1612
1546
|
};
|
|
1613
|
-
function checkIdentityKeys(target,
|
|
1547
|
+
function checkIdentityKeys(target, has, key) {
|
|
1614
1548
|
const rawKey = toRaw(key);
|
|
1615
|
-
if (rawKey !== key &&
|
|
1549
|
+
if (rawKey !== key && has.call(target, rawKey)) {
|
|
1616
1550
|
const type = toRawType(target);
|
|
1617
1551
|
warn$2(
|
|
1618
1552
|
`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
|
|
@@ -3038,7 +2972,7 @@ const TeleportImpl = {
|
|
|
3038
2972
|
}
|
|
3039
2973
|
if (!disabled) {
|
|
3040
2974
|
mount(target, targetAnchor);
|
|
3041
|
-
updateCssVars(n2);
|
|
2975
|
+
updateCssVars(n2, false);
|
|
3042
2976
|
}
|
|
3043
2977
|
} else if (!disabled) {
|
|
3044
2978
|
warn$1(
|
|
@@ -3050,7 +2984,7 @@ const TeleportImpl = {
|
|
|
3050
2984
|
};
|
|
3051
2985
|
if (disabled) {
|
|
3052
2986
|
mount(container, mainAnchor);
|
|
3053
|
-
updateCssVars(n2);
|
|
2987
|
+
updateCssVars(n2, true);
|
|
3054
2988
|
}
|
|
3055
2989
|
if (isTeleportDeferred(n2.props)) {
|
|
3056
2990
|
queuePostRenderEffect(mountToTarget, parentSuspense);
|
|
@@ -3140,7 +3074,7 @@ const TeleportImpl = {
|
|
|
3140
3074
|
);
|
|
3141
3075
|
}
|
|
3142
3076
|
}
|
|
3143
|
-
updateCssVars(n2);
|
|
3077
|
+
updateCssVars(n2, disabled);
|
|
3144
3078
|
}
|
|
3145
3079
|
},
|
|
3146
3080
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
@@ -3208,9 +3142,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3208
3142
|
querySelector
|
|
3209
3143
|
);
|
|
3210
3144
|
if (target) {
|
|
3145
|
+
const disabled = isTeleportDisabled(vnode.props);
|
|
3211
3146
|
const targetNode = target._lpa || target.firstChild;
|
|
3212
3147
|
if (vnode.shapeFlag & 16) {
|
|
3213
|
-
if (
|
|
3148
|
+
if (disabled) {
|
|
3214
3149
|
vnode.anchor = hydrateChildren(
|
|
3215
3150
|
nextSibling(node),
|
|
3216
3151
|
vnode,
|
|
@@ -3251,16 +3186,23 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3251
3186
|
);
|
|
3252
3187
|
}
|
|
3253
3188
|
}
|
|
3254
|
-
updateCssVars(vnode);
|
|
3189
|
+
updateCssVars(vnode, disabled);
|
|
3255
3190
|
}
|
|
3256
3191
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
3257
3192
|
}
|
|
3258
3193
|
const Teleport = TeleportImpl;
|
|
3259
|
-
function updateCssVars(vnode) {
|
|
3194
|
+
function updateCssVars(vnode, isDisabled) {
|
|
3260
3195
|
const ctx = vnode.ctx;
|
|
3261
3196
|
if (ctx && ctx.ut) {
|
|
3262
|
-
let node
|
|
3263
|
-
|
|
3197
|
+
let node, anchor;
|
|
3198
|
+
if (isDisabled) {
|
|
3199
|
+
node = vnode.el;
|
|
3200
|
+
anchor = vnode.anchor;
|
|
3201
|
+
} else {
|
|
3202
|
+
node = vnode.targetStart;
|
|
3203
|
+
anchor = vnode.targetAnchor;
|
|
3204
|
+
}
|
|
3205
|
+
while (node && node !== anchor) {
|
|
3264
3206
|
if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
|
|
3265
3207
|
node = node.nextSibling;
|
|
3266
3208
|
}
|
|
@@ -3710,8 +3652,15 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3710
3652
|
const setupState = owner.setupState;
|
|
3711
3653
|
const rawSetupState = toRaw(setupState);
|
|
3712
3654
|
const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
|
|
3713
|
-
|
|
3714
|
-
|
|
3655
|
+
{
|
|
3656
|
+
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
|
3657
|
+
warn$1(
|
|
3658
|
+
`Template ref "${key}" used on a non-ref value. It will not work in the production build.`
|
|
3659
|
+
);
|
|
3660
|
+
}
|
|
3661
|
+
if (knownTemplateRefs.has(rawSetupState[key])) {
|
|
3662
|
+
return false;
|
|
3663
|
+
}
|
|
3715
3664
|
}
|
|
3716
3665
|
return hasOwn(rawSetupState, key);
|
|
3717
3666
|
};
|
|
@@ -4008,7 +3957,11 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4008
3957
|
}
|
|
4009
3958
|
let needCallTransitionHooks = false;
|
|
4010
3959
|
if (isTemplateNode(el)) {
|
|
4011
|
-
needCallTransitionHooks = needTransition(
|
|
3960
|
+
needCallTransitionHooks = needTransition(
|
|
3961
|
+
null,
|
|
3962
|
+
// no need check parentSuspense in hydration
|
|
3963
|
+
transition
|
|
3964
|
+
) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
4012
3965
|
const content = el.content.firstChild;
|
|
4013
3966
|
if (needCallTransitionHooks) {
|
|
4014
3967
|
transition.beforeEnter(content);
|
|
@@ -4401,6 +4354,8 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
4401
4354
|
}
|
|
4402
4355
|
}
|
|
4403
4356
|
|
|
4357
|
+
const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
|
|
4358
|
+
const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
|
|
4404
4359
|
const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
|
|
4405
4360
|
const id = requestIdleCallback(hydrate, { timeout });
|
|
4406
4361
|
return () => cancelIdleCallback(id);
|
|
@@ -5103,12 +5058,13 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
5103
5058
|
}
|
|
5104
5059
|
openBlock();
|
|
5105
5060
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5061
|
+
const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
|
|
5062
|
+
// key attached in the `createSlots` helper, respect that
|
|
5063
|
+
validSlotContent && validSlotContent.key;
|
|
5106
5064
|
const rendered = createBlock(
|
|
5107
5065
|
Fragment,
|
|
5108
5066
|
{
|
|
5109
|
-
key: (
|
|
5110
|
-
// key attached in the `createSlots` helper, respect that
|
|
5111
|
-
validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
5067
|
+
key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
5112
5068
|
(!validSlotContent && fallback ? "_fb" : "")
|
|
5113
5069
|
},
|
|
5114
5070
|
validSlotContent || (fallback ? fallback() : []),
|
|
@@ -6466,6 +6422,7 @@ function getType(ctor) {
|
|
|
6466
6422
|
function validateProps(rawProps, props, instance) {
|
|
6467
6423
|
const resolvedValues = toRaw(props);
|
|
6468
6424
|
const options = instance.propsOptions[0];
|
|
6425
|
+
const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
|
|
6469
6426
|
for (const key in options) {
|
|
6470
6427
|
let opt = options[key];
|
|
6471
6428
|
if (opt == null) continue;
|
|
@@ -6474,7 +6431,7 @@ function validateProps(rawProps, props, instance) {
|
|
|
6474
6431
|
resolvedValues[key],
|
|
6475
6432
|
opt,
|
|
6476
6433
|
shallowReadonly(resolvedValues) ,
|
|
6477
|
-
!
|
|
6434
|
+
!camelizePropsKey.includes(key)
|
|
6478
6435
|
);
|
|
6479
6436
|
}
|
|
6480
6437
|
}
|
|
@@ -8254,14 +8211,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
8254
8211
|
}
|
|
8255
8212
|
const baseWatchOptions = extend({}, options);
|
|
8256
8213
|
baseWatchOptions.onWarn = warn$1;
|
|
8214
|
+
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
8257
8215
|
let ssrCleanup;
|
|
8258
8216
|
if (isInSSRComponentSetup) {
|
|
8259
8217
|
if (flush === "sync") {
|
|
8260
8218
|
const ctx = useSSRContext();
|
|
8261
8219
|
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
8262
|
-
} else if (!
|
|
8263
|
-
baseWatchOptions.once = true;
|
|
8264
|
-
} else {
|
|
8220
|
+
} else if (!runsImmediately) {
|
|
8265
8221
|
const watchStopHandle = () => {
|
|
8266
8222
|
};
|
|
8267
8223
|
watchStopHandle.stop = NOOP;
|
|
@@ -8300,7 +8256,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
8300
8256
|
}
|
|
8301
8257
|
};
|
|
8302
8258
|
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
8303
|
-
if (
|
|
8259
|
+
if (isInSSRComponentSetup) {
|
|
8260
|
+
if (ssrCleanup) {
|
|
8261
|
+
ssrCleanup.push(watchHandle);
|
|
8262
|
+
} else if (runsImmediately) {
|
|
8263
|
+
watchHandle();
|
|
8264
|
+
}
|
|
8265
|
+
}
|
|
8304
8266
|
return watchHandle;
|
|
8305
8267
|
}
|
|
8306
8268
|
function instanceWatch(source, value, options) {
|
|
@@ -8335,19 +8297,19 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
8335
8297
|
warn$1(`useModel() called without active instance.`);
|
|
8336
8298
|
return ref();
|
|
8337
8299
|
}
|
|
8338
|
-
|
|
8300
|
+
const camelizedName = camelize(name);
|
|
8301
|
+
if (!i.propsOptions[0][camelizedName]) {
|
|
8339
8302
|
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
8340
8303
|
return ref();
|
|
8341
8304
|
}
|
|
8342
|
-
const camelizedName = camelize(name);
|
|
8343
8305
|
const hyphenatedName = hyphenate(name);
|
|
8344
|
-
const modifiers = getModelModifiers(props,
|
|
8306
|
+
const modifiers = getModelModifiers(props, camelizedName);
|
|
8345
8307
|
const res = customRef((track, trigger) => {
|
|
8346
8308
|
let localValue;
|
|
8347
8309
|
let prevSetValue = EMPTY_OBJ;
|
|
8348
8310
|
let prevEmittedValue;
|
|
8349
8311
|
watchSyncEffect(() => {
|
|
8350
|
-
const propValue = props[
|
|
8312
|
+
const propValue = props[camelizedName];
|
|
8351
8313
|
if (hasChanged(localValue, propValue)) {
|
|
8352
8314
|
localValue = propValue;
|
|
8353
8315
|
trigger();
|
|
@@ -9974,9 +9936,9 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
9974
9936
|
}
|
|
9975
9937
|
const { setup } = Component;
|
|
9976
9938
|
if (setup) {
|
|
9939
|
+
pauseTracking();
|
|
9977
9940
|
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
9978
9941
|
const reset = setCurrentInstance(instance);
|
|
9979
|
-
pauseTracking();
|
|
9980
9942
|
const setupResult = callWithErrorHandling(
|
|
9981
9943
|
setup,
|
|
9982
9944
|
instance,
|
|
@@ -9986,10 +9948,13 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
9986
9948
|
setupContext
|
|
9987
9949
|
]
|
|
9988
9950
|
);
|
|
9951
|
+
const isAsyncSetup = isPromise(setupResult);
|
|
9989
9952
|
resetTracking();
|
|
9990
9953
|
reset();
|
|
9991
|
-
if (
|
|
9992
|
-
|
|
9954
|
+
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
|
|
9955
|
+
markAsyncBoundary(instance);
|
|
9956
|
+
}
|
|
9957
|
+
if (isAsyncSetup) {
|
|
9993
9958
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
9994
9959
|
if (isSSR) {
|
|
9995
9960
|
return setupResult.then((resolvedResult) => {
|
|
@@ -10452,7 +10417,7 @@ function isMemoSame(cached, memo) {
|
|
|
10452
10417
|
return true;
|
|
10453
10418
|
}
|
|
10454
10419
|
|
|
10455
|
-
const version = "3.5.
|
|
10420
|
+
const version = "3.5.12";
|
|
10456
10421
|
const warn = warn$1 ;
|
|
10457
10422
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10458
10423
|
const devtools = devtools$1 ;
|
|
@@ -11085,7 +11050,7 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBoolean
|
|
|
11085
11050
|
}
|
|
11086
11051
|
}
|
|
11087
11052
|
|
|
11088
|
-
function patchDOMProp(el, key, value, parentComponent) {
|
|
11053
|
+
function patchDOMProp(el, key, value, parentComponent, attrName) {
|
|
11089
11054
|
if (key === "innerHTML" || key === "textContent") {
|
|
11090
11055
|
if (value != null) {
|
|
11091
11056
|
el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
|
|
@@ -11133,7 +11098,7 @@ function patchDOMProp(el, key, value, parentComponent) {
|
|
|
11133
11098
|
);
|
|
11134
11099
|
}
|
|
11135
11100
|
}
|
|
11136
|
-
needRemove && el.removeAttribute(key);
|
|
11101
|
+
needRemove && el.removeAttribute(attrName || key);
|
|
11137
11102
|
}
|
|
11138
11103
|
|
|
11139
11104
|
function addEventListener(el, event, handler, options) {
|
|
@@ -11243,7 +11208,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
|
|
|
11243
11208
|
// #11081 force set props for possible async custom element
|
|
11244
11209
|
el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
|
|
11245
11210
|
) {
|
|
11246
|
-
patchDOMProp(el, camelize(key), nextValue);
|
|
11211
|
+
patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
|
|
11247
11212
|
} else {
|
|
11248
11213
|
if (key === "true-value") {
|
|
11249
11214
|
el._trueValue = nextValue;
|
|
@@ -11961,7 +11926,7 @@ const vModelCheckbox = {
|
|
|
11961
11926
|
setChecked(el, binding, vnode);
|
|
11962
11927
|
}
|
|
11963
11928
|
};
|
|
11964
|
-
function setChecked(el, { value }, vnode) {
|
|
11929
|
+
function setChecked(el, { value, oldValue }, vnode) {
|
|
11965
11930
|
el._modelValue = value;
|
|
11966
11931
|
let checked;
|
|
11967
11932
|
if (isArray(value)) {
|
|
@@ -11969,6 +11934,7 @@ function setChecked(el, { value }, vnode) {
|
|
|
11969
11934
|
} else if (isSet(value)) {
|
|
11970
11935
|
checked = value.has(vnode.props.value);
|
|
11971
11936
|
} else {
|
|
11937
|
+
if (value === oldValue) return;
|
|
11972
11938
|
checked = looseEqual(value, getCheckboxValue(el, true));
|
|
11973
11939
|
}
|
|
11974
11940
|
if (el.checked !== checked) {
|