Vue生命周期

<template>
<div>
<children></children>
</div>
</template>

<script>
import children from "./Children"
export default {
name: '',
components: { children },
data () {
return {
}
},
beforeCreate() {
console.log("父组件beforeCreate")
},
created() {
console.log("父组件created")
},
beforeMount() {
console.log("父组件beforeMount")
},
mounted() {
console.log("父组件mounted")
},
beforeUpdate() {
console.log("父组件beforeUpdate")
},
updated() {
console.log("父组件updated")
},
beforeDestroy() {
console.log("父组件beforeDestroy")
},
destroyed() {
console.log("父组件destroyed")
},
methods: {}
}
</script>
posted @ 2020-01-16 11:37  小灰灰日记  阅读(108)  评论(0)    收藏  举报