最佳答案
我使用的是 Framework7可排序列表,它工作得很好,只是它不会在列表更改时触发事件。
所以我尝试了一些内置的事件:
$('.sortable-handler').on('touchstart', function (e) {
e.preventDefault();
alert('touchstart');
});
$('.sortable-handler').on('touchmove', function (e) {
e.preventDefault();
console.log('touchmove');
});
$('.sortable-handler').on('touchcancel', function (e) {
e.preventDefault();
console.log('touchcancel');
});
$('.sortable-handler').mouseleave(function (e) {
e.preventDefault();
console.log('mouseleave');
});
但我得到的只有:
由于目标,无法防止被动事件侦听器内部的默认值 被视为被动的 Https://www.chromestatus.com/features/5093566007214080
我应该查找哪个事件来获得每种排序的更新列表?