vue生命周期钩子函数

vue生命周期钩子函数



beforeCreate: function () {
            console.log('beforeCreate 创建前状态》');
        },
        created: function () {
            console.log('created 创建完毕状态》');
            
        },
        beforeMount: function () {
            console.log('beforeMount 挂载前状态》');
            
        },
        mounted: function () {
            console.log('mounted 挂载结束状态》');
        },
        beforeUpdate: function () {
            console.log('beforeUpdate 更新前状态》');
        //这里指的是页面渲染新数据之前 }, updated: function () { console.log('updated 更新完成状态》'); }, beforeDestroy: function () { console.log('beforeDestroy 销毁前状态》'); }, destroyed: function () { console.log('destroyed 销毁完成状态》'); }