Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在此处参考此代码。我打算创建一个联系人表,其中有 3 种模式“新建”、“编辑”和“查看”,以控制用户输入。一切正常,除了选中或未选中显示在单击后不刷新的复选框。不知何故,它仍然是原始值,直到它变得模糊。
以下行中的问题:
<td width="*%" data-bind="click: function() { $data.Editing('DisplayName'); }">
当您单击复选框时,会发生 TD 元素的单击事件,而不是单击 oo 复选框元素。
如果您将单击事件更改为双击,它将起作用:
<td data-bind="event: {dblclick: function() { $data.Editing('IsOrganization'); }}">