We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cdc142d commit fa5472aCopy full SHA for fa5472a
src/api/options-assets.md
@@ -8,6 +8,22 @@
8
9
A hash of directives to be made available to the component instance.
10
11
+- **Usage:**
12
+ ```js
13
+ const app = Vue.createApp({})
14
+
15
+ app.component('focused-input', {
16
+ directives: {
17
+ focus: {
18
+ mounted(el) {
19
+ el.focus()
20
+ }
21
22
+ },
23
+ template: `<input v-focus>`
24
+ })
25
+ ```
26
27
- **See also:** [Custom Directives](../guide/custom-directive.html)
28
29
## components
@@ -18,4 +34,18 @@
34
35
A hash of components to be made available to the component instance.
36
37
38
39
+ const Foo = {
40
+ template: `<div>Foo</div>`
41
42
43
+ const app = Vue.createApp({
44
+ components: {
45
+ Foo
46
47
+ template: `<Foo />`
48
49
50
51
- **See also:** [Components](../guide/component-basics.html)
0 commit comments