[英]WinJS.UI.ListLayout make contenteditable on one item but have itemsReorderable
How to make content of one column in item in WinJS.UI.ListLayout editable contenteditable="true"
, but remaining list columns remain active to other operations of ListLayout such as itemsReorderable="true"
? 如何使WinJS.UI.ListLayout中item中的一列的内容可编辑,使contenteditable="true"
,但其余列表列仍对ListLayout的其他操作(例如itemsReorderable="true"
保持活动状态?
eg column: 例如列:
<div class="person" data-win-bind="innerText: person" contenteditable="true"></div>
list view config: 列表视图配置:
data-win-options="{ layout:{type: WinJS.UI.ListLayout }, itemsReorderable: true, ...
I finally found answer: class win-interactive
has to be used inside that element or in any of it's parents. 我终于找到答案:必须在该元素内部或其任何父级中使用类win-interactive
。
<div class="person win-interactive" data-win-bind="innerText: person" contenteditable="true"></div>
This disable ListView behavior for an item and make possible adding interactive elements to an item template. 这将禁用项目的ListView行为,并使向项目模板添加交互式元素成为可能。
Based on this http://msdn.microsoft.com/en-us/library/windows/apps/Hh700705.aspx 基于此http://msdn.microsoft.com/en-us/library/windows/apps/Hh700705.aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.