Vue.component (id, [definición])

Vue.component (id, [definición])

Arguments:
    {string} id
    {Function | Object} [definition]

Usage:

Register or retrieve a global component. Registration also automatically sets the component’s name with the given id.

// register an extended constructor
Vue.component('my-component', Vue.extend({ /* ... */ }))

// register an options object (automatically call Vue.extend)
Vue.component('my-component', { /* ... */ })

// retrieve a registered component (always return constructor)
var MyComponent = Vue.component('my-component')

See also: Components
133 artículos originales publicados · elogiados 189 · 10,000+ vistas

Supongo que te gusta

Origin blog.csdn.net/blog_programb/article/details/105603358
Recomendado
Clasificación