如何在 kendo UI 模板中检查字符串是否包含逗号
How to check string contains comma or not in kendo UI template
In kendo UI template i want to check whether string contains value with comma(',') separated or not
<script id="supply-chain-manager-column-template" type="text/x-kendo-template">
# if (UserRole != null) { #
# if (UserRole.indexOf(',')>-1) != null) { #
<span>#= UserRole # ...</span>
# } else { #
<span>#= UserRole # ... </span>
# } #
</script>
这对我有用
<script id="account-relationship-manager-column-template-load-management" type="text/x-kendo-template">
# if (UserRole != null) { #
# if (parseInt(UserRole.indexOf(',')) > 0) {#
<a href="\#" data-bind="events: { click: onUserRoleClick }"> #= UserRole.split(',')[0] # .... </a>
# } else { #
<span>#= UserRole # </span>
# } #
# } #
</script>
In kendo UI template i want to check whether string contains value with comma(',') separated or not
<script id="supply-chain-manager-column-template" type="text/x-kendo-template">
# if (UserRole != null) { #
# if (UserRole.indexOf(',')>-1) != null) { #
<span>#= UserRole # ...</span>
# } else { #
<span>#= UserRole # ... </span>
# } #
</script>
这对我有用
<script id="account-relationship-manager-column-template-load-management" type="text/x-kendo-template">
# if (UserRole != null) { #
# if (parseInt(UserRole.indexOf(',')) > 0) {#
<a href="\#" data-bind="events: { click: onUserRoleClick }"> #= UserRole.split(',')[0] # .... </a>
# } else { #
<span>#= UserRole # </span>
# } #
# } #
</script>