When properties are used on a custom component class
, these classes will be added to the component's root element. Classes that already exist on this element will not be overwritten.
For example, if you declare this component:
Vue.component('my-component', {
template: '<p class="foo bar">Hi</p>'
})
Then add some classes when using it:
<my-component class="baz boo"></my-component>
HTML will be rendered as:
<p class="foo bar baz boo">Hi</p>