# Assets
# directives
Type:
Object
Details:
A hash of directives to be made available to the component instance.
Usage:
const app = createApp({}) app.component('focused-input', { directives: { focus: { mounted(el) { el.focus() } } }, template: `<input v-focus>` })
1
2
3
4
5
6
7
8
9
10
11
12See 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 = createApp({ components: { Foo }, template: `<Foo />` })
1
2
3
4
5
6
7
8
9
10See also: Components