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
的事件被調用。我錯過了什麼?