|
@@ -426,7 +426,7 @@
|
|
|
cutList = res.data
|
|
|
var str = '<div class="title">剪贴板<div onclick="handleClear()" class="btn-clear">清空</div></div><div class="slide-wrapper-content">'
|
|
|
res.data.forEach(function (item) {
|
|
|
- str += "<div class='slide-wrapper'><div class='slide-scroll animate-slide-start'><div class='slide-content'><div onclick='handleCopy(\""+ item.content + "\")'>" + item.content + "</div></div><div class='slide-content-button'><button onclick='handleDelete(" + item.id + ")'>删除</button></div></div></div>"
|
|
|
+ str += "<div class='slide-wrapper'><div class='slide-scroll animate-slide-start'><div class='slide-content'><div onclick='handleCopy(\"" + item.content + "\")'>" + item.content + "</div></div><div class='slide-content-button'><button onclick='handleDelete(" + item.id + ")'>删除</button></div></div></div>"
|
|
|
})
|
|
|
str += '</div>'
|
|
|
$('.box-shear-plate').append(str);
|
|
@@ -468,7 +468,6 @@
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
function handleCopy(content) {
|
|
|
$.ajax({
|
|
|
url: baseUrl + "/api/wsi/v1/config/cut",
|
|
@@ -491,7 +490,6 @@
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
// 删除剪切板
|
|
|
function handleDelete(id) {
|
|
|
$.ajax({
|
|
@@ -510,7 +508,6 @@
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
function initSlider() {
|
|
|
//手指滑动多少距离就认为是滑成功
|
|
|
//这个值不能太大,否则影响斜着滑动时,垂直滑动的流畅性,也不能太小,太灵敏也不好
|
|
@@ -523,9 +520,13 @@
|
|
|
var canSlide = true;
|
|
|
//用于记录按下的点
|
|
|
var startPoint;
|
|
|
+
|
|
|
$(".slide-content").css({
|
|
|
width: $(".slide-wrapper").width()
|
|
|
});
|
|
|
+ $(".slide-wrapper-content").on('touchmove', function (e) {
|
|
|
+ e.preventDefault()
|
|
|
+ })
|
|
|
$(".slide-scroll").css({
|
|
|
width: $(".slide-wrapper").width() + $(".slide-content-button").width()
|
|
|
})
|
|
@@ -581,7 +582,6 @@
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
var orientation = 0; //0 竖屏,1横屏
|
|
|
document.body.addEventListener('touchmove', function (e) {
|
|
|
e.preventDefault()
|