Vue扩展

效果扩展: Vue.transition('transitionName',{beforeEnter:function(){},enter:function(){},afterEnter:function(){},beforeLeave:function(){},leave:function(){},afterLeave:function(){} })组件扩展: var c

效果扩展:

Vue.transition('transitionName',{

    beforeEnter:function(){

    },
    enter:function(){

    },
    afterEnter:function(){

    },
    beforeLeave:function(){

    },
    leave:function(){

    },
    afterLeave:function(){

    }
})

组件扩展:

var componentEle = Vue.extend({

    name:'',
    template:''
})

Vue.component('componentName',{

    el:function(){

    },
    date:function(){

    },
    template:''
})

指令扩展:

Vue.directive('directiveName',{

    bind:function(){

    },
    update:function(newValue,oldValue){

    },
    unbind:function(){

    }
})

Vue.elementDirective('directiveTagName',{

    bind:function(){

    },
    update:function(newValue,oldValue){

    },
    unbind:function(){

    }
})

过滤器扩展

Vue.filter('filterName',{
    //read(默认)不会修改数据模型中的值;
    //只是在把来自数据模型的值显示在视图之前转换它
    read:function(value,arguments){

    },
    // (可选)在写回数据之前格式化值
    write:function(value,oldValue){

    }
})

关键字:vue.js, JavaScript, function, vue