本文整理汇总了TypeScript中@binding/utils/expression.expression_eval_safe函数的典型用法代码示例。如果您正苦于以下问题:TypeScript expression_eval_safe函数的具体用法?TypeScript expression_eval_safe怎么用?TypeScript expression_eval_safe使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了expression_eval_safe函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
nodeRenderStart: function(expr, model, ctx, el, ctr, type, node){
var current = expression_eval_safe(expr, model, ctx, ctr, node);
// though we apply value's to `this` context, but it is only for immediat use
// in .node() function, as `this` context is a static object that share all bind
// utils
this.element = _document.createTextNode(current);
return (this.current = current);
},
示例2: function
render: function(model, ctx, container, ctr, children){
var value = expression_eval_safe(this.expression, model, ctx, ctr);
resolveNodes(value, this.nodes, model, ctx, ctr);
var nodes = _nodes,
index = _index;
if (nodes == null) {
return null;
}
this.attr[attr_SWITCH] = index;
return compo_renderElements(nodes, model, ctx, container, ctr, children);
},
示例3: function
refresh: function(){
var isVisible = expression_eval_safe(
this.expr, this.model, this.ctx, this
);
$Visible.toggle(this.elements, isVisible);
},