@vue/runtime-dom 3.2.2 → 3.2.6
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 +3 -3
- package/dist/runtime-dom.cjs.prod.js +3 -3
- package/dist/runtime-dom.d.ts +4 -4
- package/dist/runtime-dom.esm-browser.js +57 -59
- package/dist/runtime-dom.esm-browser.prod.js +1 -1
- package/dist/runtime-dom.esm-bundler.js +4 -4
- package/dist/runtime-dom.global.js +56 -63
- package/dist/runtime-dom.global.prod.js +1 -1
- package/package.json +3 -3
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -197,7 +197,7 @@ function patchAttr(el, key, value, isSVG, instance) {
|
|
|
197
197
|
// note we are only checking boolean attributes that don't have a
|
|
198
198
|
// corresponding dom prop of the same name here.
|
|
199
199
|
const isBoolean = shared.isSpecialBooleanAttr(key);
|
|
200
|
-
if (value == null || (isBoolean && value
|
|
200
|
+
if (value == null || (isBoolean && !shared.includeBooleanAttr(value))) {
|
|
201
201
|
el.removeAttribute(key);
|
|
202
202
|
}
|
|
203
203
|
else {
|
|
@@ -235,9 +235,9 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
|
235
235
|
}
|
|
236
236
|
if (value === '' || value == null) {
|
|
237
237
|
const type = typeof el[key];
|
|
238
|
-
if (
|
|
238
|
+
if (type === 'boolean') {
|
|
239
239
|
// e.g. <select multiple> compiles to { multiple: '' }
|
|
240
|
-
el[key] =
|
|
240
|
+
el[key] = shared.includeBooleanAttr(value);
|
|
241
241
|
return;
|
|
242
242
|
}
|
|
243
243
|
else if (value == null && type === 'string') {
|
|
@@ -197,7 +197,7 @@ function patchAttr(el, key, value, isSVG, instance) {
|
|
|
197
197
|
// note we are only checking boolean attributes that don't have a
|
|
198
198
|
// corresponding dom prop of the same name here.
|
|
199
199
|
const isBoolean = shared.isSpecialBooleanAttr(key);
|
|
200
|
-
if (value == null || (isBoolean && value
|
|
200
|
+
if (value == null || (isBoolean && !shared.includeBooleanAttr(value))) {
|
|
201
201
|
el.removeAttribute(key);
|
|
202
202
|
}
|
|
203
203
|
else {
|
|
@@ -235,9 +235,9 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
|
235
235
|
}
|
|
236
236
|
if (value === '' || value == null) {
|
|
237
237
|
const type = typeof el[key];
|
|
238
|
-
if (
|
|
238
|
+
if (type === 'boolean') {
|
|
239
239
|
// e.g. <select multiple> compiles to { multiple: '' }
|
|
240
|
-
el[key] =
|
|
240
|
+
el[key] = shared.includeBooleanAttr(value);
|
|
241
241
|
return;
|
|
242
242
|
}
|
|
243
243
|
else if (value == null && type === 'string') {
|
package/dist/runtime-dom.d.ts
CHANGED
|
@@ -396,7 +396,7 @@ interface AriaAttributes {
|
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
// Vue's style normalization supports nested arrays
|
|
399
|
-
type StyleValue = string | CSSProperties | Array<StyleValue>
|
|
399
|
+
export type StyleValue = string | CSSProperties | Array<StyleValue>
|
|
400
400
|
|
|
401
401
|
export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
|
|
402
402
|
innerHTML?: string
|
|
@@ -619,7 +619,7 @@ export interface InputHTMLAttributes extends HTMLAttributes {
|
|
|
619
619
|
autocomplete?: string
|
|
620
620
|
autofocus?: Booleanish
|
|
621
621
|
capture?: boolean | 'user' | 'environment' // https://www.w3.org/tr/html-media-capture/#the-capture-attribute
|
|
622
|
-
checked?: Booleanish
|
|
622
|
+
checked?: Booleanish | any[] // for IDE v-model multi-checkbox support
|
|
623
623
|
crossorigin?: string
|
|
624
624
|
disabled?: Booleanish
|
|
625
625
|
form?: string
|
|
@@ -644,7 +644,7 @@ export interface InputHTMLAttributes extends HTMLAttributes {
|
|
|
644
644
|
src?: string
|
|
645
645
|
step?: Numberish
|
|
646
646
|
type?: string
|
|
647
|
-
value?:
|
|
647
|
+
value?: any // we support :value to be bound to anything w/ v-model
|
|
648
648
|
width?: Numberish
|
|
649
649
|
}
|
|
650
650
|
|
|
@@ -1473,7 +1473,7 @@ type ReservedProps = {
|
|
|
1473
1473
|
ref?:
|
|
1474
1474
|
| string
|
|
1475
1475
|
| RuntimeCore.Ref
|
|
1476
|
-
| ((ref: Element | RuntimeCore.
|
|
1476
|
+
| ((ref: Element | RuntimeCore.ComponentPublicInstance | null) => void)
|
|
1477
1477
|
}
|
|
1478
1478
|
|
|
1479
1479
|
type ElementAttrs<T> = T & ReservedProps
|
|
@@ -31,7 +31,14 @@ const isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED);
|
|
|
31
31
|
* - readonly -> readOnly
|
|
32
32
|
*/
|
|
33
33
|
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
34
|
-
const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs);
|
|
34
|
+
const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs);
|
|
35
|
+
/**
|
|
36
|
+
* Boolean attributes should be included if the value is truthy or ''.
|
|
37
|
+
* e.g. <select multiple> compiles to { multiple: '' }
|
|
38
|
+
*/
|
|
39
|
+
function includeBooleanAttr(value) {
|
|
40
|
+
return !!value || value === '';
|
|
41
|
+
}
|
|
35
42
|
|
|
36
43
|
function normalizeStyle(value) {
|
|
37
44
|
if (isArray(value)) {
|
|
@@ -185,7 +192,9 @@ function looseIndexOf(arr, val) {
|
|
|
185
192
|
const toDisplayString = (val) => {
|
|
186
193
|
return val == null
|
|
187
194
|
? ''
|
|
188
|
-
: isArray(val) ||
|
|
195
|
+
: isArray(val) ||
|
|
196
|
+
(isObject(val) &&
|
|
197
|
+
(val.toString === objectToString || !isFunction(val.toString)))
|
|
189
198
|
? JSON.stringify(val, replacer, 2)
|
|
190
199
|
: String(val);
|
|
191
200
|
};
|
|
@@ -401,7 +410,7 @@ function onScopeDispose(fn) {
|
|
|
401
410
|
activeEffectScope.cleanups.push(fn);
|
|
402
411
|
}
|
|
403
412
|
else {
|
|
404
|
-
warn(`
|
|
413
|
+
warn(`onScopeDispose() is called when there is no active effect scope` +
|
|
405
414
|
` to be associated with.`);
|
|
406
415
|
}
|
|
407
416
|
}
|
|
@@ -1268,13 +1277,13 @@ function isRef(r) {
|
|
|
1268
1277
|
return Boolean(r && r.__v_isRef === true);
|
|
1269
1278
|
}
|
|
1270
1279
|
function ref(value) {
|
|
1271
|
-
return createRef(value);
|
|
1280
|
+
return createRef(value, false);
|
|
1272
1281
|
}
|
|
1273
1282
|
function shallowRef(value) {
|
|
1274
1283
|
return createRef(value, true);
|
|
1275
1284
|
}
|
|
1276
1285
|
class RefImpl {
|
|
1277
|
-
constructor(value, _shallow
|
|
1286
|
+
constructor(value, _shallow) {
|
|
1278
1287
|
this._shallow = _shallow;
|
|
1279
1288
|
this.dep = undefined;
|
|
1280
1289
|
this.__v_isRef = true;
|
|
@@ -1294,7 +1303,7 @@ class RefImpl {
|
|
|
1294
1303
|
}
|
|
1295
1304
|
}
|
|
1296
1305
|
}
|
|
1297
|
-
function createRef(rawValue, shallow
|
|
1306
|
+
function createRef(rawValue, shallow) {
|
|
1298
1307
|
if (isRef(rawValue)) {
|
|
1299
1308
|
return rawValue;
|
|
1300
1309
|
}
|
|
@@ -1366,9 +1375,8 @@ class ObjectRefImpl {
|
|
|
1366
1375
|
}
|
|
1367
1376
|
}
|
|
1368
1377
|
function toRef(object, key) {
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
: new ObjectRefImpl(object, key);
|
|
1378
|
+
const val = object[key];
|
|
1379
|
+
return isRef(val) ? val : new ObjectRefImpl(object, key);
|
|
1372
1380
|
}
|
|
1373
1381
|
|
|
1374
1382
|
class ComputedRefImpl {
|
|
@@ -2214,8 +2222,7 @@ function renderComponentRoot(instance) {
|
|
|
2214
2222
|
const keys = Object.keys(fallthroughAttrs);
|
|
2215
2223
|
const { shapeFlag } = root;
|
|
2216
2224
|
if (keys.length) {
|
|
2217
|
-
if (shapeFlag & 1 /* ELEMENT */
|
|
2218
|
-
shapeFlag & 6 /* COMPONENT */) {
|
|
2225
|
+
if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) {
|
|
2219
2226
|
if (propsOptions && keys.some(isModelListener)) {
|
|
2220
2227
|
// If a v-model listener (onUpdate:xxx) has a corresponding declared
|
|
2221
2228
|
// prop, it indicates this component expects to handle v-model and
|
|
@@ -2263,8 +2270,7 @@ function renderComponentRoot(instance) {
|
|
|
2263
2270
|
if (false &&
|
|
2264
2271
|
isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */, instance) &&
|
|
2265
2272
|
vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ &&
|
|
2266
|
-
|
|
2267
|
-
root.shapeFlag & 6 /* COMPONENT */)) ;
|
|
2273
|
+
root.shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) ;
|
|
2268
2274
|
// inherit directives
|
|
2269
2275
|
if (vnode.dirs) {
|
|
2270
2276
|
if (true && !isElementRoot(root)) {
|
|
@@ -2365,8 +2371,7 @@ const filterModelListeners = (attrs, props) => {
|
|
|
2365
2371
|
return res;
|
|
2366
2372
|
};
|
|
2367
2373
|
const isElementRoot = (vnode) => {
|
|
2368
|
-
return (vnode.shapeFlag & 6 /* COMPONENT */ ||
|
|
2369
|
-
vnode.shapeFlag & 1 /* ELEMENT */ ||
|
|
2374
|
+
return (vnode.shapeFlag & (6 /* COMPONENT */ | 1 /* ELEMENT */) ||
|
|
2370
2375
|
vnode.type === Comment$1 // potential v-if branch switch
|
|
2371
2376
|
);
|
|
2372
2377
|
};
|
|
@@ -4574,13 +4579,13 @@ const normalizeSlotValue = (value) => isArray(value)
|
|
|
4574
4579
|
? value.map(normalizeVNode)
|
|
4575
4580
|
: [normalizeVNode(value)];
|
|
4576
4581
|
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
4577
|
-
const normalized = withCtx((
|
|
4582
|
+
const normalized = withCtx((...args) => {
|
|
4578
4583
|
if (currentInstance) {
|
|
4579
4584
|
warn$1(`Slot "${key}" invoked outside of the render function: ` +
|
|
4580
4585
|
`this will not track dependencies used in the slot. ` +
|
|
4581
4586
|
`Invoke the slot function inside the render function instead.`);
|
|
4582
4587
|
}
|
|
4583
|
-
return normalizeSlotValue(rawSlot(
|
|
4588
|
+
return normalizeSlotValue(rawSlot(...args));
|
|
4584
4589
|
}, ctx);
|
|
4585
4590
|
normalized._c = false;
|
|
4586
4591
|
return normalized;
|
|
@@ -5092,8 +5097,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
5092
5097
|
if (props) {
|
|
5093
5098
|
if (forcePatchValue ||
|
|
5094
5099
|
!optimized ||
|
|
5095
|
-
patchFlag & 16 /* FULL_PROPS */
|
|
5096
|
-
patchFlag & 32 /* HYDRATE_EVENTS */) {
|
|
5100
|
+
patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) {
|
|
5097
5101
|
for (const key in props) {
|
|
5098
5102
|
if ((forcePatchValue && key.endsWith('value')) ||
|
|
5099
5103
|
(isOn(key) && !isReservedProp(key))) {
|
|
@@ -5572,6 +5576,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5572
5576
|
optimized = false;
|
|
5573
5577
|
dynamicChildren = null;
|
|
5574
5578
|
}
|
|
5579
|
+
const areChildrenSVG = isSVG && n2.type !== 'foreignObject';
|
|
5580
|
+
if (dynamicChildren) {
|
|
5581
|
+
patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds);
|
|
5582
|
+
if (parentComponent && parentComponent.type.__hmrId) {
|
|
5583
|
+
traverseStaticChildren(n1, n2);
|
|
5584
|
+
}
|
|
5585
|
+
}
|
|
5586
|
+
else if (!optimized) {
|
|
5587
|
+
// full diff
|
|
5588
|
+
patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false);
|
|
5589
|
+
}
|
|
5575
5590
|
if (patchFlag > 0) {
|
|
5576
5591
|
// the presence of a patchFlag means this element's render code was
|
|
5577
5592
|
// generated by the compiler and can take the fast path.
|
|
@@ -5626,17 +5641,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5626
5641
|
// unoptimized, full diff
|
|
5627
5642
|
patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG);
|
|
5628
5643
|
}
|
|
5629
|
-
const areChildrenSVG = isSVG && n2.type !== 'foreignObject';
|
|
5630
|
-
if (dynamicChildren) {
|
|
5631
|
-
patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds);
|
|
5632
|
-
if (parentComponent && parentComponent.type.__hmrId) {
|
|
5633
|
-
traverseStaticChildren(n1, n2);
|
|
5634
|
-
}
|
|
5635
|
-
}
|
|
5636
|
-
else if (!optimized) {
|
|
5637
|
-
// full diff
|
|
5638
|
-
patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false);
|
|
5639
|
-
}
|
|
5640
5644
|
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
|
|
5641
5645
|
queuePostRenderEffect(() => {
|
|
5642
5646
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
@@ -5661,8 +5665,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5661
5665
|
// which also requires the correct parent container
|
|
5662
5666
|
!isSameVNodeType(oldVNode, newVNode) ||
|
|
5663
5667
|
// - In the case of a component, it could contain anything.
|
|
5664
|
-
oldVNode.shapeFlag & 6 /* COMPONENT */
|
|
5665
|
-
oldVNode.shapeFlag & 64 /* TELEPORT */)
|
|
5668
|
+
oldVNode.shapeFlag & (6 /* COMPONENT */ | 64 /* TELEPORT */))
|
|
5666
5669
|
? hostParentNode(oldVNode.el)
|
|
5667
5670
|
: // In other cases, the parent container is not actually used so we
|
|
5668
5671
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
@@ -5845,13 +5848,15 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5845
5848
|
let vnodeHook;
|
|
5846
5849
|
const { el, props } = initialVNode;
|
|
5847
5850
|
const { bm, m, parent } = instance;
|
|
5851
|
+
const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
|
|
5848
5852
|
effect.allowRecurse = false;
|
|
5849
5853
|
// beforeMount hook
|
|
5850
5854
|
if (bm) {
|
|
5851
5855
|
invokeArrayFns(bm);
|
|
5852
5856
|
}
|
|
5853
5857
|
// onVnodeBeforeMount
|
|
5854
|
-
if (
|
|
5858
|
+
if (!isAsyncWrapperVNode &&
|
|
5859
|
+
(vnodeHook = props && props.onVnodeBeforeMount)) {
|
|
5855
5860
|
invokeVNodeHook(vnodeHook, parent, initialVNode);
|
|
5856
5861
|
}
|
|
5857
5862
|
effect.allowRecurse = true;
|
|
@@ -5873,7 +5878,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5873
5878
|
endMeasure(instance, `hydrate`);
|
|
5874
5879
|
}
|
|
5875
5880
|
};
|
|
5876
|
-
if (
|
|
5881
|
+
if (isAsyncWrapperVNode) {
|
|
5877
5882
|
initialVNode.type.__asyncLoader().then(
|
|
5878
5883
|
// note: we are moving the render call into an async callback,
|
|
5879
5884
|
// which means it won't track dependencies - but it's ok because
|
|
@@ -5907,7 +5912,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5907
5912
|
queuePostRenderEffect(m, parentSuspense);
|
|
5908
5913
|
}
|
|
5909
5914
|
// onVnodeMounted
|
|
5910
|
-
if (
|
|
5915
|
+
if (!isAsyncWrapperVNode &&
|
|
5916
|
+
(vnodeHook = props && props.onVnodeMounted)) {
|
|
5911
5917
|
const scopedInitialVNode = initialVNode;
|
|
5912
5918
|
queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense);
|
|
5913
5919
|
}
|
|
@@ -5934,6 +5940,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5934
5940
|
{
|
|
5935
5941
|
pushWarningContext(next || instance.vnode);
|
|
5936
5942
|
}
|
|
5943
|
+
// Disallow component effect recursion during pre-lifecycle hooks.
|
|
5944
|
+
effect.allowRecurse = false;
|
|
5937
5945
|
if (next) {
|
|
5938
5946
|
next.el = vnode.el;
|
|
5939
5947
|
updateComponentPreRender(instance, next, optimized);
|
|
@@ -5941,8 +5949,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5941
5949
|
else {
|
|
5942
5950
|
next = vnode;
|
|
5943
5951
|
}
|
|
5944
|
-
// Disallow component effect recursion during pre-lifecycle hooks.
|
|
5945
|
-
effect.allowRecurse = false;
|
|
5946
5952
|
// beforeUpdate hook
|
|
5947
5953
|
if (bu) {
|
|
5948
5954
|
invokeArrayFns(bu);
|
|
@@ -6345,8 +6351,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6345
6351
|
return;
|
|
6346
6352
|
}
|
|
6347
6353
|
const shouldInvokeDirs = shapeFlag & 1 /* ELEMENT */ && dirs;
|
|
6354
|
+
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
6348
6355
|
let vnodeHook;
|
|
6349
|
-
if (
|
|
6356
|
+
if (shouldInvokeVnodeHook &&
|
|
6357
|
+
(vnodeHook = props && props.onVnodeBeforeUnmount)) {
|
|
6350
6358
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
6351
6359
|
}
|
|
6352
6360
|
if (shapeFlag & 6 /* COMPONENT */) {
|
|
@@ -6371,8 +6379,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6371
6379
|
unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
6372
6380
|
}
|
|
6373
6381
|
else if ((type === Fragment &&
|
|
6374
|
-
|
|
6375
|
-
|
|
6382
|
+
patchFlag &
|
|
6383
|
+
(128 /* KEYED_FRAGMENT */ | 256 /* UNKEYED_FRAGMENT */)) ||
|
|
6376
6384
|
(!optimized && shapeFlag & 16 /* ARRAY_CHILDREN */)) {
|
|
6377
6385
|
unmountChildren(children, parentComponent, parentSuspense);
|
|
6378
6386
|
}
|
|
@@ -6380,7 +6388,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6380
6388
|
remove(vnode);
|
|
6381
6389
|
}
|
|
6382
6390
|
}
|
|
6383
|
-
if ((
|
|
6391
|
+
if ((shouldInvokeVnodeHook &&
|
|
6392
|
+
(vnodeHook = props && props.onVnodeUnmounted)) ||
|
|
6393
|
+
shouldInvokeDirs) {
|
|
6384
6394
|
queuePostRenderEffect(() => {
|
|
6385
6395
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
6386
6396
|
shouldInvokeDirs &&
|
|
@@ -7324,7 +7334,7 @@ function normalizeChildren(vnode, children) {
|
|
|
7324
7334
|
type = 16 /* ARRAY_CHILDREN */;
|
|
7325
7335
|
}
|
|
7326
7336
|
else if (typeof children === 'object') {
|
|
7327
|
-
if (shapeFlag & 1 /* ELEMENT */
|
|
7337
|
+
if (shapeFlag & (1 /* ELEMENT */ | 64 /* TELEPORT */)) {
|
|
7328
7338
|
// Normalize slot to plain children for plain element and Teleport
|
|
7329
7339
|
const slot = children.default;
|
|
7330
7340
|
if (slot) {
|
|
@@ -9217,20 +9227,8 @@ function isMemoSame(cached, memo) {
|
|
|
9217
9227
|
return true;
|
|
9218
9228
|
}
|
|
9219
9229
|
|
|
9220
|
-
function $ref() { }
|
|
9221
|
-
function $shallowRef(arg) {
|
|
9222
|
-
return arg;
|
|
9223
|
-
}
|
|
9224
|
-
function $computed() { }
|
|
9225
|
-
function $fromRefs() {
|
|
9226
|
-
return null;
|
|
9227
|
-
}
|
|
9228
|
-
function $raw() {
|
|
9229
|
-
return null;
|
|
9230
|
-
}
|
|
9231
|
-
|
|
9232
9230
|
// Core API ------------------------------------------------------------------
|
|
9233
|
-
const version = "3.2.
|
|
9231
|
+
const version = "3.2.6";
|
|
9234
9232
|
/**
|
|
9235
9233
|
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
|
9236
9234
|
* @internal
|
|
@@ -9437,7 +9435,7 @@ function patchAttr(el, key, value, isSVG, instance) {
|
|
|
9437
9435
|
// note we are only checking boolean attributes that don't have a
|
|
9438
9436
|
// corresponding dom prop of the same name here.
|
|
9439
9437
|
const isBoolean = isSpecialBooleanAttr(key);
|
|
9440
|
-
if (value == null || (isBoolean && value
|
|
9438
|
+
if (value == null || (isBoolean && !includeBooleanAttr(value))) {
|
|
9441
9439
|
el.removeAttribute(key);
|
|
9442
9440
|
}
|
|
9443
9441
|
else {
|
|
@@ -9475,9 +9473,9 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
|
9475
9473
|
}
|
|
9476
9474
|
if (value === '' || value == null) {
|
|
9477
9475
|
const type = typeof el[key];
|
|
9478
|
-
if (
|
|
9476
|
+
if (type === 'boolean') {
|
|
9479
9477
|
// e.g. <select multiple> compiles to { multiple: '' }
|
|
9480
|
-
el[key] =
|
|
9478
|
+
el[key] = includeBooleanAttr(value);
|
|
9481
9479
|
return;
|
|
9482
9480
|
}
|
|
9483
9481
|
else if (value == null && type === 'string') {
|
|
@@ -10831,4 +10829,4 @@ function normalizeContainer(container) {
|
|
|
10831
10829
|
return container;
|
|
10832
10830
|
}
|
|
10833
10831
|
|
|
10834
|
-
export {
|
|
10832
|
+
export { BaseTransition, Comment$1 as Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn$1 as warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|