@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
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -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
|
**/
|
|
@@ -172,7 +172,8 @@ function resolveTransitionProps(rawProps) {
|
|
|
172
172
|
onAppear = onEnter,
|
|
173
173
|
onAppearCancelled = onEnterCancelled
|
|
174
174
|
} = baseProps;
|
|
175
|
-
const finishEnter = (el, isAppear, done) => {
|
|
175
|
+
const finishEnter = (el, isAppear, done, isCancelled) => {
|
|
176
|
+
el._enterCancelled = isCancelled;
|
|
176
177
|
removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
177
178
|
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
178
179
|
done && done();
|
|
@@ -215,8 +216,13 @@ function resolveTransitionProps(rawProps) {
|
|
|
215
216
|
el._isLeaving = true;
|
|
216
217
|
const resolve = () => finishLeave(el, done);
|
|
217
218
|
addTransitionClass(el, leaveFromClass);
|
|
218
|
-
|
|
219
|
-
|
|
219
|
+
if (!el._enterCancelled) {
|
|
220
|
+
forceReflow();
|
|
221
|
+
addTransitionClass(el, leaveActiveClass);
|
|
222
|
+
} else {
|
|
223
|
+
addTransitionClass(el, leaveActiveClass);
|
|
224
|
+
forceReflow();
|
|
225
|
+
}
|
|
220
226
|
nextFrame(() => {
|
|
221
227
|
if (!el._isLeaving) {
|
|
222
228
|
return;
|
|
@@ -230,11 +236,11 @@ function resolveTransitionProps(rawProps) {
|
|
|
230
236
|
callHook(onLeave, [el, resolve]);
|
|
231
237
|
},
|
|
232
238
|
onEnterCancelled(el) {
|
|
233
|
-
finishEnter(el, false);
|
|
239
|
+
finishEnter(el, false, void 0, true);
|
|
234
240
|
callHook(onEnterCancelled, [el]);
|
|
235
241
|
},
|
|
236
242
|
onAppearCancelled(el) {
|
|
237
|
-
finishEnter(el, true);
|
|
243
|
+
finishEnter(el, true, void 0, true);
|
|
238
244
|
callHook(onAppearCancelled, [el]);
|
|
239
245
|
},
|
|
240
246
|
onLeaveCancelled(el) {
|
|
@@ -555,7 +561,7 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = shared.isSpecial
|
|
|
555
561
|
}
|
|
556
562
|
}
|
|
557
563
|
|
|
558
|
-
function patchDOMProp(el, key, value, parentComponent) {
|
|
564
|
+
function patchDOMProp(el, key, value, parentComponent, attrName) {
|
|
559
565
|
if (key === "innerHTML" || key === "textContent") {
|
|
560
566
|
if (value != null) {
|
|
561
567
|
el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
|
|
@@ -603,7 +609,7 @@ function patchDOMProp(el, key, value, parentComponent) {
|
|
|
603
609
|
);
|
|
604
610
|
}
|
|
605
611
|
}
|
|
606
|
-
needRemove && el.removeAttribute(key);
|
|
612
|
+
needRemove && el.removeAttribute(attrName || key);
|
|
607
613
|
}
|
|
608
614
|
|
|
609
615
|
function addEventListener(el, event, handler, options) {
|
|
@@ -713,7 +719,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
|
|
|
713
719
|
// #11081 force set props for possible async custom element
|
|
714
720
|
el._isVueCE && (/[A-Z]/.test(key) || !shared.isString(nextValue))
|
|
715
721
|
) {
|
|
716
|
-
patchDOMProp(el, shared.camelize(key), nextValue);
|
|
722
|
+
patchDOMProp(el, shared.camelize(key), nextValue, parentComponent, key);
|
|
717
723
|
} else {
|
|
718
724
|
if (key === "true-value") {
|
|
719
725
|
el._trueValue = nextValue;
|
|
@@ -998,6 +1004,8 @@ class VueElement extends BaseClass {
|
|
|
998
1004
|
this._update();
|
|
999
1005
|
}
|
|
1000
1006
|
if (shouldReflect) {
|
|
1007
|
+
const ob = this._ob;
|
|
1008
|
+
ob && ob.disconnect();
|
|
1001
1009
|
if (val === true) {
|
|
1002
1010
|
this.setAttribute(shared.hyphenate(key), "");
|
|
1003
1011
|
} else if (typeof val === "string" || typeof val === "number") {
|
|
@@ -1005,6 +1013,7 @@ class VueElement extends BaseClass {
|
|
|
1005
1013
|
} else if (!val) {
|
|
1006
1014
|
this.removeAttribute(shared.hyphenate(key));
|
|
1007
1015
|
}
|
|
1016
|
+
ob && ob.observe(this, { attributes: true });
|
|
1008
1017
|
}
|
|
1009
1018
|
}
|
|
1010
1019
|
}
|
|
@@ -1431,7 +1440,7 @@ const vModelCheckbox = {
|
|
|
1431
1440
|
setChecked(el, binding, vnode);
|
|
1432
1441
|
}
|
|
1433
1442
|
};
|
|
1434
|
-
function setChecked(el, { value }, vnode) {
|
|
1443
|
+
function setChecked(el, { value, oldValue }, vnode) {
|
|
1435
1444
|
el._modelValue = value;
|
|
1436
1445
|
let checked;
|
|
1437
1446
|
if (shared.isArray(value)) {
|
|
@@ -1439,6 +1448,7 @@ function setChecked(el, { value }, vnode) {
|
|
|
1439
1448
|
} else if (shared.isSet(value)) {
|
|
1440
1449
|
checked = value.has(vnode.props.value);
|
|
1441
1450
|
} else {
|
|
1451
|
+
if (value === oldValue) return;
|
|
1442
1452
|
checked = shared.looseEqual(value, getCheckboxValue(el, true));
|
|
1443
1453
|
}
|
|
1444
1454
|
if (el.checked !== checked) {
|
|
@@ -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
|
**/
|
|
@@ -171,7 +171,8 @@ function resolveTransitionProps(rawProps) {
|
|
|
171
171
|
onAppear = onEnter,
|
|
172
172
|
onAppearCancelled = onEnterCancelled
|
|
173
173
|
} = baseProps;
|
|
174
|
-
const finishEnter = (el, isAppear, done) => {
|
|
174
|
+
const finishEnter = (el, isAppear, done, isCancelled) => {
|
|
175
|
+
el._enterCancelled = isCancelled;
|
|
175
176
|
removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
176
177
|
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
177
178
|
done && done();
|
|
@@ -214,8 +215,13 @@ function resolveTransitionProps(rawProps) {
|
|
|
214
215
|
el._isLeaving = true;
|
|
215
216
|
const resolve = () => finishLeave(el, done);
|
|
216
217
|
addTransitionClass(el, leaveFromClass);
|
|
217
|
-
|
|
218
|
-
|
|
218
|
+
if (!el._enterCancelled) {
|
|
219
|
+
forceReflow();
|
|
220
|
+
addTransitionClass(el, leaveActiveClass);
|
|
221
|
+
} else {
|
|
222
|
+
addTransitionClass(el, leaveActiveClass);
|
|
223
|
+
forceReflow();
|
|
224
|
+
}
|
|
219
225
|
nextFrame(() => {
|
|
220
226
|
if (!el._isLeaving) {
|
|
221
227
|
return;
|
|
@@ -229,11 +235,11 @@ function resolveTransitionProps(rawProps) {
|
|
|
229
235
|
callHook(onLeave, [el, resolve]);
|
|
230
236
|
},
|
|
231
237
|
onEnterCancelled(el) {
|
|
232
|
-
finishEnter(el, false);
|
|
238
|
+
finishEnter(el, false, void 0, true);
|
|
233
239
|
callHook(onEnterCancelled, [el]);
|
|
234
240
|
},
|
|
235
241
|
onAppearCancelled(el) {
|
|
236
|
-
finishEnter(el, true);
|
|
242
|
+
finishEnter(el, true, void 0, true);
|
|
237
243
|
callHook(onAppearCancelled, [el]);
|
|
238
244
|
},
|
|
239
245
|
onLeaveCancelled(el) {
|
|
@@ -540,7 +546,7 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = shared.isSpecial
|
|
|
540
546
|
}
|
|
541
547
|
}
|
|
542
548
|
|
|
543
|
-
function patchDOMProp(el, key, value, parentComponent) {
|
|
549
|
+
function patchDOMProp(el, key, value, parentComponent, attrName) {
|
|
544
550
|
if (key === "innerHTML" || key === "textContent") {
|
|
545
551
|
if (value != null) {
|
|
546
552
|
el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
|
|
@@ -582,7 +588,7 @@ function patchDOMProp(el, key, value, parentComponent) {
|
|
|
582
588
|
el[key] = value;
|
|
583
589
|
} catch (e) {
|
|
584
590
|
}
|
|
585
|
-
needRemove && el.removeAttribute(key);
|
|
591
|
+
needRemove && el.removeAttribute(attrName || key);
|
|
586
592
|
}
|
|
587
593
|
|
|
588
594
|
function addEventListener(el, event, handler, options) {
|
|
@@ -682,7 +688,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
|
|
|
682
688
|
// #11081 force set props for possible async custom element
|
|
683
689
|
el._isVueCE && (/[A-Z]/.test(key) || !shared.isString(nextValue))
|
|
684
690
|
) {
|
|
685
|
-
patchDOMProp(el, shared.camelize(key), nextValue);
|
|
691
|
+
patchDOMProp(el, shared.camelize(key), nextValue, parentComponent, key);
|
|
686
692
|
} else {
|
|
687
693
|
if (key === "true-value") {
|
|
688
694
|
el._trueValue = nextValue;
|
|
@@ -953,6 +959,8 @@ class VueElement extends BaseClass {
|
|
|
953
959
|
this._update();
|
|
954
960
|
}
|
|
955
961
|
if (shouldReflect) {
|
|
962
|
+
const ob = this._ob;
|
|
963
|
+
ob && ob.disconnect();
|
|
956
964
|
if (val === true) {
|
|
957
965
|
this.setAttribute(shared.hyphenate(key), "");
|
|
958
966
|
} else if (typeof val === "string" || typeof val === "number") {
|
|
@@ -960,6 +968,7 @@ class VueElement extends BaseClass {
|
|
|
960
968
|
} else if (!val) {
|
|
961
969
|
this.removeAttribute(shared.hyphenate(key));
|
|
962
970
|
}
|
|
971
|
+
ob && ob.observe(this, { attributes: true });
|
|
963
972
|
}
|
|
964
973
|
}
|
|
965
974
|
}
|
|
@@ -1336,7 +1345,7 @@ const vModelCheckbox = {
|
|
|
1336
1345
|
setChecked(el, binding, vnode);
|
|
1337
1346
|
}
|
|
1338
1347
|
};
|
|
1339
|
-
function setChecked(el, { value }, vnode) {
|
|
1348
|
+
function setChecked(el, { value, oldValue }, vnode) {
|
|
1340
1349
|
el._modelValue = value;
|
|
1341
1350
|
let checked;
|
|
1342
1351
|
if (shared.isArray(value)) {
|
|
@@ -1344,6 +1353,7 @@ function setChecked(el, { value }, vnode) {
|
|
|
1344
1353
|
} else if (shared.isSet(value)) {
|
|
1345
1354
|
checked = value.has(vnode.props.value);
|
|
1346
1355
|
} else {
|
|
1356
|
+
if (value === oldValue) return;
|
|
1347
1357
|
checked = shared.looseEqual(value, getCheckboxValue(el, true));
|
|
1348
1358
|
}
|
|
1349
1359
|
if (el.checked !== checked) {
|