We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
子组件总是会先于父组件挂载。 一个拥有子组件的组件的生命周期如下 父组件beforeCreate => 父组件Created =>父组件beforeMount=> 子组件beforeCreate => 子组件Created => 子组件beforeMount => 子组件Mounted => 父组件Mounted
父组件beforeCreate
父组件Created
父组件beforeMount
子组件beforeCreate
子组件Created
子组件beforeMount
子组件Mounted
父组件Mounted
需要注意,父组件的mounted不会承诺所有的子组件也都一起被挂载。所以如果需要视图完全渲染完毕,可以用vm.$nextTick来代替mounted
mounted
vm.$nextTick
The text was updated successfully, but these errors were encountered:
No branches or pull requests
子组件总是会先于父组件挂载。
一个拥有子组件的组件的生命周期如下
父组件beforeCreate
=>父组件Created
=>父组件beforeMount
=>子组件beforeCreate
=>子组件Created
=>子组件beforeMount
=>子组件Mounted
=>父组件Mounted
需要注意,父组件的
mounted
不会承诺所有的子组件也都一起被挂载。所以如果需要视图完全渲染完毕,可以用vm.$nextTick
来代替mounted
The text was updated successfully, but these errors were encountered: