vue钩子函数,从创建到销毁的过程
- new Vue() 实例化vue对象
- Init Events & react ivity 初始化事件和生命周期
- brforeCreate 创建实例之前执行的钩子事件
created 实例创建完成后执行的钩子
<div id="app">
{{message}}
</div>
new Vue({
el: "app",
data{
message:"hello,world",
arr:["msg","age","sex"]
},
created(){
console.log(100);
}
})