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
Create a subclass of the Vue class. Most [instantiation options](/api/options.html) can be used here, with the exception of the `el` option because you can't create multiple ViewModel instances on the same element. Also see [Component System](/guide/components.html).
41
+
Create a "subclass" of the base Vue constructor. All [instantiation options](/api/options.html) can be used here. The special cases to note here are `el` and `data`, which must be functions in this case.
42
+
43
+
Internally, `Vue.extend()` is called on all component options before instantiating the components. For more details regarding components, see [Component System](/guide/components.html).
Configure global settings. This function is overloaded:
44
-
45
-
```js
46
-
// get the `debug` value
47
-
Vue.config('debug') // false
48
-
// set the `debug` value
49
-
Vue.config('debug', true)
50
-
// set multiple options
51
-
Vue.config({
52
-
debug:true,
53
-
prefix:'my'
54
-
})
55
-
```
56
-
57
-
Here are all the options with their default values:
58
-
59
-
```js
60
-
{
61
-
// prefix for directives
62
-
prefix:'v',
63
-
64
-
// log debug info
65
-
debug:false,
66
-
67
-
// suppress warnings
68
-
silent:false,
69
-
70
-
// CSS class attached for entering transition
71
-
enterClass:'v-enter',
72
-
73
-
// CSS class attached for leaving transition
74
-
leaveClass:'v-leave',
75
-
76
-
// Interpolate mustache bindings
77
-
interpolate:true,
78
-
79
-
// Interpolation delimiters
80
-
// default value translates to {{ }} and {{{ }}}
81
-
delimiters: ['{', '}']
82
-
}
83
-
```
84
-
85
70
### Vue.directive( id, [definition] )
86
71
87
72
-**id**`String`
@@ -94,7 +79,7 @@ Register or retrieve a global custom directive. For more details see [Writing Cu
94
79
-**id**`String`
95
80
-**definition**`Function`*optional*
96
81
97
-
Register or retrieve a global custom filter. For more details see [Writing Custom Filters](/guide/filters.html#Writing_a_Custom_Filter).
82
+
Register or retrieve a global custom filter. For more details see [Writing Custom Filters](/guide/custom-filter.html).
98
83
99
84
### Vue.component( id, definition )
100
85
@@ -108,22 +93,22 @@ Register or retrieve a global component. For more details see [Component System]
108
93
-**id**`String`
109
94
-**definition**`Object`*optional*
110
95
111
-
Register or retrieve a global JavaScript transition effect definition. For more details see [Adding Transition Effects](/guide/transitions.html#JavaScript_Functions).
96
+
Register or retrieve a global JavaScript transition effect definition. For more details see the guide for [JavaScript Transitions](/guide/transitions.html#JavaScript_Functions).
112
97
113
98
### Vue.partial( id, definition )
114
99
115
100
-**id**`String`
116
-
-**definition**`String` or `HTMLElement`*optional*
101
+
-**definition**`String | Node`*optional*
117
102
118
-
Register or retrieve a global partial. The definition can be a template string, a querySelector that starts with `#`, or a DOM element (whose innerHTML will be used as the template string.)
103
+
Register or retrieve a global partial. The definition can be a template string, a querySelector that starts with `#`, a DOM element (whose innerHTML will be used as the template string), or a DocumentFragment.
@@ -159,4 +144,8 @@ Vue.js batches view updates and executes them all asynchronously. It uses `reque
159
144
-**plugin**`Object` or `Function`
160
145
-**args...***optional*
161
146
162
-
Mount a Vue.js plugin. If the plugin is an Object, it must have 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. For more details, see [Plugins](/guide/plugin.html).
147
+
Mount a Vue.js plugin. If the plugin is an Object, it must have 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. For more details, see [Plugins](/guide/extending.html#Extend_with_Plugins).
148
+
149
+
### Vue.util
150
+
151
+
Exposes the internal `util` module, which contains a number of utility methods. This is intended for advanced plugin/directive authoring, so you will need to look at the source code to see what's available.
0 commit comments