仅供参考,我们正在调试使用 angularJS 1.4.2 和 ionic framework 1.2.4 和 WKWebView 开发的移动混合应用程序。
下面的多张快照是显示之前和之后的事件。基于webkit 内存调试文章,快照将显示尚未被 GC 的实时 JavaScript 对象。

快照 5 仍然在同一页面中,但经过一些计算并从 PDFTron 生成了一个 base64 字符串 pdf 以在 UIWebview 上查看它。

快照 10 显示退出页面 A 并使用控制器 C 导航到页面 C。

快照 2 和快照 10 的比较,所有 base64 字符串仍然保留在那里。

问题:
javascript mobile angularjs safari-web-inspector ionic-framework
我想禁用离子中的离子列表滑动并使用保持列表.
已经使用can-swipe ="false"来禁用它,但是当触发showDelete或showReorder操作时,滑动将再次自动启用.反正是否有阻止再次启用滑动?
这是我的代码
HTML
<ion-list show-delete="data.showDelete" show-reorder="data.showReorder" can-swipe="false">
<ion-item ng-repeat="item in items"
item="item"
href="#/item/{{item.id}}" class="item-remove-animate" hold-list>
Item {{ item.id }}
<ion-delete-button class="ion-minus-circled"
ng-click="onItemDelete(item)">
</ion-delete-button>
<ion-option-button class="button-assertive"
ng-click="edit(item)">
Edit
</ion-option-button>
<ion-option-button class="button-calm"
ng-click="share(item)">
Share
</ion-option-button>
<ion-reorder-button class="ion-navicon" on-reorder="moveItem(item, $fromIndex, $toIndex)"></ion-reorder-button>
</ion-item>
</ion-list>
Run Code Online (Sandbox Code Playgroud)
控制器和指令
angular.module('ionicApp', ['ionic'])
.directive('holdList', ['$ionicGesture', function($ionicGesture) {
return {
restrict: 'A',
link: function(scope, element, attrs) {
$ionicGesture.on('hold', function(e) {
var content = element[0].querySelector('.item-content');
var buttons = element[0].querySelector('.item-options');
var buttonsWidth = buttons.offsetWidth;
ionic.requestAnimationFrame(function() {
content.style[ionic.CSS.TRANSITION] = 'all ease-out .25s'; …Run Code Online (Sandbox Code Playgroud)