[Vue.js 3.0] API – Assets
# Assets
# directives
-
Type:
Object
-
Details:
A hash of directives to be made available to the component instance.
-
Usage:
const app = Vue.createApp({}) app.component('focused-input', { directives: { focus: { mounted(el) { el.focus() } } }, template: `<input v-focus>` })
-
See also: Custom Directives
# components
-
Type:
Object
-
Details:
A hash of components to be made available to the component instance.
-
Usage:
const Foo = { template: `<div>Foo</div>` } const app = Vue.createApp({ components: { Foo }, template: `<Foo />` })
-
See also: Components