vue 组件 - 函数统一调用(自定义钩子)

vue 组件继承方法

var childComponent = Vue.extend(
    {
        extends: baseComp, // 继承基础组件方法
        template:template,
        waitTimeLeft:0,
        waitTimer:null,
        created:function(){
        },
        methods:{
            baseCompHandel(){ // 父组件统一调用
                alert('baseCompHandel')
            },
        },
        data:function(){}
    }
)

 



posted on 2019-08-23 14:01  童彪  阅读(932)  评论(0编辑  收藏  举报

导航