• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript fn.fn_proxy函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: _compo_initAndBind

export function _compo_initAndBind(
    compo,
    node,
    model,
    ctx,
    container,
    controller
) {
    compo.parent = controller;
    compo.model = model;
    compo.ctx = ctx;
    compo.refresh = fn_proxy(compo.refresh, compo);
    compo.binder = expression_createBinder(
        compo.expr || compo.expression,
        model,
        ctx,
        controller,
        compo.refresh
    );
    expression_bind(
        compo.expr || compo.expression,
        model,
        ctx,
        controller,
        compo.binder
    );
}
开发者ID:atmajs,项目名称:MaskJS,代码行数:27,代码来源:utils.ts


示例2: initialize

	function initialize(compo, node, index, elements, model, ctx, container, ctr) {

		compo.ctx = ctx;
		compo.expr = node.expression;
		compo.model = model;
		compo.controller = ctr;
		compo.index = index;
		compo.nodes = node.nodes;

		compo.refresh = fn_proxy(compo.refresh, compo);
		compo.binder = expression_createBinder(
			compo.expr,
			model,
			ctx,
			ctr,
			compo.refresh
		);

		compo.Switch = new Array(node.nodes.length);

		if (index != null) {
			compo.Switch[index] = elements;
		}
		expression_bind(node.expression, model, ctx, ctr, compo.binder);

		return compo;
	}
开发者ID:atmajs,项目名称:MaskJS,代码行数:27,代码来源:switch.ts


示例3: function

		renderEnd: function(els, model_, ctx, container, ctr){
			var model = this.rootModel || model_,
				compo = new WithStatement(this);

			compo.elements = els;
			compo.model = model;
			compo.parent = ctr;
			compo.refresh = fn_proxy(compo.refresh, compo);
			compo.binder = expression_createBinder(
				compo.expr,
				model,
				ctx,
				ctr,
				compo.refresh
			);
			expression_bind(
				compo.expr,
				model,
				ctx,
				ctr,
				compo.binder
			);
			_renderPlaceholder(this, compo, container);
			return compo;
		}
开发者ID:atmajs,项目名称:MaskJS,代码行数:25,代码来源:with.ts


示例4: initialize

function initialize(compo, node, index, elements, model, ctx, container, ctr) {

    compo.model = model;
    compo.ctx = ctx;
    compo.controller = ctr;
    compo.refresh = fn_proxy(compo.refresh, compo);
    compo.binder = expression_createListener(compo.refresh);
    compo.index = index;
    compo.Switch = [{
        node: node,
        elements: null
    }];

    expression_bind(node.expression, model, ctx, ctr, compo.binder);

    while (true) {
        node = node.nextSibling;
        if (node == null || node.tagName !== 'else')
            break;

        compo.Switch.push({
            node: node,
            elements: null
        });

        if (node.expression)
            expression_bind(node.expression, model, ctx, ctr, compo.binder);
    }
    if (index != null) {
        compo.Switch[index].elements = elements;
    }
    return compo;
}
开发者ID:atmajs,项目名称:MaskJS,代码行数:33,代码来源:if.ts


示例5: function

    renderEnd: function(els, model, ctx, container, ctr){
        _renderPlaceholder(this, this, container);

        var fn = Boolean(this.attr.animatable)
            ? this.refreshAni
            : this.refreshSync;

        this.refresh = fn_proxy(fn, this);
        this.elements = els;

        var Ctor = this.getBinder();
        this.binder = new Ctor(this.expression, model, this);
        this.binder.bind(this.refresh);
    },
开发者ID:atmajs,项目名称:MaskJS,代码行数:14,代码来源:listen.ts


示例6: initialize

function initialize(compo, node, els, model, ctx, container, ctr) {
    
    compo.parent = ctr;
    compo.model = model;
    
    compo.refresh = fn_proxy(compo.refresh, compo);
    compo.binder = expression_createBinder(
        compo.expr,
        model,
        ctx,
        ctr,
        compo.refresh
    );
    
    
    expression_bind(compo.expr, model, ctx, ctr, compo.binder);
    
}
开发者ID:atmajs,项目名称:MaskJS,代码行数:18,代码来源:for.ts


示例7: function

	on: function(component, events, $element?) {
		if ($element == null) {
			$element = component.$;
		}

		var isarray = events instanceof Array,
			length = isarray ? events.length : 1;

		for (var i = 0, x; isarray ? i < length : i < 1; i++) {
			x = isarray ? events[i] : events;

			if (x instanceof Array) {
				// generic jQuery .on Arguments

				if (EventDecorator != null) {
					x[0] = EventDecorator(x[0]);
				}

				$element.on.apply($element, x);
				continue;
			}


			for (var key in x) {
				var fn = typeof x[key] === 'string' ? component[x[key]] : x[key],
					semicolon = key.indexOf(':'),
					type,
					selector;

				if (semicolon !== -1) {
					type = key.substring(0, semicolon);
					selector = key.substring(semicolon + 1).trim();
				} else {
					type = key;
				}

				if (EventDecorator != null) {
					type = EventDecorator(type);
				}

				domLib_on($element, type, selector, fn_proxy(fn, component));
			}
		}
    },
开发者ID:atmajs,项目名称:MaskJS,代码行数:44,代码来源:events.ts


示例8: function

		renderEnd: function(els, model, ctx, container, ctr){
			
			var compo = new VisibleStatement(this);
			compo.elements = els;
			compo.model = model;
			compo.parent = ctr;
			compo.refresh = fn_proxy(compo.refresh, compo);
			compo.binder = expression_createBinder(
				compo.expr,
				model,
				ctx,
				ctr,
				compo.refresh
			);
			
			expression_bind(compo.expr, model, ctx, ctr, compo.binder);
			compo.refresh();
			return compo;
		}
开发者ID:atmajs,项目名称:MaskJS,代码行数:19,代码来源:visible.ts



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript is.is_Array函数代码示例发布时间:2022-05-28
下一篇:
TypeScript error.error_formatSource函数代码示例发布时间:2022-05-28
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap