zoukankan      html  css  js  c++  java
  • vue父子组件生命周期函数执行顺序

    vue父组件加载和销毁执行最后一个钩子函数之前先执行一遍子组件的钩子:

    1.加载

    父:beforecreate-created-beforeMount-(子:beforecreate-created-beforeMount-mounted)-mounted

    2.销毁

    父:beforeDestroy--(子:beforeDestroy-destroyed)-destroyed

    更新和加载销毁不一样,父组件更新不会执行子组件的钩子函数。

    3更新

    3.1父更新

    父:beforeUpdate-updated

    3.2子更新

    父:beforeUpdate-(子beforeUpdate-updated)-updated

  • 相关阅读:
    类数组及其转换
    数组去重
    ios UIView
    ios 解决Wkwebview闪烁问题
    ios Https问题
    UUID
    JavaScript4
    JavaScript2
    JavaScript1
    UIScollView
  • 原文地址:https://www.cnblogs.com/liuboyuan/p/10081460.html
Copyright © 2011-2022 走看看