You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -314,6 +337,10 @@ function isStatic(vnode: any): vnode is (VNode & { type: typeof Static })
314
337
315
338
Returns`true`ifthepassedvalueisastaticVNode. StaticVNodesareaspecialkindofVNodeusedtorenderlargequantitiesofstaticHTMLwithoutincurringthecostofcreatinganindividualVNodeforeachelement. Theyaren't returned from slot functions, so in practice they'reunlikelytobeencounteredinthenormalusecasesfor`vue-vnode-utils`.
Copy file name to clipboardExpand all lines: docs/examples.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -184,7 +184,7 @@ In a real use case we'd probably be fine with reusing the same `<div>`, so the `
184
184
<add-slot-ref-example />
185
185
</live-example>
186
186
187
-
Another way we might approach this is using `addProp()`. This could be used to add a `ref` to a single node, like in the previous example, or it could handle the more general case with multiple top-level nodes:
187
+
Another way we might approach this is using `addProps()`. This could be used to add a `ref` to a single node, like in the previous example, or it could handle the more general case with multiple top-level nodes:
Copy file name to clipboardExpand all lines: docs/guide/inserting-new-nodes.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,4 +22,4 @@ The callback will be passed the two VNodes, allowing for conditional logic to de
22
22
23
23
If the callback returns an array then the individual items will be inserted, it won't be treated as a fragment. Nested arrays will be treated as fragments. This is similar to passing children to `h()`. If the number of items being inserted is dynamic then wrapping them in a fragment can be a useful technique to ensure that VNodes get paired up correctly across re-renders. A fragment can also make it easier to assign suitable `key` values, as the children of a fragment are only eligible for pairing with each other.
24
24
25
-
`betweenChildren` takes an optional third argument specifying [iteration options](/api.html#iterationoptions), much like with the [iterators](/guide/iterators.html). Unlike those iterators, the default value for `betweenChildren` is `SKIP_COMMENTS`.
25
+
`betweenChildren()` takes an optional third argument specifying [iteration options](/api.html#iterationoptions), much like with the [iterators](/guide/iterators.html). Unlike those iterators, the default value for `betweenChildren()` is `SKIP_COMMENTS`.
Copy file name to clipboardExpand all lines: docs/guide/introduction.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# What is vue-vnode-utils?
2
2
3
-
`vue-vnode-utils` is a collection of functions that can be used to manipulate Vue VNodes. They are intended to be used inside `render` functions. The most common use case would be manipulating an array of child VNodes returned by a slot:
3
+
`vue-vnode-utils` is a collection of functions that can be used to manipulate Vue VNodes. They are intended to be used inside [`render()`](https://vuejs.org/guide/extras/render-function.html) functions. The most common use case would be manipulating an array of child VNodes returned by a slot:
4
4
5
5
```vue
6
6
<script>
@@ -40,7 +40,7 @@ export default {
40
40
}
41
41
```
42
42
43
-
See it on the SFC Playground: [Composition API](https://sfc.vuejs.org/#eNp1VE2P2jAQ/Suj9ECQ8kWrXlKg3e65VU+9NFUViAHvJrZlO1kQy3/vs0n42gVxGL9588Yz48k+eFAq6VoW5MHULDVXlgyzrZoXgjdKakt70mwV0VI2qrWsogOttGxohKDRifS44XX1CIoUTNiekaTXsMuDkEIspTAWii2oMycffhoPKLesMUCHfGE4ptmcfpR2kzTlNsyi3uYi9ApJV9Yti2iSjcdQmabHMlAADhBTdWkZTkRTLiBJXdzIitWzIvDxRUB2pxiOom0WTOMMbRwzZ5VbWBOYR4XrgjwGtOLd/DtbSc2mqbPPMJIBdtrE8Xe19VLut9+ToMOhp9+Ezh9WlukzOr3pJsBpeqoviILjKOKmVMmTkQIT3bu4oncgcU4ecRhG4c5FsLFWmTxNzWrp5vNkEqnXKaxEozm8YQkzTbzQ8sUwDeEiiAaNb+aZa1szx447gabGreW1T3QWboV6XicYZ3qPjxKNvQWv0lasu04NcgpHx3SsmaiYdnO7X84N9U1JThZjOKCLb5/seTUul2Lz/iLsqayqX1oqc/LfK9uvAtv6sIqtyrZGuLuJX8DwXwQxU0sLpfEwOA2XFnTciR4j7IrbHMf9/RPybn18IPrmZb8mCHh9pT9/XcrLmKWrFm1BxHDv8KwT3SY6XeACgVRdGpPTqNnFXg+FDa7+bcPAag52r7EJR3jbI3xa+kuA4ql+xP1Ebhfa2F3ttjkZkh2vspAak81porZkZM0r+pBl2Rfnakq95iK2UuX0WW17bBu/8MpucvqYZT2o0AEu1gPrmNqnCw7/AWnfumY=) | [Options API](https://sfc.vuejs.org/#eNp1VMmO2zAM/RXCLZAM4C0tenGdtNM5t+ipl7oHJ1ZizVgLJNnjION/LyVvWSZBDuIj+Z5IkT55j1KGTU28xEv1TlFpNhmnTApl4KmkVfEk0OCEG9grwWARRpewTV5kPOOkdUkF2ed1ZeCUcYDdGKWTHoArUot1vk0HKHKTLx/GOEVMrfhoWaqamwQ+93Z3nmhVakOKSYMawvRMNZH9zE0Zsrxdxv5wpnxpSqpDx+7DKn54OBfIOP7TaGoMGkgtq9wQtABSylEZmoCJglTrzHM8mQfmKAmavGZbotBGITRje8pbPK3w2DNc9sNhiBa02fwge6FIGtnzDKMYwpYbKP5tpQOV/Z1OwKFzl8fwq9TN494QNaPp1VMimEZTfZ7v9XMQsFyGz1pwnBHX0WxwoPDU8szDObB25pXGSJ1Ekd7v7HA861CoQ4SnUGFzKCMh0SzYKvGqiULizMN37Dm+6xeqTEVsdNBwbGpQG1o5oZm45vLlgE/GonvxWKI21+CFbEGaS2kMjtDREBUowgui7LvdL+cq9KakcXywi7f78t6ynaCEbtixfqUmR14Uv5WQevLfK/vuHvbXnDdiJ7g2oCth/vzCbA1rcGvw0UIam+Nyv4WY8fYGf/8NTTrL3dmikBYzx+stZz4fMHO9uVnAyUaaKtf4VViwY+C48O69YxjeDhfx4ktQLhc4uAt/knab+t6KanOs7H6GI3evuxUKm5DASragRUUL+BDH8VfrYrk6UB4YIRP4ItsBa4NXWpgygU9xPIASi6X8MEb10k7O6/4DlCPHWQ==)
43
+
See it on the SFC Playground: [Composition API](https://sfc.vuejs.org/#eNp1VMuO2zAM/BXCPcQB/EqLXtw8ut1zi556qYvCiZVE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yRo8ortiEIbhdCM7Clr8LTCY8dw3Q+HIZrTevOTHIQiSWjPE4xiCFtuoPi3lfZU9nc+A4fWXR7Db1I3TwdD1IQmN0+JYBKO9XlLr5sDn2UyeNGC44y4jqa9A4XHlqcezoG1U68wRuo4DPVhb4fjRQdCHUM8BQqbQxkJiGb+Tok3TRQSpx6+Y8fxQ79SZUpio/2aY1P9ytDSCU3EFZevR3wyFj6KxxK1uQWvZHNSX0tjcIiOmihfEZ4TZd/tcTk3oXclDeODXbzfl4+W7QwFtP2OdSs1OrI8/6OE1KP/UdkP97C75rQRe8G1AV0K8/c3ZmtYg1uDzxbS2ByXuw0wY7uFf//7Jl3k7m1RSIuZw/XmE98SMHO9uVvA0UaaMtP4VZixk++48O6dox/eFhfx6ktQzGc4uLPlKO029aMV1eZU2v0MBu5OdycUNiGGlWxAi5Lm8CmKou/WxTJ1pNw3QsbwTTY91vhvNDdFDF+iqAclFkv5cYjqpJ2c174DBlzG3w==)
Copy file name to clipboardExpand all lines: docs/guide/iterators.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ The iterator callback will be passed a fully instantiated VNode, even if the ori
35
35
36
36
Fragment nodes are never passed to the iterator callback. Instead, the iterator will iterate through the children of the fragment. The iterators do not walk the children of any other node type, just fragments. They are only attempting to iterate what would generally be considered the 'top-level' VNodes.
37
37
38
-
The optional third argument for each iterator is an object containing iteration options. The iterators will usually pass all node types to the callback, but the options can be used to restrict iteration to specific types of node. The available node types are `component`, `element`, `text`, `comment` and `static`.
38
+
The optional third argument for each iterator is an object containing [iteration options](/api.html#iterationoptions). The iterators will usually pass all node types to the callback, but the options can be used to restrict iteration to specific types of node. The available node types are `component`, `element`, `text`, `comment` and `static`.
39
39
40
40
So if we only want to iterate over `text` nodes we can pass `{ text:true }` as the third argument.
41
41
@@ -61,7 +61,7 @@ function ChildComponent(_, { slots }) {
61
61
}
62
62
```
63
63
64
-
See it in the SFC Playground: [Composition API](https://sfc.vuejs.org/#eNp9VGFP2zAQ/SunMKmtaJNuXyZlQGFo2qaNbRpI+0AQhMRpTV07sp3Sqep/37OTpqTA1Faqfc/vvTvfeR2clWW4rFgQB0cm07y0ZJitypNE8kWptKU1aZZmli8ZbajQakE94Htt/Ds39g+3sytlU9EAwqizGz4Y4BOZKWksccsWho5b2v51Igkylq1sTL3fLO8NyczUY0xWV1AdduKfNWOyRRSpMM8gHwUMdjkSeTPYWXCRMyFgoj+g4xNau+OF0tTfWSRV1FYHdZj8KnRHcc6xul0Q43sU1bVD1bAArBSpZVgRHd1X1ipJp5ng2fw4CRrtJPBhoktHmGLDgaMaXZ8UqOHoEUUcWVfFBt/S03IEy2D0brms3ba8ngAYXjQQb/1JGAVb1zm5stEGeWwDz0w/Td2XHDxfeM46hv3JSPCt0ahbCET28+lAgmFQt9RokZZoGSXRlL700PcBJBdvLyMJ0IVunQQza0sTR5EpMtfKDyZUehrhX6grafmChcwsRvdaPRqmQZwEvl0cx6mZc20Fc+jRUqqcjSrLhRfaEVeynE/DTC2i1/BRjtz2NzuyOVt2pQGOEFgyPdJM5kwz/b909qDPUto2I6q4P3soYzvLs5eHeE0Yxtn5jIt8SJffvv66Pf95cfHpx9Vli38tdT/ZbOVpclaklbBUVBKjjQbyjOcKIpJJ278dQskIZQ1tmrGqBy5zOOSG9vJhlMszTUIM6GRC1ze+D/ATDGiFewV0vN1szfe3RMNmsj308HAvKTwF9UGNt05LmvV7OV/iyfBPEe3Wd561Zonpzdr/2dwNmlusjUwcvhKAb9UHFJOs6pl27w4uBvdi7F/BTJgZdyPNhB0ShOpK3CuNq43pbbkiowTP6WA8Hn9woUWqp1xibEqEx+Wq2VxhmnI7i+ndeLtZpnnO5bSFQTmBk0YhzeZTDc95TAfFe/fxh15QzrLsiXJNR2NydjwlnhZP2dGrw8HmH3o0IAY=) | [Options API](https://sfc.vuejs.org/#eNp9VG1P2zAQ/iunMKlFNEm3L5MyoDA0bdPGNg2kfS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Te71KBcAuaBr50NoVbTcwMbelhKJBBVGZ/4Chpz2ajvx/gCkMMV4vwMqaloluhMAM3SJNFfdGWADhq5NBqPflIwmoGv5kIFRLQ2cO6jPilLR46qC61eAH3lLd/g61LX/cGfra/8vqakleVRo/U4575TkJjeVVDAupdDGyQBZgamZTpymXnGnMrEMcORCd5aQgQ+cC/w9TPt24QHdGl4YiieAw7vWGCngpOSsXBzlUUgpj5wZ4MIGKPDCglOP9p4c2xM/YH9iYxsU8D09rGLUgoxOBhO+Kz2vI0AMqwLESXlixipvvEZba9j2hX0h6aelcN1Cni+M0EHCzjPlrEs0HRYCLbt6BpBoEvm3Hi+LBt+yFDgHvm3BgOL6zuYRDoo951FtTKOzNNVVaafnXidSzVP8SlQrDFvShOplfKfkg6YKifMovLQ8OtELpgynFh2vhCQ0bg3jLtAjcSuaxTzBAUpfw6cEte1eDsISuhqGRnCKhhVVsaKCUEXV/+TsQJ9J6h4jVnF3KWAZwxLZQA3bsDyQGrdFb6BFWZ/VjJMJXHz7+uvm7Of5+acflxc9/jXpSPJs4VStKA3DB+QYz7rNM76ZYCTNpdGwDaPmJ7G0ONSGz8uZsVyOaZbg6M5mcOWG3f5ximiJfUXotLvskx93RBNAx6NjDz042BG13zmGxVaPR4StcM+Ejdafbx2rZ8ngzcZ9bG/3Qxd9IjOLbznCu+j7kIFo/UxfYzBsDPZFm7+c6qTUtiNhwg4AA/lK3EmFrc3gbbMGLTkjsDedTj+4tVaoORM4Ng2ap806XK5xmoipM3g37S6bghAm5j0MI+eYSYhQlIu5wpxJBnvVe/vjnF6IXJblk8ieDqZg03GUuFoc5SCeN0fbfzO5O9A=)
65
65
66
66
The example uses `SKIP_COMMENTS` to skip over the comment nodes created by the falsy `v-if` conditions.
0 commit comments