update;更新下拉刷新
This commit is contained in:
@@ -18,17 +18,12 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let app = document.querySelector("#app");
|
||||
app.onclick = function(e) {
|
||||
this.startValue = e.target.offsetTop;
|
||||
document.body.ontouchstart = function(e) {
|
||||
this.startValue = e.changedTouches[0].pageY;
|
||||
};
|
||||
app.ontouchend = function(e) {
|
||||
this.endValue = e.target.offsetTop;
|
||||
if (
|
||||
this.endValue - this.startValue > 0 ||
|
||||
app.offsetTop > 0 ||
|
||||
app.clientTop > 0
|
||||
) {
|
||||
document.body.ontouchend = function(e) {
|
||||
this.endValue = e.changedTouches[0].pageY;
|
||||
if (this.endValue - this.startValue > 0) {
|
||||
window.location.reload();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user