本文整理匯總了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);
},