@vue/runtime-dom 3.5.11 → 3.5.13
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 +20 -10
- package/dist/runtime-dom.cjs.prod.js +20 -10
- package/dist/runtime-dom.esm-browser.js +269 -253
- package/dist/runtime-dom.esm-browser.prod.js +2 -2
- package/dist/runtime-dom.esm-bundler.js +25 -14
- package/dist/runtime-dom.global.js +260 -249
- 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.13
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -141,10 +141,9 @@ function parseStringStyle(cssText) {
|
|
|
141
141
|
return ret;
|
|
142
142
|
}
|
|
143
143
|
function stringifyStyle(styles) {
|
|
144
|
+
if (!styles) return "";
|
|
145
|
+
if (isString(styles)) return styles;
|
|
144
146
|
let ret = "";
|
|
145
|
-
if (!styles || isString(styles)) {
|
|
146
|
-
return ret;
|
|
147
|
-
}
|
|
148
147
|
for (const key in styles) {
|
|
149
148
|
const value = styles[key];
|
|
150
149
|
if (isString(value) || typeof value === "number") {
|
|
@@ -405,17 +404,21 @@ class EffectScope {
|
|
|
405
404
|
}
|
|
406
405
|
stop(fromParent) {
|
|
407
406
|
if (this._active) {
|
|
407
|
+
this._active = false;
|
|
408
408
|
let i, l;
|
|
409
409
|
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
410
410
|
this.effects[i].stop();
|
|
411
411
|
}
|
|
412
|
+
this.effects.length = 0;
|
|
412
413
|
for (i = 0, l = this.cleanups.length; i < l; i++) {
|
|
413
414
|
this.cleanups[i]();
|
|
414
415
|
}
|
|
416
|
+
this.cleanups.length = 0;
|
|
415
417
|
if (this.scopes) {
|
|
416
418
|
for (i = 0, l = this.scopes.length; i < l; i++) {
|
|
417
419
|
this.scopes[i].stop(true);
|
|
418
420
|
}
|
|
421
|
+
this.scopes.length = 0;
|
|
419
422
|
}
|
|
420
423
|
if (!this.detached && this.parent && !fromParent) {
|
|
421
424
|
const last = this.parent.scopes.pop();
|
|
@@ -425,7 +428,6 @@ class EffectScope {
|
|
|
425
428
|
}
|
|
426
429
|
}
|
|
427
430
|
this.parent = void 0;
|
|
428
|
-
this._active = false;
|
|
429
431
|
}
|
|
430
432
|
}
|
|
431
433
|
}
|
|
@@ -690,16 +692,16 @@ function removeSub(link, soft = false) {
|
|
|
690
692
|
nextSub.prevSub = prevSub;
|
|
691
693
|
link.nextSub = void 0;
|
|
692
694
|
}
|
|
693
|
-
if (dep.subs === link) {
|
|
694
|
-
dep.subs = prevSub;
|
|
695
|
-
}
|
|
696
695
|
if (dep.subsHead === link) {
|
|
697
696
|
dep.subsHead = nextSub;
|
|
698
697
|
}
|
|
699
|
-
if (
|
|
700
|
-
dep.
|
|
701
|
-
|
|
702
|
-
|
|
698
|
+
if (dep.subs === link) {
|
|
699
|
+
dep.subs = prevSub;
|
|
700
|
+
if (!prevSub && dep.computed) {
|
|
701
|
+
dep.computed.flags &= ~4;
|
|
702
|
+
for (let l = dep.computed.deps; l; l = l.nextDep) {
|
|
703
|
+
removeSub(l, true);
|
|
704
|
+
}
|
|
703
705
|
}
|
|
704
706
|
}
|
|
705
707
|
if (!soft && !--dep.sc && dep.map) {
|
|
@@ -959,7 +961,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
959
961
|
}
|
|
960
962
|
});
|
|
961
963
|
} else {
|
|
962
|
-
if (key !== void 0) {
|
|
964
|
+
if (key !== void 0 || depsMap.has(void 0)) {
|
|
963
965
|
run(depsMap.get(key));
|
|
964
966
|
}
|
|
965
967
|
if (isArrayIndex) {
|
|
@@ -1191,6 +1193,7 @@ class BaseReactiveHandler {
|
|
|
1191
1193
|
this._isShallow = _isShallow;
|
|
1192
1194
|
}
|
|
1193
1195
|
get(target, key, receiver) {
|
|
1196
|
+
if (key === "__v_skip") return target["__v_skip"];
|
|
1194
1197
|
const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
|
|
1195
1198
|
if (key === "__v_isReactive") {
|
|
1196
1199
|
return !isReadonly2;
|
|
@@ -1334,117 +1337,6 @@ const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true
|
|
|
1334
1337
|
|
|
1335
1338
|
const toShallow = (value) => value;
|
|
1336
1339
|
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
1340
|
function createIterableMethod(method, isReadonly2, isShallow2) {
|
|
1449
1341
|
return function(...args) {
|
|
1450
1342
|
const target = this["__v_raw"];
|
|
@@ -1487,71 +1379,134 @@ function createReadonlyMethod(type) {
|
|
|
1487
1379
|
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1488
1380
|
};
|
|
1489
1381
|
}
|
|
1490
|
-
function createInstrumentations() {
|
|
1491
|
-
const
|
|
1382
|
+
function createInstrumentations(readonly, shallow) {
|
|
1383
|
+
const instrumentations = {
|
|
1492
1384
|
get(key) {
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
},
|
|
1512
|
-
has,
|
|
1513
|
-
add(value) {
|
|
1514
|
-
return add.call(this, value, true);
|
|
1515
|
-
},
|
|
1516
|
-
set(key, value) {
|
|
1517
|
-
return set.call(this, key, value, true);
|
|
1518
|
-
},
|
|
1519
|
-
delete: deleteEntry,
|
|
1520
|
-
clear,
|
|
1521
|
-
forEach: createForEach(false, true)
|
|
1522
|
-
};
|
|
1523
|
-
const readonlyInstrumentations2 = {
|
|
1524
|
-
get(key) {
|
|
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);
|
|
1385
|
+
const target = this["__v_raw"];
|
|
1386
|
+
const rawTarget = toRaw(target);
|
|
1387
|
+
const rawKey = toRaw(key);
|
|
1388
|
+
if (!readonly) {
|
|
1389
|
+
if (hasChanged(key, rawKey)) {
|
|
1390
|
+
track(rawTarget, "get", key);
|
|
1391
|
+
}
|
|
1392
|
+
track(rawTarget, "get", rawKey);
|
|
1393
|
+
}
|
|
1394
|
+
const { has } = getProto(rawTarget);
|
|
1395
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1396
|
+
if (has.call(rawTarget, key)) {
|
|
1397
|
+
return wrap(target.get(key));
|
|
1398
|
+
} else if (has.call(rawTarget, rawKey)) {
|
|
1399
|
+
return wrap(target.get(rawKey));
|
|
1400
|
+
} else if (target !== rawTarget) {
|
|
1401
|
+
target.get(key);
|
|
1402
|
+
}
|
|
1542
1403
|
},
|
|
1543
1404
|
get size() {
|
|
1544
|
-
|
|
1405
|
+
const target = this["__v_raw"];
|
|
1406
|
+
!readonly && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1407
|
+
return Reflect.get(target, "size", target);
|
|
1545
1408
|
},
|
|
1546
1409
|
has(key) {
|
|
1547
|
-
|
|
1410
|
+
const target = this["__v_raw"];
|
|
1411
|
+
const rawTarget = toRaw(target);
|
|
1412
|
+
const rawKey = toRaw(key);
|
|
1413
|
+
if (!readonly) {
|
|
1414
|
+
if (hasChanged(key, rawKey)) {
|
|
1415
|
+
track(rawTarget, "has", key);
|
|
1416
|
+
}
|
|
1417
|
+
track(rawTarget, "has", rawKey);
|
|
1418
|
+
}
|
|
1419
|
+
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1548
1420
|
},
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1421
|
+
forEach(callback, thisArg) {
|
|
1422
|
+
const observed = this;
|
|
1423
|
+
const target = observed["__v_raw"];
|
|
1424
|
+
const rawTarget = toRaw(target);
|
|
1425
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1426
|
+
!readonly && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1427
|
+
return target.forEach((value, key) => {
|
|
1428
|
+
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1429
|
+
});
|
|
1430
|
+
}
|
|
1554
1431
|
};
|
|
1432
|
+
extend(
|
|
1433
|
+
instrumentations,
|
|
1434
|
+
readonly ? {
|
|
1435
|
+
add: createReadonlyMethod("add"),
|
|
1436
|
+
set: createReadonlyMethod("set"),
|
|
1437
|
+
delete: createReadonlyMethod("delete"),
|
|
1438
|
+
clear: createReadonlyMethod("clear")
|
|
1439
|
+
} : {
|
|
1440
|
+
add(value) {
|
|
1441
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1442
|
+
value = toRaw(value);
|
|
1443
|
+
}
|
|
1444
|
+
const target = toRaw(this);
|
|
1445
|
+
const proto = getProto(target);
|
|
1446
|
+
const hadKey = proto.has.call(target, value);
|
|
1447
|
+
if (!hadKey) {
|
|
1448
|
+
target.add(value);
|
|
1449
|
+
trigger(target, "add", value, value);
|
|
1450
|
+
}
|
|
1451
|
+
return this;
|
|
1452
|
+
},
|
|
1453
|
+
set(key, value) {
|
|
1454
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1455
|
+
value = toRaw(value);
|
|
1456
|
+
}
|
|
1457
|
+
const target = toRaw(this);
|
|
1458
|
+
const { has, get } = getProto(target);
|
|
1459
|
+
let hadKey = has.call(target, key);
|
|
1460
|
+
if (!hadKey) {
|
|
1461
|
+
key = toRaw(key);
|
|
1462
|
+
hadKey = has.call(target, key);
|
|
1463
|
+
} else {
|
|
1464
|
+
checkIdentityKeys(target, has, key);
|
|
1465
|
+
}
|
|
1466
|
+
const oldValue = get.call(target, key);
|
|
1467
|
+
target.set(key, value);
|
|
1468
|
+
if (!hadKey) {
|
|
1469
|
+
trigger(target, "add", key, value);
|
|
1470
|
+
} else if (hasChanged(value, oldValue)) {
|
|
1471
|
+
trigger(target, "set", key, value, oldValue);
|
|
1472
|
+
}
|
|
1473
|
+
return this;
|
|
1474
|
+
},
|
|
1475
|
+
delete(key) {
|
|
1476
|
+
const target = toRaw(this);
|
|
1477
|
+
const { has, get } = getProto(target);
|
|
1478
|
+
let hadKey = has.call(target, key);
|
|
1479
|
+
if (!hadKey) {
|
|
1480
|
+
key = toRaw(key);
|
|
1481
|
+
hadKey = has.call(target, key);
|
|
1482
|
+
} else {
|
|
1483
|
+
checkIdentityKeys(target, has, key);
|
|
1484
|
+
}
|
|
1485
|
+
const oldValue = get ? get.call(target, key) : void 0;
|
|
1486
|
+
const result = target.delete(key);
|
|
1487
|
+
if (hadKey) {
|
|
1488
|
+
trigger(target, "delete", key, void 0, oldValue);
|
|
1489
|
+
}
|
|
1490
|
+
return result;
|
|
1491
|
+
},
|
|
1492
|
+
clear() {
|
|
1493
|
+
const target = toRaw(this);
|
|
1494
|
+
const hadItems = target.size !== 0;
|
|
1495
|
+
const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
|
|
1496
|
+
const result = target.clear();
|
|
1497
|
+
if (hadItems) {
|
|
1498
|
+
trigger(
|
|
1499
|
+
target,
|
|
1500
|
+
"clear",
|
|
1501
|
+
void 0,
|
|
1502
|
+
void 0,
|
|
1503
|
+
oldTarget
|
|
1504
|
+
);
|
|
1505
|
+
}
|
|
1506
|
+
return result;
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
);
|
|
1555
1510
|
const iteratorMethods = [
|
|
1556
1511
|
"keys",
|
|
1557
1512
|
"values",
|
|
@@ -1559,30 +1514,12 @@ function createInstrumentations() {
|
|
|
1559
1514
|
Symbol.iterator
|
|
1560
1515
|
];
|
|
1561
1516
|
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
|
-
);
|
|
1517
|
+
instrumentations[method] = createIterableMethod(method, readonly, shallow);
|
|
1570
1518
|
});
|
|
1571
|
-
return
|
|
1572
|
-
mutableInstrumentations2,
|
|
1573
|
-
readonlyInstrumentations2,
|
|
1574
|
-
shallowInstrumentations2,
|
|
1575
|
-
shallowReadonlyInstrumentations2
|
|
1576
|
-
];
|
|
1519
|
+
return instrumentations;
|
|
1577
1520
|
}
|
|
1578
|
-
const [
|
|
1579
|
-
mutableInstrumentations,
|
|
1580
|
-
readonlyInstrumentations,
|
|
1581
|
-
shallowInstrumentations,
|
|
1582
|
-
shallowReadonlyInstrumentations
|
|
1583
|
-
] = /* @__PURE__ */ createInstrumentations();
|
|
1584
1521
|
function createInstrumentationGetter(isReadonly2, shallow) {
|
|
1585
|
-
const instrumentations =
|
|
1522
|
+
const instrumentations = createInstrumentations(isReadonly2, shallow);
|
|
1586
1523
|
return (target, key, receiver) => {
|
|
1587
1524
|
if (key === "__v_isReactive") {
|
|
1588
1525
|
return !isReadonly2;
|
|
@@ -1610,9 +1547,9 @@ const readonlyCollectionHandlers = {
|
|
|
1610
1547
|
const shallowReadonlyCollectionHandlers = {
|
|
1611
1548
|
get: /* @__PURE__ */ createInstrumentationGetter(true, true)
|
|
1612
1549
|
};
|
|
1613
|
-
function checkIdentityKeys(target,
|
|
1550
|
+
function checkIdentityKeys(target, has, key) {
|
|
1614
1551
|
const rawKey = toRaw(key);
|
|
1615
|
-
if (rawKey !== key &&
|
|
1552
|
+
if (rawKey !== key && has.call(target, rawKey)) {
|
|
1616
1553
|
const type = toRawType(target);
|
|
1617
1554
|
warn$2(
|
|
1618
1555
|
`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.`
|
|
@@ -2093,7 +2030,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2093
2030
|
const scope = getCurrentScope();
|
|
2094
2031
|
const watchHandle = () => {
|
|
2095
2032
|
effect.stop();
|
|
2096
|
-
if (scope) {
|
|
2033
|
+
if (scope && scope.active) {
|
|
2097
2034
|
remove(scope.effects, effect);
|
|
2098
2035
|
}
|
|
2099
2036
|
};
|
|
@@ -3038,7 +2975,7 @@ const TeleportImpl = {
|
|
|
3038
2975
|
}
|
|
3039
2976
|
if (!disabled) {
|
|
3040
2977
|
mount(target, targetAnchor);
|
|
3041
|
-
updateCssVars(n2);
|
|
2978
|
+
updateCssVars(n2, false);
|
|
3042
2979
|
}
|
|
3043
2980
|
} else if (!disabled) {
|
|
3044
2981
|
warn$1(
|
|
@@ -3050,14 +2987,35 @@ const TeleportImpl = {
|
|
|
3050
2987
|
};
|
|
3051
2988
|
if (disabled) {
|
|
3052
2989
|
mount(container, mainAnchor);
|
|
3053
|
-
updateCssVars(n2);
|
|
2990
|
+
updateCssVars(n2, true);
|
|
3054
2991
|
}
|
|
3055
2992
|
if (isTeleportDeferred(n2.props)) {
|
|
3056
|
-
queuePostRenderEffect(
|
|
2993
|
+
queuePostRenderEffect(() => {
|
|
2994
|
+
mountToTarget();
|
|
2995
|
+
n2.el.__isMounted = true;
|
|
2996
|
+
}, parentSuspense);
|
|
3057
2997
|
} else {
|
|
3058
2998
|
mountToTarget();
|
|
3059
2999
|
}
|
|
3060
3000
|
} else {
|
|
3001
|
+
if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
|
|
3002
|
+
queuePostRenderEffect(() => {
|
|
3003
|
+
TeleportImpl.process(
|
|
3004
|
+
n1,
|
|
3005
|
+
n2,
|
|
3006
|
+
container,
|
|
3007
|
+
anchor,
|
|
3008
|
+
parentComponent,
|
|
3009
|
+
parentSuspense,
|
|
3010
|
+
namespace,
|
|
3011
|
+
slotScopeIds,
|
|
3012
|
+
optimized,
|
|
3013
|
+
internals
|
|
3014
|
+
);
|
|
3015
|
+
delete n1.el.__isMounted;
|
|
3016
|
+
}, parentSuspense);
|
|
3017
|
+
return;
|
|
3018
|
+
}
|
|
3061
3019
|
n2.el = n1.el;
|
|
3062
3020
|
n2.targetStart = n1.targetStart;
|
|
3063
3021
|
const mainAnchor = n2.anchor = n1.anchor;
|
|
@@ -3140,7 +3098,7 @@ const TeleportImpl = {
|
|
|
3140
3098
|
);
|
|
3141
3099
|
}
|
|
3142
3100
|
}
|
|
3143
|
-
updateCssVars(n2);
|
|
3101
|
+
updateCssVars(n2, disabled);
|
|
3144
3102
|
}
|
|
3145
3103
|
},
|
|
3146
3104
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
@@ -3208,9 +3166,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3208
3166
|
querySelector
|
|
3209
3167
|
);
|
|
3210
3168
|
if (target) {
|
|
3169
|
+
const disabled = isTeleportDisabled(vnode.props);
|
|
3211
3170
|
const targetNode = target._lpa || target.firstChild;
|
|
3212
3171
|
if (vnode.shapeFlag & 16) {
|
|
3213
|
-
if (
|
|
3172
|
+
if (disabled) {
|
|
3214
3173
|
vnode.anchor = hydrateChildren(
|
|
3215
3174
|
nextSibling(node),
|
|
3216
3175
|
vnode,
|
|
@@ -3251,16 +3210,23 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3251
3210
|
);
|
|
3252
3211
|
}
|
|
3253
3212
|
}
|
|
3254
|
-
updateCssVars(vnode);
|
|
3213
|
+
updateCssVars(vnode, disabled);
|
|
3255
3214
|
}
|
|
3256
3215
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
3257
3216
|
}
|
|
3258
3217
|
const Teleport = TeleportImpl;
|
|
3259
|
-
function updateCssVars(vnode) {
|
|
3218
|
+
function updateCssVars(vnode, isDisabled) {
|
|
3260
3219
|
const ctx = vnode.ctx;
|
|
3261
3220
|
if (ctx && ctx.ut) {
|
|
3262
|
-
let node
|
|
3263
|
-
|
|
3221
|
+
let node, anchor;
|
|
3222
|
+
if (isDisabled) {
|
|
3223
|
+
node = vnode.el;
|
|
3224
|
+
anchor = vnode.anchor;
|
|
3225
|
+
} else {
|
|
3226
|
+
node = vnode.targetStart;
|
|
3227
|
+
anchor = vnode.targetAnchor;
|
|
3228
|
+
}
|
|
3229
|
+
while (node && node !== anchor) {
|
|
3264
3230
|
if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
|
|
3265
3231
|
node = node.nextSibling;
|
|
3266
3232
|
}
|
|
@@ -3355,10 +3321,9 @@ const BaseTransitionImpl = {
|
|
|
3355
3321
|
if (innerChild.type !== Comment) {
|
|
3356
3322
|
setTransitionHooks(innerChild, enterHooks);
|
|
3357
3323
|
}
|
|
3358
|
-
|
|
3359
|
-
const oldInnerChild = oldChild && getInnerChild$1(oldChild);
|
|
3324
|
+
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
3360
3325
|
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
|
|
3361
|
-
|
|
3326
|
+
let leavingHooks = resolveTransitionHooks(
|
|
3362
3327
|
oldInnerChild,
|
|
3363
3328
|
rawProps,
|
|
3364
3329
|
state,
|
|
@@ -3373,6 +3338,7 @@ const BaseTransitionImpl = {
|
|
|
3373
3338
|
instance.update();
|
|
3374
3339
|
}
|
|
3375
3340
|
delete leavingHooks.afterLeave;
|
|
3341
|
+
oldInnerChild = void 0;
|
|
3376
3342
|
};
|
|
3377
3343
|
return emptyPlaceholder(child);
|
|
3378
3344
|
} else if (mode === "in-out" && innerChild.type !== Comment) {
|
|
@@ -3386,10 +3352,19 @@ const BaseTransitionImpl = {
|
|
|
3386
3352
|
earlyRemove();
|
|
3387
3353
|
el[leaveCbKey] = void 0;
|
|
3388
3354
|
delete enterHooks.delayedLeave;
|
|
3355
|
+
oldInnerChild = void 0;
|
|
3356
|
+
};
|
|
3357
|
+
enterHooks.delayedLeave = () => {
|
|
3358
|
+
delayedLeave();
|
|
3359
|
+
delete enterHooks.delayedLeave;
|
|
3360
|
+
oldInnerChild = void 0;
|
|
3389
3361
|
};
|
|
3390
|
-
enterHooks.delayedLeave = delayedLeave;
|
|
3391
3362
|
};
|
|
3363
|
+
} else {
|
|
3364
|
+
oldInnerChild = void 0;
|
|
3392
3365
|
}
|
|
3366
|
+
} else if (oldInnerChild) {
|
|
3367
|
+
oldInnerChild = void 0;
|
|
3393
3368
|
}
|
|
3394
3369
|
return child;
|
|
3395
3370
|
};
|
|
@@ -3694,6 +3669,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3694
3669
|
return;
|
|
3695
3670
|
}
|
|
3696
3671
|
if (isAsyncWrapper(vnode) && !isUnmount) {
|
|
3672
|
+
if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
|
|
3673
|
+
setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
|
|
3674
|
+
}
|
|
3697
3675
|
return;
|
|
3698
3676
|
}
|
|
3699
3677
|
const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
|
|
@@ -3710,8 +3688,15 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3710
3688
|
const setupState = owner.setupState;
|
|
3711
3689
|
const rawSetupState = toRaw(setupState);
|
|
3712
3690
|
const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
|
|
3713
|
-
|
|
3714
|
-
|
|
3691
|
+
{
|
|
3692
|
+
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
|
3693
|
+
warn$1(
|
|
3694
|
+
`Template ref "${key}" used on a non-ref value. It will not work in the production build.`
|
|
3695
|
+
);
|
|
3696
|
+
}
|
|
3697
|
+
if (knownTemplateRefs.has(rawSetupState[key])) {
|
|
3698
|
+
return false;
|
|
3699
|
+
}
|
|
3715
3700
|
}
|
|
3716
3701
|
return hasOwn(rawSetupState, key);
|
|
3717
3702
|
};
|
|
@@ -3951,7 +3936,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3951
3936
|
getContainerType(container),
|
|
3952
3937
|
optimized
|
|
3953
3938
|
);
|
|
3954
|
-
if (isAsyncWrapper(vnode)) {
|
|
3939
|
+
if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
|
|
3955
3940
|
let subTree;
|
|
3956
3941
|
if (isFragmentStart) {
|
|
3957
3942
|
subTree = createVNode(Fragment);
|
|
@@ -4008,7 +3993,11 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4008
3993
|
}
|
|
4009
3994
|
let needCallTransitionHooks = false;
|
|
4010
3995
|
if (isTemplateNode(el)) {
|
|
4011
|
-
needCallTransitionHooks = needTransition(
|
|
3996
|
+
needCallTransitionHooks = needTransition(
|
|
3997
|
+
null,
|
|
3998
|
+
// no need check parentSuspense in hydration
|
|
3999
|
+
transition
|
|
4000
|
+
) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
4012
4001
|
const content = el.content.firstChild;
|
|
4013
4002
|
if (needCallTransitionHooks) {
|
|
4014
4003
|
transition.beforeEnter(content);
|
|
@@ -4216,6 +4205,10 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4216
4205
|
getContainerType(container),
|
|
4217
4206
|
slotScopeIds
|
|
4218
4207
|
);
|
|
4208
|
+
if (parentComponent) {
|
|
4209
|
+
parentComponent.vnode.el = vnode.el;
|
|
4210
|
+
updateHOCHostEl(parentComponent, vnode.el);
|
|
4211
|
+
}
|
|
4219
4212
|
return next;
|
|
4220
4213
|
};
|
|
4221
4214
|
const locateClosingAnchor = (node, open = "[", close = "]") => {
|
|
@@ -4401,6 +4394,8 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
4401
4394
|
}
|
|
4402
4395
|
}
|
|
4403
4396
|
|
|
4397
|
+
const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
|
|
4398
|
+
const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
|
|
4404
4399
|
const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
|
|
4405
4400
|
const id = requestIdleCallback(hydrate, { timeout });
|
|
4406
4401
|
return () => cancelIdleCallback(id);
|
|
@@ -5103,12 +5098,13 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
5103
5098
|
}
|
|
5104
5099
|
openBlock();
|
|
5105
5100
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5101
|
+
const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
|
|
5102
|
+
// key attached in the `createSlots` helper, respect that
|
|
5103
|
+
validSlotContent && validSlotContent.key;
|
|
5106
5104
|
const rendered = createBlock(
|
|
5107
5105
|
Fragment,
|
|
5108
5106
|
{
|
|
5109
|
-
key: (
|
|
5110
|
-
// key attached in the `createSlots` helper, respect that
|
|
5111
|
-
validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
5107
|
+
key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
5112
5108
|
(!validSlotContent && fallback ? "_fb" : "")
|
|
5113
5109
|
},
|
|
5114
5110
|
validSlotContent || (fallback ? fallback() : []),
|
|
@@ -6466,6 +6462,7 @@ function getType(ctor) {
|
|
|
6466
6462
|
function validateProps(rawProps, props, instance) {
|
|
6467
6463
|
const resolvedValues = toRaw(props);
|
|
6468
6464
|
const options = instance.propsOptions[0];
|
|
6465
|
+
const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
|
|
6469
6466
|
for (const key in options) {
|
|
6470
6467
|
let opt = options[key];
|
|
6471
6468
|
if (opt == null) continue;
|
|
@@ -6474,7 +6471,7 @@ function validateProps(rawProps, props, instance) {
|
|
|
6474
6471
|
resolvedValues[key],
|
|
6475
6472
|
opt,
|
|
6476
6473
|
shallowReadonly(resolvedValues) ,
|
|
6477
|
-
!
|
|
6474
|
+
!camelizePropsKey.includes(key)
|
|
6478
6475
|
);
|
|
6479
6476
|
}
|
|
6480
6477
|
}
|
|
@@ -8254,14 +8251,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
8254
8251
|
}
|
|
8255
8252
|
const baseWatchOptions = extend({}, options);
|
|
8256
8253
|
baseWatchOptions.onWarn = warn$1;
|
|
8254
|
+
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
8257
8255
|
let ssrCleanup;
|
|
8258
8256
|
if (isInSSRComponentSetup) {
|
|
8259
8257
|
if (flush === "sync") {
|
|
8260
8258
|
const ctx = useSSRContext();
|
|
8261
8259
|
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
8262
|
-
} else if (!
|
|
8263
|
-
baseWatchOptions.once = true;
|
|
8264
|
-
} else {
|
|
8260
|
+
} else if (!runsImmediately) {
|
|
8265
8261
|
const watchStopHandle = () => {
|
|
8266
8262
|
};
|
|
8267
8263
|
watchStopHandle.stop = NOOP;
|
|
@@ -8300,7 +8296,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
8300
8296
|
}
|
|
8301
8297
|
};
|
|
8302
8298
|
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
8303
|
-
if (
|
|
8299
|
+
if (isInSSRComponentSetup) {
|
|
8300
|
+
if (ssrCleanup) {
|
|
8301
|
+
ssrCleanup.push(watchHandle);
|
|
8302
|
+
} else if (runsImmediately) {
|
|
8303
|
+
watchHandle();
|
|
8304
|
+
}
|
|
8305
|
+
}
|
|
8304
8306
|
return watchHandle;
|
|
8305
8307
|
}
|
|
8306
8308
|
function instanceWatch(source, value, options) {
|
|
@@ -8335,19 +8337,19 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
8335
8337
|
warn$1(`useModel() called without active instance.`);
|
|
8336
8338
|
return ref();
|
|
8337
8339
|
}
|
|
8338
|
-
|
|
8340
|
+
const camelizedName = camelize(name);
|
|
8341
|
+
if (!i.propsOptions[0][camelizedName]) {
|
|
8339
8342
|
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
8340
8343
|
return ref();
|
|
8341
8344
|
}
|
|
8342
|
-
const camelizedName = camelize(name);
|
|
8343
8345
|
const hyphenatedName = hyphenate(name);
|
|
8344
|
-
const modifiers = getModelModifiers(props,
|
|
8346
|
+
const modifiers = getModelModifiers(props, camelizedName);
|
|
8345
8347
|
const res = customRef((track, trigger) => {
|
|
8346
8348
|
let localValue;
|
|
8347
8349
|
let prevSetValue = EMPTY_OBJ;
|
|
8348
8350
|
let prevEmittedValue;
|
|
8349
8351
|
watchSyncEffect(() => {
|
|
8350
|
-
const propValue = props[
|
|
8352
|
+
const propValue = props[camelizedName];
|
|
8351
8353
|
if (hasChanged(localValue, propValue)) {
|
|
8352
8354
|
localValue = propValue;
|
|
8353
8355
|
trigger();
|
|
@@ -8646,7 +8648,7 @@ function renderComponentRoot(instance) {
|
|
|
8646
8648
|
}
|
|
8647
8649
|
if (extraAttrs.length) {
|
|
8648
8650
|
warn$1(
|
|
8649
|
-
`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
|
|
8651
|
+
`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
|
|
8650
8652
|
);
|
|
8651
8653
|
}
|
|
8652
8654
|
if (eventAttrs.length) {
|
|
@@ -9429,9 +9431,9 @@ function closeBlock() {
|
|
|
9429
9431
|
currentBlock = blockStack[blockStack.length - 1] || null;
|
|
9430
9432
|
}
|
|
9431
9433
|
let isBlockTreeEnabled = 1;
|
|
9432
|
-
function setBlockTracking(value) {
|
|
9434
|
+
function setBlockTracking(value, inVOnce = false) {
|
|
9433
9435
|
isBlockTreeEnabled += value;
|
|
9434
|
-
if (value < 0 && currentBlock) {
|
|
9436
|
+
if (value < 0 && currentBlock && inVOnce) {
|
|
9435
9437
|
currentBlock.hasOnce = true;
|
|
9436
9438
|
}
|
|
9437
9439
|
}
|
|
@@ -9974,9 +9976,9 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
9974
9976
|
}
|
|
9975
9977
|
const { setup } = Component;
|
|
9976
9978
|
if (setup) {
|
|
9979
|
+
pauseTracking();
|
|
9977
9980
|
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
9978
9981
|
const reset = setCurrentInstance(instance);
|
|
9979
|
-
pauseTracking();
|
|
9980
9982
|
const setupResult = callWithErrorHandling(
|
|
9981
9983
|
setup,
|
|
9982
9984
|
instance,
|
|
@@ -9986,10 +9988,13 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
9986
9988
|
setupContext
|
|
9987
9989
|
]
|
|
9988
9990
|
);
|
|
9991
|
+
const isAsyncSetup = isPromise(setupResult);
|
|
9989
9992
|
resetTracking();
|
|
9990
9993
|
reset();
|
|
9991
|
-
if (
|
|
9992
|
-
|
|
9994
|
+
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
|
|
9995
|
+
markAsyncBoundary(instance);
|
|
9996
|
+
}
|
|
9997
|
+
if (isAsyncSetup) {
|
|
9993
9998
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
9994
9999
|
if (isSSR) {
|
|
9995
10000
|
return setupResult.then((resolvedResult) => {
|
|
@@ -10452,7 +10457,7 @@ function isMemoSame(cached, memo) {
|
|
|
10452
10457
|
return true;
|
|
10453
10458
|
}
|
|
10454
10459
|
|
|
10455
|
-
const version = "3.5.
|
|
10460
|
+
const version = "3.5.13";
|
|
10456
10461
|
const warn = warn$1 ;
|
|
10457
10462
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10458
10463
|
const devtools = devtools$1 ;
|
|
@@ -10636,7 +10641,8 @@ function resolveTransitionProps(rawProps) {
|
|
|
10636
10641
|
onAppear = onEnter,
|
|
10637
10642
|
onAppearCancelled = onEnterCancelled
|
|
10638
10643
|
} = baseProps;
|
|
10639
|
-
const finishEnter = (el, isAppear, done) => {
|
|
10644
|
+
const finishEnter = (el, isAppear, done, isCancelled) => {
|
|
10645
|
+
el._enterCancelled = isCancelled;
|
|
10640
10646
|
removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
10641
10647
|
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
10642
10648
|
done && done();
|
|
@@ -10679,8 +10685,13 @@ function resolveTransitionProps(rawProps) {
|
|
|
10679
10685
|
el._isLeaving = true;
|
|
10680
10686
|
const resolve = () => finishLeave(el, done);
|
|
10681
10687
|
addTransitionClass(el, leaveFromClass);
|
|
10682
|
-
|
|
10683
|
-
|
|
10688
|
+
if (!el._enterCancelled) {
|
|
10689
|
+
forceReflow();
|
|
10690
|
+
addTransitionClass(el, leaveActiveClass);
|
|
10691
|
+
} else {
|
|
10692
|
+
addTransitionClass(el, leaveActiveClass);
|
|
10693
|
+
forceReflow();
|
|
10694
|
+
}
|
|
10684
10695
|
nextFrame(() => {
|
|
10685
10696
|
if (!el._isLeaving) {
|
|
10686
10697
|
return;
|
|
@@ -10694,11 +10705,11 @@ function resolveTransitionProps(rawProps) {
|
|
|
10694
10705
|
callHook(onLeave, [el, resolve]);
|
|
10695
10706
|
},
|
|
10696
10707
|
onEnterCancelled(el) {
|
|
10697
|
-
finishEnter(el, false);
|
|
10708
|
+
finishEnter(el, false, void 0, true);
|
|
10698
10709
|
callHook(onEnterCancelled, [el]);
|
|
10699
10710
|
},
|
|
10700
10711
|
onAppearCancelled(el) {
|
|
10701
|
-
finishEnter(el, true);
|
|
10712
|
+
finishEnter(el, true, void 0, true);
|
|
10702
10713
|
callHook(onAppearCancelled, [el]);
|
|
10703
10714
|
},
|
|
10704
10715
|
onLeaveCancelled(el) {
|
|
@@ -10918,10 +10929,11 @@ function useCssVars(getter) {
|
|
|
10918
10929
|
}
|
|
10919
10930
|
updateTeleports(vars);
|
|
10920
10931
|
};
|
|
10921
|
-
|
|
10922
|
-
|
|
10932
|
+
onBeforeUpdate(() => {
|
|
10933
|
+
queuePostFlushCb(setVars);
|
|
10923
10934
|
});
|
|
10924
10935
|
onMounted(() => {
|
|
10936
|
+
watch(setVars, NOOP, { flush: "post" });
|
|
10925
10937
|
const ob = new MutationObserver(setVars);
|
|
10926
10938
|
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
10927
10939
|
onUnmounted(() => ob.disconnect());
|
|
@@ -11085,7 +11097,7 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBoolean
|
|
|
11085
11097
|
}
|
|
11086
11098
|
}
|
|
11087
11099
|
|
|
11088
|
-
function patchDOMProp(el, key, value, parentComponent) {
|
|
11100
|
+
function patchDOMProp(el, key, value, parentComponent, attrName) {
|
|
11089
11101
|
if (key === "innerHTML" || key === "textContent") {
|
|
11090
11102
|
if (value != null) {
|
|
11091
11103
|
el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
|
|
@@ -11133,7 +11145,7 @@ function patchDOMProp(el, key, value, parentComponent) {
|
|
|
11133
11145
|
);
|
|
11134
11146
|
}
|
|
11135
11147
|
}
|
|
11136
|
-
needRemove && el.removeAttribute(key);
|
|
11148
|
+
needRemove && el.removeAttribute(attrName || key);
|
|
11137
11149
|
}
|
|
11138
11150
|
|
|
11139
11151
|
function addEventListener(el, event, handler, options) {
|
|
@@ -11243,7 +11255,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
|
|
|
11243
11255
|
// #11081 force set props for possible async custom element
|
|
11244
11256
|
el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
|
|
11245
11257
|
) {
|
|
11246
|
-
patchDOMProp(el, camelize(key), nextValue);
|
|
11258
|
+
patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
|
|
11247
11259
|
} else {
|
|
11248
11260
|
if (key === "true-value") {
|
|
11249
11261
|
el._trueValue = nextValue;
|
|
@@ -11528,6 +11540,8 @@ class VueElement extends BaseClass {
|
|
|
11528
11540
|
this._update();
|
|
11529
11541
|
}
|
|
11530
11542
|
if (shouldReflect) {
|
|
11543
|
+
const ob = this._ob;
|
|
11544
|
+
ob && ob.disconnect();
|
|
11531
11545
|
if (val === true) {
|
|
11532
11546
|
this.setAttribute(hyphenate(key), "");
|
|
11533
11547
|
} else if (typeof val === "string" || typeof val === "number") {
|
|
@@ -11535,6 +11549,7 @@ class VueElement extends BaseClass {
|
|
|
11535
11549
|
} else if (!val) {
|
|
11536
11550
|
this.removeAttribute(hyphenate(key));
|
|
11537
11551
|
}
|
|
11552
|
+
ob && ob.observe(this, { attributes: true });
|
|
11538
11553
|
}
|
|
11539
11554
|
}
|
|
11540
11555
|
}
|
|
@@ -11961,7 +11976,7 @@ const vModelCheckbox = {
|
|
|
11961
11976
|
setChecked(el, binding, vnode);
|
|
11962
11977
|
}
|
|
11963
11978
|
};
|
|
11964
|
-
function setChecked(el, { value }, vnode) {
|
|
11979
|
+
function setChecked(el, { value, oldValue }, vnode) {
|
|
11965
11980
|
el._modelValue = value;
|
|
11966
11981
|
let checked;
|
|
11967
11982
|
if (isArray(value)) {
|
|
@@ -11969,6 +11984,7 @@ function setChecked(el, { value }, vnode) {
|
|
|
11969
11984
|
} else if (isSet(value)) {
|
|
11970
11985
|
checked = value.has(vnode.props.value);
|
|
11971
11986
|
} else {
|
|
11987
|
+
if (value === oldValue) return;
|
|
11972
11988
|
checked = looseEqual(value, getCheckboxValue(el, true));
|
|
11973
11989
|
}
|
|
11974
11990
|
if (el.checked !== checked) {
|