标签:pre tutorial dev evel tor 数据绑定 span sch lse
Invisible/Visible 绑定可以根据 ViewModel 的某个属性来显示/隐藏 DOM 元素。例如:
<div id="view"> <div data-bind="invisible: isInvisible">some content </div> <button data-bind="click: show">Show</button> </div> <script> var viewModel = kendo.observable({ isInvisible: true, show: function () { this.set("isInvisible", false); } }); kendo.bind($("#view"), viewModel); </script>
Kendo MVVM 数据绑定(七) Invisible/Visible
标签:pre tutorial dev evel tor 数据绑定 span sch lse
原文地址:https://www.cnblogs.com/miaosj/p/10362315.html