[Vuejs]-Vue 3.0 can mount multiple elements used class name?

0👍

mount() expects its argument to resolve to a single DOM node. It can be either the DOM node itself or a CSS selector – but if multiple nodes match the CSS selector, only the first node will be replaced with the generated Vue instance.

You will need to first register a global Vue component – and then use that component in your template, presumably with v-for directive to define multiple instances of that component.

Leave a comment