生命周期函数就是Vue实例在某一个时间点会自动执行的函数。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="E:\Code\Vue\assets\js\vue.js"></script>
</head>
<body>
<div id="app">hello world</div>
<script>
var vm =new Vue({
el: '#app',
beforeCreate: function() {
console.log("beforeCreated");
},
created: function() {
console.log("created");
}
})
</script>
</body>
</html>