내가 클릭 한 요소에 대해 편집 모드를 사용 가능하게하고 싶습니다. 루프가있어 위젯이 표시됩니다.각도 2 - 클릭하여 contenteditable을 사용/사용 중지하는 방법은 무엇입니까?
<div *ngFor="let widget of container.widgets; let j = index"
class="item-column list-group-item "
dnd-sortable [sortableIndex]="j"
[dragEnabled]="!dragOperation"
(onDragEnter)="onDragEnter(widget, $event)"
(dblclick)="eventEmitDoubleClick(widget, container.widgets)"
contenteditable="false"
>
<div class="item-item" >
{{widget.name}}
</div>
</div>
내 클릭 이벤트
dragOperation: Boolean = false;
contenteditable: Boolean = false;
eventEmitDoubleClick(widget, containerWidgets) {
if(this.dragOperation){
this.dragOperation = false;
this.contenteditable = true;
}else{
this.dragOperation = true;
this.contenteditable = false;
}
}
사람이 도와 드릴까요?
무엇이 문제입니까? –
지금은 어떻게됩니까? – Aravind