el: spread children parameter
Spreading the children parameter opens up the opportunity for some more flexible and concise code. This can be done currently with an array, but this syntax prevents the need for an array when only one child is added.
```JS
el("p", { class: "lead" }, "text");
el(
"ul",
{},
el("li", {}, "item 1"),
el("li", {}, "item 2"),
el("li", {}, "item 3"),
el("li", {}, "item 4"),
);
```
`.flat()` has been added to prevent this from being a breaking change.
合并状态:未合并 关闭于 2023-04-18 2 条评论