SOURCE

console 命令行工具 X clear

                    
>
console
<div id="box">
    {{msg}}
</div>

<script>
    var vm = new Vue({
        el:'#box',
        data:{
            msg:'well'
        },
        created:function(){
            console.log('实例已经创建');
        },
        beforeCompile:function(){
            console.log('编译之前');
        },
        compiled:function(){
            console.log('编译之后');
        },
        ready:function(){
            console.log('插入到文档中');
        },
        beforeDestroy:function(){
            console.log('销毁之前');
        },
        destroyed:function(){
            console.log('销毁之后');
        }
    });

    /*点击页面销毁vue对象*/
    document.onclick=function(){
        vm.$destroy();
    };
</script>

本项目引用的自定义外部资源