我有这个代码:
var columns = [];
$.each(actions, function (idx, action) {
actionColumn = {
template: '#if (selfActions[i].name === "' + action.name + '"){ # <input type="checkbox" /> some text # } # '
}
columns.push(actionColumn);
});
$("#myId").kendoTreeList({
//...
columns: columns
});
我想转换为模板,例如:
<script id="rowLeaveTemplate" type="text/x-kendo-tmpl">
if (selfActions[i].name === '???action.name???' ){#
<input type="checkbox" /> some text
# } #
</script>
如何将参数传递action.name
给模板以替换'???action.name???'