V
V
Vladimir Golub2021-12-03 12:58:46
Vue.js
Vladimir Golub, 2021-12-03 12:58:46

How to create a plugin in vue consisting of a component (Nuxt)?

I want to create a plugin in vue consisting of a component?

My version doesn't work

import Vue from 'vue';

const testComponent = new Vue({
  el: 'TestComponent',
  render: h => h({ template: '<p>111</p>' })
});

Vue.component('TestComponent', testComponent);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Khokhlov, 2021-12-03
@RazerVG

Suddenly, Vue has comprehensive documentation.
https://vuejs.org/v2/guide/components-registration.html
https://vuejs.org/v2/guide/plugins.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question