[Vuejs]-Calling function outside vue component

0👍

You can get vue component DOM element by this.$el. So you can do the following:

$(this.$el.querySelector('#tags')).tagsInput();

But remember this is valid as long as your component is not a Fragment Instance i.e. it has a single root HTML tag

Leave a comment