I’m building a small UI component library, the template for each will be something like the following:
<div class="ui field"> <label> <div> <!-- component internals --> </div> </div>
I know from the docs that non-prop attributes (i.e.
style, etc) will be appended into the root element:
Resulting in something like this:
<div class="ui field foo bar" style="foo: bar"> ... </div>
Is there a way to pass non-prop attributes to any child elements, for example, passing some additional constraints to a child
<input> element, for example?
<div class="ui field"> <label> <div> <input foo="1" bar="2" baz="3"> </div> </div>
The only thing I can think is to have a prop called
attributes into which a string of attributes can be passed, and these are set in
Not very “Vue” but it should work.