吴学文
2019-07-29 1992e00e12df39dbc0acf1ef037082cbab88d87c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
(function(vc){
 
    vc.extends({
        propTypes: {
           callBackListener:vc.propTypes.string, //父组件名称
           callBackFunction:vc.propTypes.string //父组件监听方法
        },
        data:{
            @@templateCode@@ViewInfo:{
                @@templateCodeColumns@@
            }
        },
         _initMethod:function(){
 
         },
         _initEvent:function(){
 
            vc.on('@@templateCode@@ViewInfo', 'onIndex', function(_index){
                vc.component.@@templateCode@@ViewInfo.index = _index;
            });
        },
        methods:{
            add@@TemplateCode@@Validate(){
                return vc.validate.validate({
                    @@templateCode@@ViewInfo:vc.component.@@templateCode@@ViewInfo
                },{
                    @@addTemplateCodeValidate@@
                });
            },
            save@@TemplateCode@@Info:function(){
                if(!vc.component.@@templateCode@@Validate()){
                    vc.message(vc.validate.errInfo);
 
                    return ;
                }
 
                vc.component.@@templateCode@@ViewInfo.communityId = vc.getCurrentCommunity().communityId;
 
                //侦听回传
            }
        }
    });
 
})(window.vc);