4
我已经按照从上click
的KO文件文章结合here这个例子:clickBubble:假不工作
<div data-bind="click: myDivHandler">
<button data-bind="click: myButtonHandler, clickBubble: false">
Click me
</button>
</div>
我的代码如下所示:
<tr role="row" data-bind="click: 'True' === 'True' ? ($root.BrowsingCatalog() ? $root.viewProduct : $root.showProduct) : $root.showProduct">
<td class="col-sm-1" data-bind="visible: 'True' == 'True' ? !$root.BrowsingCatalog() : true">
<div class="btn-group">
<button type="button" data-bind="clickBubble: false" class="btn btn-round dropdown-toggle " aria-expanded="false">
<span class="fa fa-caret-down"></span>
</button>
</div>
</td>
</tr>
,当我点击button
,来自tr
的事件被调用。我错过了什么?