Skip to content

Commit 5509287

Browse files
Options API Reference (#73)
* feat: started with Global Config API * feat: finished global config * feat: added component global api * feat: added directives API * feat: added mixin API * feat: add mount API * feat: added unmount and use * Update src/api/global-api.md Co-Authored-By: Jinjiang <zhaojinjiang@me.com> * Update src/api/global-config.md Co-Authored-By: Jinjiang <zhaojinjiang@me.com> * fixL changed global -> application * fix: fixed types for config * fix: fixed types for API * feat: added a note about native HTML tags * feat: added options data chapter * feat: finished options data * feat: added options-DOM * Added emits to data * feat: added lifecycle hooks * feat: added renderTracked and renderTriggered * feat: added options assets * feat: added options composition * feat: added misc to options * fix: TODO cleanup * fix: changed data description Co-authored-by: Jinjiang <zhaojinjiang@me.com>
1 parent b31cbfc commit 5509287

14 files changed

+1041
-22
lines changed

src/.vuepress/config.js

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,22 @@ const sidebar = {
5454
children: ['writing-guide']
5555
}
5656
],
57-
api: ['/api/application-config', '/api/application-api']
57+
api: [
58+
'/api/application-config',
59+
'/api/application-api',
60+
{
61+
title: 'Options',
62+
collapsable: false,
63+
children: [
64+
'/api/options-data',
65+
'/api/options-dom',
66+
'/api/options-lifecycle-hooks',
67+
'/api/options-assets',
68+
'/api/options-composition',
69+
'/api/options-misc'
70+
]
71+
}
72+
]
5873
}
5974

6075
module.exports = {
@@ -65,22 +80,22 @@ module.exports = {
6580
'link',
6681
{
6782
href: 'https://use.fontawesome.com/releases/v5.13.0/css/all.css',
68-
rel: 'stylesheet',
69-
},
83+
rel: 'stylesheet'
84+
}
7085
],
7186
['link', { rel: 'icon', href: '/logo.png' }],
7287
[
7388
'script',
7489
{
75-
src: 'https://player.vimeo.com/api/player.js',
76-
},
90+
src: 'https://player.vimeo.com/api/player.js'
91+
}
7792
],
7893
[
7994
'script',
8095
{
8196
src: 'https://extend.vimeocdn.com/ga/72160148.js',
82-
defer: 'defer',
83-
},
97+
defer: 'defer'
98+
}
8499
]
85100
],
86101
themeConfig: {

src/api/application-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ app.mount('#my-app')
200200

201201
- **Details:**
202202

203-
This option is used together with [`inject`](TODO:inject) are used together to allow an ancestor component to serve as a dependency injector for all its descendants, regardless of how deep the component hierarchy is, as long as they are in the same parent chain.
203+
This option is [used together with `inject`](../api/options-composition.html#provide-inject) to allow an ancestor component to serve as a dependency injector for all its descendants, regardless of how deep the component hierarchy is, as long as they are in the same parent chain.
204204

205205
The `provide` option should be an object or a function that returns an object. This object contains the properties that are available for injection into its descendants. You can use ES2015 Symbols as keys in this object, but only in environments that natively support `Symbol` and `Reflect.ownKeys`.
206206

src/api/options-assets.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Assets
2+
3+
## directives
4+
5+
- **Type:** `Object`
6+
7+
- **Details:**
8+
9+
A hash of directives to be made available to the Vue instance.
10+
11+
- **See also:** [Custom Directives](../guide/custom-directive.html)
12+
13+
## components
14+
15+
- **Type:** `Object`
16+
17+
- **Details:**
18+
19+
A hash of components to be made available to the Vue instance.
20+
21+
- **See also:** [Components](../guide/component-basics.html)

0 commit comments

Comments
 (0)