我使用dragula [ng2-dragula]实现了拖放。它在浏览器中完美运行,但是当我在iphone上运行这个应用程序时,它无法正常工作。
<ion-card>
<ion-card-content style="white-space: nowrap; overflow: auto;">
<span *ngFor="let word of codeStream;let i = index">
<div *ngIf="word.indexOf('??') != -1 && droppableModels[i].length==0" class="blanks-bag" [dragula]="'option-bag'" [dragulaOptions]="dragulaOptionsNonDragable" [dragulaModel]="droppableModels[i]">
</div>
<span *ngIf="word.indexOf('??') != -1 && droppableModels[i][0]">
{{droppableModels[i][0].text}}
</span>
<span *ngIf="word == '\t'"> </span>
<span *ngIf="word == '\n'"><br style="clear:both;"/></span>
<span *ngIf="(word.indexOf('??') == -1) && (word != '\t') && (word != '\n')" class="word-bag">{{word}} </span>
</span>
</ion-card-content>
</ion-card>
<ion-card *ngIf="fillBlanksObj.options.length > 0">
<ion-card-header>
Options
</ion-card-header>
<ion-card-content style="white-space: nowrap; overflow: auto;">
<div class="options-bag" [dragula]="'option-bag'" [dragulaModel]="fillBlanksObj.options">
<span class="option" *ngFor="let option of fillBlanksObj.options">
{{option.text}}
</span>
</div>
</ion-card-content>
</ion-card>
我似乎无法找到针对ios的ng2-dragula的任何未解决的问题,但不确定为什么它不能用于iphone [iphone 6,ios 11.1]。