You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The application instance if a `definition` argument was passed
76
+
- The directive definition if a `definition` argument was not passed
77
+
68
78
-**Usage:**
69
79
70
80
Register or retrieve a global directive.
@@ -156,6 +166,10 @@ Apart from `el`, you should treat these arguments as read-only and never modify
156
166
157
167
-`{Object} mixin`
158
168
169
+
-**Returns:**
170
+
171
+
- The application instance
172
+
159
173
-**Usage:**
160
174
161
175
Apply a mixin in the whole application scope. Once registered they can be used in the template of any component within the current application. This can be used by plugin authors to inject custom behavior into components. **Not recommended in application code**.
@@ -169,6 +183,10 @@ Apart from `el`, you should treat these arguments as read-only and never modify
169
183
-`{Element | string} rootContainer`
170
184
-`{boolean} isHydrate`
171
185
186
+
-**Returns:**
187
+
188
+
- The root component instance
189
+
172
190
-**Usage:**
173
191
174
192
Mounts a root component of the application instance on the provided DOM element.
@@ -199,6 +217,10 @@ app.mount('#my-app')
199
217
-`{string | Symbol} key`
200
218
-`value`
201
219
220
+
-**Returns:**
221
+
222
+
- The application instance
223
+
202
224
-**Usage:**
203
225
204
226
Sets a value that can be injected into all components within the application. Components should use `inject` to receive the provided values.
@@ -209,8 +231,6 @@ app.mount('#my-app')
209
231
210
232
Providing values via the application is especially useful when writing plugins, as plugins typically wouldn't be able to provide values using components. It is an alternative to using [globalProperties](application-config.html#globalproperties).
211
233
212
-
Returns the application instance, allowing calls to be chained.
213
-
214
234
:::tip Note
215
235
The `provide` and `inject` bindings are NOT reactive. This is intentional. However, if you pass down an observed object, properties on that object do remain reactive.
Install a Vue.js plugin. If the plugin is an Object, it must expose an `install` method. If it is a function itself, it will be treated as the install method. The install method will be called with Vue as the argument.
0 commit comments