@vue/runtime-dom 3.2.31 → 3.2.34-beta.1
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 +56 -49
- package/dist/runtime-dom.cjs.prod.js +56 -49
- package/dist/runtime-dom.d.ts +5 -2
- package/dist/runtime-dom.esm-browser.js +1883 -1750
- package/dist/runtime-dom.esm-browser.prod.js +1 -1
- package/dist/runtime-dom.esm-bundler.js +56 -49
- package/dist/runtime-dom.global.js +1883 -1750
- package/dist/runtime-dom.global.prod.js +1 -1
- package/package.json +3 -3
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -7,7 +7,7 @@ var shared = require('@vue/shared');
|
|
|
7
7
|
|
|
8
8
|
const svgNS = 'http://www.w3.org/2000/svg';
|
|
9
9
|
const doc = (typeof document !== 'undefined' ? document : null);
|
|
10
|
-
const templateContainer = doc && doc.createElement('template');
|
|
10
|
+
const templateContainer = doc && /*#__PURE__*/ doc.createElement('template');
|
|
11
11
|
const nodeOps = {
|
|
12
12
|
insert: (child, parent, anchor) => {
|
|
13
13
|
parent.insertBefore(child, anchor || null);
|
|
@@ -158,6 +158,8 @@ function setStyle(style, name, val) {
|
|
|
158
158
|
val.forEach(v => setStyle(style, name, v));
|
|
159
159
|
}
|
|
160
160
|
else {
|
|
161
|
+
if (val == null)
|
|
162
|
+
val = '';
|
|
161
163
|
if (name.startsWith('--')) {
|
|
162
164
|
// custom property definition
|
|
163
165
|
style.setProperty(name, val);
|
|
@@ -252,31 +254,28 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
|
252
254
|
}
|
|
253
255
|
return;
|
|
254
256
|
}
|
|
257
|
+
let needRemove = false;
|
|
255
258
|
if (value === '' || value == null) {
|
|
256
259
|
const type = typeof el[key];
|
|
257
260
|
if (type === 'boolean') {
|
|
258
261
|
// e.g. <select multiple> compiles to { multiple: '' }
|
|
259
|
-
|
|
260
|
-
return;
|
|
262
|
+
value = shared.includeBooleanAttr(value);
|
|
261
263
|
}
|
|
262
264
|
else if (value == null && type === 'string') {
|
|
263
265
|
// e.g. <div :id="null">
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
return;
|
|
266
|
+
value = '';
|
|
267
|
+
needRemove = true;
|
|
267
268
|
}
|
|
268
269
|
else if (type === 'number') {
|
|
269
270
|
// e.g. <img :width="null">
|
|
270
271
|
// the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
catch (_a) { }
|
|
275
|
-
el.removeAttribute(key);
|
|
276
|
-
return;
|
|
272
|
+
value = 0;
|
|
273
|
+
needRemove = true;
|
|
277
274
|
}
|
|
278
275
|
}
|
|
279
|
-
// some properties perform value validation and throw
|
|
276
|
+
// some properties perform value validation and throw,
|
|
277
|
+
// some properties has getter, no setter, will error in 'use strict'
|
|
278
|
+
// eg. <select :type="null"></select> <select :willValidate="null"></select>
|
|
280
279
|
try {
|
|
281
280
|
el[key] = value;
|
|
282
281
|
}
|
|
@@ -286,31 +285,35 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
|
286
285
|
`value ${value} is invalid.`, e);
|
|
287
286
|
}
|
|
288
287
|
}
|
|
288
|
+
needRemove && el.removeAttribute(key);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
// Async edge case fix requires storing an event listener's attach timestamp.
|
|
292
|
-
|
|
293
|
-
let
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
292
|
+
const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => {
|
|
293
|
+
let _getNow = Date.now;
|
|
294
|
+
let skipTimestampCheck = false;
|
|
295
|
+
if (typeof window !== 'undefined') {
|
|
296
|
+
// Determine what event timestamp the browser is using. Annoyingly, the
|
|
297
|
+
// timestamp can either be hi-res (relative to page load) or low-res
|
|
298
|
+
// (relative to UNIX epoch), so in order to compare time we have to use the
|
|
299
|
+
// same timestamp type when saving the flush timestamp.
|
|
300
|
+
if (Date.now() > document.createEvent('Event').timeStamp) {
|
|
301
|
+
// if the low-res timestamp which is bigger than the event timestamp
|
|
302
|
+
// (which is evaluated AFTER) it means the event is using a hi-res timestamp,
|
|
303
|
+
// and we need to use the hi-res version for event listeners as well.
|
|
304
|
+
_getNow = () => performance.now();
|
|
305
|
+
}
|
|
306
|
+
// #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
|
|
307
|
+
// and does not fire microtasks in between event propagation, so safe to exclude.
|
|
308
|
+
const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i);
|
|
309
|
+
skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53);
|
|
310
|
+
}
|
|
311
|
+
return [_getNow, skipTimestampCheck];
|
|
312
|
+
})();
|
|
310
313
|
// To avoid the overhead of repeatedly calling performance.now(), we cache
|
|
311
314
|
// and use the same timestamp for all event listeners attached in the same tick.
|
|
312
315
|
let cachedNow = 0;
|
|
313
|
-
const p = Promise.resolve();
|
|
316
|
+
const p = /*#__PURE__*/ Promise.resolve();
|
|
314
317
|
const reset = () => {
|
|
315
318
|
cachedNow = 0;
|
|
316
319
|
};
|
|
@@ -435,13 +438,13 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
435
438
|
}
|
|
436
439
|
return false;
|
|
437
440
|
}
|
|
438
|
-
//
|
|
439
|
-
//
|
|
440
|
-
//
|
|
441
|
-
//
|
|
441
|
+
// these are enumerated attrs, however their corresponding DOM properties
|
|
442
|
+
// are actually booleans - this leads to setting it with a string "false"
|
|
443
|
+
// value leading it to be coerced to `true`, so we need to always treat
|
|
444
|
+
// them as attributes.
|
|
442
445
|
// Note that `contentEditable` doesn't have this problem: its DOM
|
|
443
446
|
// property is also enumerated string values.
|
|
444
|
-
if (key === 'spellcheck' || key === 'draggable') {
|
|
447
|
+
if (key === 'spellcheck' || key === 'draggable' || key === 'translate') {
|
|
445
448
|
return false;
|
|
446
449
|
}
|
|
447
450
|
// #1787, #2840 form property on form elements is readonly and must be set as
|
|
@@ -464,11 +467,11 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
464
467
|
return key in el;
|
|
465
468
|
}
|
|
466
469
|
|
|
467
|
-
function defineCustomElement(options,
|
|
470
|
+
function defineCustomElement(options, hydrate) {
|
|
468
471
|
const Comp = runtimeCore.defineComponent(options);
|
|
469
472
|
class VueCustomElement extends VueElement {
|
|
470
473
|
constructor(initialProps) {
|
|
471
|
-
super(Comp, initialProps,
|
|
474
|
+
super(Comp, initialProps, hydrate);
|
|
472
475
|
}
|
|
473
476
|
}
|
|
474
477
|
VueCustomElement.def = Comp;
|
|
@@ -778,7 +781,10 @@ function resolveTransitionProps(rawProps) {
|
|
|
778
781
|
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
779
782
|
done && done();
|
|
780
783
|
};
|
|
784
|
+
let isLeaving = false;
|
|
781
785
|
const finishLeave = (el, done) => {
|
|
786
|
+
isLeaving = false;
|
|
787
|
+
removeTransitionClass(el, leaveFromClass);
|
|
782
788
|
removeTransitionClass(el, leaveToClass);
|
|
783
789
|
removeTransitionClass(el, leaveActiveClass);
|
|
784
790
|
done && done();
|
|
@@ -811,12 +817,17 @@ function resolveTransitionProps(rawProps) {
|
|
|
811
817
|
onEnter: makeEnterHook(false),
|
|
812
818
|
onAppear: makeEnterHook(true),
|
|
813
819
|
onLeave(el, done) {
|
|
820
|
+
isLeaving = true;
|
|
814
821
|
const resolve = () => finishLeave(el, done);
|
|
815
822
|
addTransitionClass(el, leaveFromClass);
|
|
816
823
|
// force reflow so *-leave-from classes immediately take effect (#2593)
|
|
817
824
|
forceReflow();
|
|
818
825
|
addTransitionClass(el, leaveActiveClass);
|
|
819
826
|
nextFrame(() => {
|
|
827
|
+
if (!isLeaving) {
|
|
828
|
+
// cancelled
|
|
829
|
+
return;
|
|
830
|
+
}
|
|
820
831
|
removeTransitionClass(el, leaveFromClass);
|
|
821
832
|
addTransitionClass(el, leaveToClass);
|
|
822
833
|
if (!hasExplicitCallback(onLeave)) {
|
|
@@ -1108,7 +1119,8 @@ function hasCSSTransform(el, root, moveClass) {
|
|
|
1108
1119
|
}
|
|
1109
1120
|
|
|
1110
1121
|
const getModelAssigner = (vnode) => {
|
|
1111
|
-
const fn = vnode.props['onUpdate:modelValue']
|
|
1122
|
+
const fn = vnode.props['onUpdate:modelValue'] ||
|
|
1123
|
+
(false );
|
|
1112
1124
|
return shared.isArray(fn) ? value => shared.invokeArrayFns(fn, value) : fn;
|
|
1113
1125
|
};
|
|
1114
1126
|
function onCompositionStart(e) {
|
|
@@ -1118,14 +1130,9 @@ function onCompositionEnd(e) {
|
|
|
1118
1130
|
const target = e.target;
|
|
1119
1131
|
if (target.composing) {
|
|
1120
1132
|
target.composing = false;
|
|
1121
|
-
|
|
1133
|
+
target.dispatchEvent(new Event('input'));
|
|
1122
1134
|
}
|
|
1123
1135
|
}
|
|
1124
|
-
function trigger(el, type) {
|
|
1125
|
-
const e = document.createEvent('HTMLEvents');
|
|
1126
|
-
e.initEvent(type, true, true);
|
|
1127
|
-
el.dispatchEvent(e);
|
|
1128
|
-
}
|
|
1129
1136
|
// We are exporting the v-model runtime directly as vnode hooks so that it can
|
|
1130
1137
|
// be tree-shaken in case v-model is never used.
|
|
1131
1138
|
const vModelText = {
|
|
@@ -1139,7 +1146,7 @@ const vModelText = {
|
|
|
1139
1146
|
if (trim) {
|
|
1140
1147
|
domValue = domValue.trim();
|
|
1141
1148
|
}
|
|
1142
|
-
|
|
1149
|
+
if (castToNumber) {
|
|
1143
1150
|
domValue = shared.toNumber(domValue);
|
|
1144
1151
|
}
|
|
1145
1152
|
el._assign(domValue);
|
|
@@ -1168,7 +1175,7 @@ const vModelText = {
|
|
|
1168
1175
|
// avoid clearing unresolved text. #2302
|
|
1169
1176
|
if (el.composing)
|
|
1170
1177
|
return;
|
|
1171
|
-
if (document.activeElement === el) {
|
|
1178
|
+
if (document.activeElement === el && el.type !== 'range') {
|
|
1172
1179
|
if (lazy) {
|
|
1173
1180
|
return;
|
|
1174
1181
|
}
|
|
@@ -1492,7 +1499,7 @@ function initVShowForSSR() {
|
|
|
1492
1499
|
};
|
|
1493
1500
|
}
|
|
1494
1501
|
|
|
1495
|
-
const rendererOptions = shared.extend({ patchProp }, nodeOps);
|
|
1502
|
+
const rendererOptions = /*#__PURE__*/ shared.extend({ patchProp }, nodeOps);
|
|
1496
1503
|
// lazy create the renderer - this makes core renderer logic tree-shakable
|
|
1497
1504
|
// in case the user only imports reactivity utilities from Vue.
|
|
1498
1505
|
let renderer;
|
|
@@ -7,7 +7,7 @@ var shared = require('@vue/shared');
|
|
|
7
7
|
|
|
8
8
|
const svgNS = 'http://www.w3.org/2000/svg';
|
|
9
9
|
const doc = (typeof document !== 'undefined' ? document : null);
|
|
10
|
-
const templateContainer = doc && doc.createElement('template');
|
|
10
|
+
const templateContainer = doc && /*#__PURE__*/ doc.createElement('template');
|
|
11
11
|
const nodeOps = {
|
|
12
12
|
insert: (child, parent, anchor) => {
|
|
13
13
|
parent.insertBefore(child, anchor || null);
|
|
@@ -158,6 +158,8 @@ function setStyle(style, name, val) {
|
|
|
158
158
|
val.forEach(v => setStyle(style, name, v));
|
|
159
159
|
}
|
|
160
160
|
else {
|
|
161
|
+
if (val == null)
|
|
162
|
+
val = '';
|
|
161
163
|
if (name.startsWith('--')) {
|
|
162
164
|
// custom property definition
|
|
163
165
|
style.setProperty(name, val);
|
|
@@ -252,61 +254,62 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
|
252
254
|
}
|
|
253
255
|
return;
|
|
254
256
|
}
|
|
257
|
+
let needRemove = false;
|
|
255
258
|
if (value === '' || value == null) {
|
|
256
259
|
const type = typeof el[key];
|
|
257
260
|
if (type === 'boolean') {
|
|
258
261
|
// e.g. <select multiple> compiles to { multiple: '' }
|
|
259
|
-
|
|
260
|
-
return;
|
|
262
|
+
value = shared.includeBooleanAttr(value);
|
|
261
263
|
}
|
|
262
264
|
else if (value == null && type === 'string') {
|
|
263
265
|
// e.g. <div :id="null">
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
return;
|
|
266
|
+
value = '';
|
|
267
|
+
needRemove = true;
|
|
267
268
|
}
|
|
268
269
|
else if (type === 'number') {
|
|
269
270
|
// e.g. <img :width="null">
|
|
270
271
|
// the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
catch (_a) { }
|
|
275
|
-
el.removeAttribute(key);
|
|
276
|
-
return;
|
|
272
|
+
value = 0;
|
|
273
|
+
needRemove = true;
|
|
277
274
|
}
|
|
278
275
|
}
|
|
279
|
-
// some properties perform value validation and throw
|
|
276
|
+
// some properties perform value validation and throw,
|
|
277
|
+
// some properties has getter, no setter, will error in 'use strict'
|
|
278
|
+
// eg. <select :type="null"></select> <select :willValidate="null"></select>
|
|
280
279
|
try {
|
|
281
280
|
el[key] = value;
|
|
282
281
|
}
|
|
283
282
|
catch (e) {
|
|
284
283
|
}
|
|
284
|
+
needRemove && el.removeAttribute(key);
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
// Async edge case fix requires storing an event listener's attach timestamp.
|
|
288
|
-
|
|
289
|
-
let
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
288
|
+
const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => {
|
|
289
|
+
let _getNow = Date.now;
|
|
290
|
+
let skipTimestampCheck = false;
|
|
291
|
+
if (typeof window !== 'undefined') {
|
|
292
|
+
// Determine what event timestamp the browser is using. Annoyingly, the
|
|
293
|
+
// timestamp can either be hi-res (relative to page load) or low-res
|
|
294
|
+
// (relative to UNIX epoch), so in order to compare time we have to use the
|
|
295
|
+
// same timestamp type when saving the flush timestamp.
|
|
296
|
+
if (Date.now() > document.createEvent('Event').timeStamp) {
|
|
297
|
+
// if the low-res timestamp which is bigger than the event timestamp
|
|
298
|
+
// (which is evaluated AFTER) it means the event is using a hi-res timestamp,
|
|
299
|
+
// and we need to use the hi-res version for event listeners as well.
|
|
300
|
+
_getNow = () => performance.now();
|
|
301
|
+
}
|
|
302
|
+
// #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
|
|
303
|
+
// and does not fire microtasks in between event propagation, so safe to exclude.
|
|
304
|
+
const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i);
|
|
305
|
+
skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53);
|
|
306
|
+
}
|
|
307
|
+
return [_getNow, skipTimestampCheck];
|
|
308
|
+
})();
|
|
306
309
|
// To avoid the overhead of repeatedly calling performance.now(), we cache
|
|
307
310
|
// and use the same timestamp for all event listeners attached in the same tick.
|
|
308
311
|
let cachedNow = 0;
|
|
309
|
-
const p = Promise.resolve();
|
|
312
|
+
const p = /*#__PURE__*/ Promise.resolve();
|
|
310
313
|
const reset = () => {
|
|
311
314
|
cachedNow = 0;
|
|
312
315
|
};
|
|
@@ -431,13 +434,13 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
431
434
|
}
|
|
432
435
|
return false;
|
|
433
436
|
}
|
|
434
|
-
//
|
|
435
|
-
//
|
|
436
|
-
//
|
|
437
|
-
//
|
|
437
|
+
// these are enumerated attrs, however their corresponding DOM properties
|
|
438
|
+
// are actually booleans - this leads to setting it with a string "false"
|
|
439
|
+
// value leading it to be coerced to `true`, so we need to always treat
|
|
440
|
+
// them as attributes.
|
|
438
441
|
// Note that `contentEditable` doesn't have this problem: its DOM
|
|
439
442
|
// property is also enumerated string values.
|
|
440
|
-
if (key === 'spellcheck' || key === 'draggable') {
|
|
443
|
+
if (key === 'spellcheck' || key === 'draggable' || key === 'translate') {
|
|
441
444
|
return false;
|
|
442
445
|
}
|
|
443
446
|
// #1787, #2840 form property on form elements is readonly and must be set as
|
|
@@ -460,11 +463,11 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
460
463
|
return key in el;
|
|
461
464
|
}
|
|
462
465
|
|
|
463
|
-
function defineCustomElement(options,
|
|
466
|
+
function defineCustomElement(options, hydrate) {
|
|
464
467
|
const Comp = runtimeCore.defineComponent(options);
|
|
465
468
|
class VueCustomElement extends VueElement {
|
|
466
469
|
constructor(initialProps) {
|
|
467
|
-
super(Comp, initialProps,
|
|
470
|
+
super(Comp, initialProps, hydrate);
|
|
468
471
|
}
|
|
469
472
|
}
|
|
470
473
|
VueCustomElement.def = Comp;
|
|
@@ -745,7 +748,10 @@ function resolveTransitionProps(rawProps) {
|
|
|
745
748
|
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
746
749
|
done && done();
|
|
747
750
|
};
|
|
751
|
+
let isLeaving = false;
|
|
748
752
|
const finishLeave = (el, done) => {
|
|
753
|
+
isLeaving = false;
|
|
754
|
+
removeTransitionClass(el, leaveFromClass);
|
|
749
755
|
removeTransitionClass(el, leaveToClass);
|
|
750
756
|
removeTransitionClass(el, leaveActiveClass);
|
|
751
757
|
done && done();
|
|
@@ -778,12 +784,17 @@ function resolveTransitionProps(rawProps) {
|
|
|
778
784
|
onEnter: makeEnterHook(false),
|
|
779
785
|
onAppear: makeEnterHook(true),
|
|
780
786
|
onLeave(el, done) {
|
|
787
|
+
isLeaving = true;
|
|
781
788
|
const resolve = () => finishLeave(el, done);
|
|
782
789
|
addTransitionClass(el, leaveFromClass);
|
|
783
790
|
// force reflow so *-leave-from classes immediately take effect (#2593)
|
|
784
791
|
forceReflow();
|
|
785
792
|
addTransitionClass(el, leaveActiveClass);
|
|
786
793
|
nextFrame(() => {
|
|
794
|
+
if (!isLeaving) {
|
|
795
|
+
// cancelled
|
|
796
|
+
return;
|
|
797
|
+
}
|
|
787
798
|
removeTransitionClass(el, leaveFromClass);
|
|
788
799
|
addTransitionClass(el, leaveToClass);
|
|
789
800
|
if (!hasExplicitCallback(onLeave)) {
|
|
@@ -1061,7 +1072,8 @@ function hasCSSTransform(el, root, moveClass) {
|
|
|
1061
1072
|
}
|
|
1062
1073
|
|
|
1063
1074
|
const getModelAssigner = (vnode) => {
|
|
1064
|
-
const fn = vnode.props['onUpdate:modelValue']
|
|
1075
|
+
const fn = vnode.props['onUpdate:modelValue'] ||
|
|
1076
|
+
(false );
|
|
1065
1077
|
return shared.isArray(fn) ? value => shared.invokeArrayFns(fn, value) : fn;
|
|
1066
1078
|
};
|
|
1067
1079
|
function onCompositionStart(e) {
|
|
@@ -1071,14 +1083,9 @@ function onCompositionEnd(e) {
|
|
|
1071
1083
|
const target = e.target;
|
|
1072
1084
|
if (target.composing) {
|
|
1073
1085
|
target.composing = false;
|
|
1074
|
-
|
|
1086
|
+
target.dispatchEvent(new Event('input'));
|
|
1075
1087
|
}
|
|
1076
1088
|
}
|
|
1077
|
-
function trigger(el, type) {
|
|
1078
|
-
const e = document.createEvent('HTMLEvents');
|
|
1079
|
-
e.initEvent(type, true, true);
|
|
1080
|
-
el.dispatchEvent(e);
|
|
1081
|
-
}
|
|
1082
1089
|
// We are exporting the v-model runtime directly as vnode hooks so that it can
|
|
1083
1090
|
// be tree-shaken in case v-model is never used.
|
|
1084
1091
|
const vModelText = {
|
|
@@ -1092,7 +1099,7 @@ const vModelText = {
|
|
|
1092
1099
|
if (trim) {
|
|
1093
1100
|
domValue = domValue.trim();
|
|
1094
1101
|
}
|
|
1095
|
-
|
|
1102
|
+
if (castToNumber) {
|
|
1096
1103
|
domValue = shared.toNumber(domValue);
|
|
1097
1104
|
}
|
|
1098
1105
|
el._assign(domValue);
|
|
@@ -1121,7 +1128,7 @@ const vModelText = {
|
|
|
1121
1128
|
// avoid clearing unresolved text. #2302
|
|
1122
1129
|
if (el.composing)
|
|
1123
1130
|
return;
|
|
1124
|
-
if (document.activeElement === el) {
|
|
1131
|
+
if (document.activeElement === el && el.type !== 'range') {
|
|
1125
1132
|
if (lazy) {
|
|
1126
1133
|
return;
|
|
1127
1134
|
}
|
|
@@ -1443,7 +1450,7 @@ function initVShowForSSR() {
|
|
|
1443
1450
|
};
|
|
1444
1451
|
}
|
|
1445
1452
|
|
|
1446
|
-
const rendererOptions = shared.extend({ patchProp }, nodeOps);
|
|
1453
|
+
const rendererOptions = /*#__PURE__*/ shared.extend({ patchProp }, nodeOps);
|
|
1447
1454
|
// lazy create the renderer - this makes core renderer logic tree-shakable
|
|
1448
1455
|
// in case the user only imports reactivity utilities from Vue.
|
|
1449
1456
|
let renderer;
|
package/dist/runtime-dom.d.ts
CHANGED
|
@@ -208,6 +208,8 @@ export interface CSSProperties
|
|
|
208
208
|
* For examples and more information, visit:
|
|
209
209
|
* https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors
|
|
210
210
|
*/
|
|
211
|
+
|
|
212
|
+
[v: `--${string}`]: string | number | undefined
|
|
211
213
|
}
|
|
212
214
|
|
|
213
215
|
type Booleanish = boolean | 'true' | 'false'
|
|
@@ -444,7 +446,7 @@ export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
|
|
|
444
446
|
// Non-standard Attributes
|
|
445
447
|
autocapitalize?: string
|
|
446
448
|
autocorrect?: string
|
|
447
|
-
|
|
449
|
+
autosave?: string
|
|
448
450
|
color?: string
|
|
449
451
|
itemprop?: string
|
|
450
452
|
itemscope?: Booleanish
|
|
@@ -625,7 +627,7 @@ export interface InputHTMLAttributes extends HTMLAttributes {
|
|
|
625
627
|
autocomplete?: string
|
|
626
628
|
autofocus?: Booleanish
|
|
627
629
|
capture?: boolean | 'user' | 'environment' // https://www.w3.org/tr/html-media-capture/#the-capture-attribute
|
|
628
|
-
checked?: Booleanish | any[] // for IDE v-model multi-checkbox support
|
|
630
|
+
checked?: Booleanish | any[] | Set<any> // for IDE v-model multi-checkbox support
|
|
629
631
|
crossorigin?: string
|
|
630
632
|
disabled?: Booleanish
|
|
631
633
|
form?: string
|
|
@@ -635,6 +637,7 @@ export interface InputHTMLAttributes extends HTMLAttributes {
|
|
|
635
637
|
formnovalidate?: Booleanish
|
|
636
638
|
formtarget?: string
|
|
637
639
|
height?: Numberish
|
|
640
|
+
indeterminate?: boolean
|
|
638
641
|
list?: string
|
|
639
642
|
max?: Numberish
|
|
640
643
|
maxlength?: Numberish
|