mirror of
https://github.com/vuejs/vue.git
synced 2024-11-21 20:28:54 +00:00
ready -> mounted
This commit is contained in:
parent
2021b1f36f
commit
5a5c7eb39d
@ -40,7 +40,7 @@
|
|||||||
Vue.component('select2', {
|
Vue.component('select2', {
|
||||||
props: ['options', 'value'],
|
props: ['options', 'value'],
|
||||||
template: '#select2-template',
|
template: '#select2-template',
|
||||||
ready: function () {
|
mounted: function () {
|
||||||
var vm = this
|
var vm = this
|
||||||
$(this.$el)
|
$(this.$el)
|
||||||
.val(this.value)
|
.val(this.value)
|
||||||
|
@ -46,7 +46,6 @@ export default {
|
|||||||
'created',
|
'created',
|
||||||
'beforeMount',
|
'beforeMount',
|
||||||
'mounted',
|
'mounted',
|
||||||
'ready',
|
|
||||||
'beforeUpdate',
|
'beforeUpdate',
|
||||||
'updated',
|
'updated',
|
||||||
'beforeDestroy',
|
'beforeDestroy',
|
||||||
|
@ -40,12 +40,13 @@ export function lifecycleMixin (Vue) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
callHook(this, 'beforeMount')
|
||||||
this._watcher = new Watcher(this, this._render, this._update)
|
this._watcher = new Watcher(this, this._render, this._update)
|
||||||
this._update(this._watcher.value)
|
this._update(this._watcher.value)
|
||||||
this._mounted = true
|
this._mounted = true
|
||||||
// root instance, call ready on self
|
// root instance, call mounted on self
|
||||||
if (this.$root === this) {
|
if (this.$root === this) {
|
||||||
callHook(this, 'ready')
|
callHook(this, 'mounted')
|
||||||
}
|
}
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ function prepatch (oldVnode, vnode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function insert (vnode) {
|
function insert (vnode) {
|
||||||
callHook(vnode.child, 'ready')
|
callHook(vnode.child, 'mounted')
|
||||||
}
|
}
|
||||||
|
|
||||||
function destroy (vnode) {
|
function destroy (vnode) {
|
||||||
|
Loading…
Reference in New Issue
Block a user