当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript exports.builder_build函数代码示例

本文整理汇总了TypeScript中@core/builder/exports.builder_build函数的典型用法代码示例。如果您正苦于以下问题:TypeScript builder_build函数的具体用法?TypeScript builder_build怎么用?TypeScript builder_build使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了builder_build函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: function

    render: function(node, model, ctx, container, ctr, children){
        var run = expression_eval,
            str = node.expression,
            repeat = str.split('..'),
            start = + run(repeat[0] || '', model, ctx, ctr),
            end = + run(repeat[1] || '', model, ctx, ctr);

        if (start !== start || end !== end) {
            log_error('Repeat attribute(from..to) invalid', str);
            return;
        }

        var nodes = node.nodes;
        var arr = [];
        var i = start - 1;
        while (++i < end) {
            arr.push(compo_init(
                'repeat::item',
                nodes,
                model,
                i,
                container,
                ctr
            ));
        }

        var els = [];
        builder_build(arr, model, ctx, container, ctr, els);
        arr_pushMany(children, els);
    }
开发者ID:atmajs,项目名称:MaskJS,代码行数:30,代码来源:repeat.ts

示例2: function

    render: function(node, model, ctx, container, ctr, children){
        var els = [];
        builder_build(node.nodes, model, ctx, container, ctr, els);
        arr_pushMany(children, els)

        var visible = expression_eval(node.expression, model, ctx, ctr);
        toggle(els, visible);
    }
开发者ID:atmajs,项目名称:MaskJS,代码行数:8,代码来源:visible.ts

示例3: function

    render: function(node, model, ctx, el, ctr, elements){

        var value = expression_eval(node.expression, model, ctx, ctr),
            nodes = getNodes(value, node.nodes, model, ctx, ctr);
        if (nodes == null)
            return;

        builder_build(nodes, model, ctx, el, ctr, elements);
    },
开发者ID:atmajs,项目名称:MaskJS,代码行数:9,代码来源:switch.ts

示例4: build

function build(nodes, array, ctx, container, ctr, elements?) {
    var imax = array.length,
        nodes_ = new Array(imax),
        i = 0, node;
    
    for(; i < imax; i++) {
        node = createEachNode(nodes, i);
        builder_build(node, array[i], ctx, container, ctr, elements);
    }
}
开发者ID:atmajs,项目名称:MaskJS,代码行数:10,代码来源:each.ts

示例5: build

function build(value, For, nodes, model, ctx, container, ctr, childs) {

    builder_build(
        getNodes(nodes, value, For[0], For[1], For[2], For[3]),
        model,
        ctx,
        container,
        ctr,
        childs
    );
}
开发者ID:atmajs,项目名称:MaskJS,代码行数:11,代码来源:for.ts

示例6: compo_renderElements

export function compo_renderElements (nodes, model, ctx, el, ctr, children?){
    if (nodes == null){
        return null;
    }
    var arr = [];
    builder_build(nodes, model, ctx, el, ctr, arr);
    if (is_Array(children)) {
        children.push.apply(children, arr);
    }
    return arr;
};
开发者ID:atmajs,项目名称:MaskJS,代码行数:11,代码来源:compo.ts

示例7: function

    render: function(node, model, ctx, container, ctr, children){

        var array = expression_eval(node.expression, model, ctx, ctr);
        if (array == null)
            return;

        builder_build(
            getNodes(node, array)
            , array
            , ctx
            , container
            , ctr
            , children
        );
    }
开发者ID:atmajs,项目名称:MaskJS,代码行数:15,代码来源:each.ts

示例8: function

    render: function (node, model, ctx, container, ctr, els) {
        var name = attr_first(node.attr);
        var Compo = customTag_get(name, ctr);
        var template;

        if (Compo != null) {
            template = Compo.prototype.template || Compo.prototype.nodes;
            if (template != null) {
                template = mask_merge(template, node.nodes);
            }
        }
        else {
            template = Templates.get(name);
        }
        if (template != null) {
            builder_build(template, model, ctx, container, ctr, els);
        }
    }
开发者ID:atmajs,项目名称:MaskJS,代码行数:18,代码来源:template.ts

示例9: function

	render: function(node, model, ctx, el, ctr, elements){
		var obj = expression_eval(
			node.expression
			, model
			, ctx
			, ctr
		);
		if (obj == null) {
			warn_withNode('Value is undefined', node);
		}
		builder_build(
			node.nodes
			, obj
			, ctx
			, el
			, ctr
			, elements
		);
	}
开发者ID:atmajs,项目名称:MaskJS,代码行数:19,代码来源:with.ts

示例10: function

 progress_: function(ctx, container){
     var nodes = this.progressNodes;
     if (nodes == null) {
         return;
     }
     var hasLiteral = nodes.some(function(x){
         return x.type === Dom.TEXTNODE;
     });
     if (hasLiteral) {
         nodes = jMask('div').append(nodes);
     }
     var node = {
         type: Dom.COMPONENT,
         nodes: nodes,
         controller: new Component,
         attr: {},
     };
     builder_build(node, null, ctx, container, this);
 },
开发者ID:atmajs,项目名称:MaskJS,代码行数:19,代码来源:await.ts


注:本文中的@core/builder/exports.builder_build函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。