在 Ionic 框架内工作。我有一个非常简单的应用程序设置,无法在滑动时显示按钮:
//Swipable buttons don't work.
$scope.itemButtons = [
{
text: 'Edit',
type: 'Button',
onTap: function (item) {
alert('Edit Item');
}
},
{
text: 'Share',
type: 'Button',
onTap: function (item) {
alert('Share Item');
}
}
];
<ion-content>
<ion-list>
<ion-item ng-repeat="facility in facilities" item="item" can-swipe="true" option-buttons="itemButtons">
{{facility.name}}
</ion-item>
</ion-list>
</ion-content>