Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
refreshAll () {
$.showIndicator()
setTimeout(function () {
console.log('refreshAll')
let cardNumber = $(this.$el).find('.card').length
let cardHTML = '<div class="card">' +
'<div class="card-header">card' + cardNumber + '</div>' +
'<div class="card-content">' +
'<div class="card-content-inner">' +
'这里是第' + cardNumber + '个card,下拉刷新会出现第' + (cardNumber + 1) + '个card。' +
'</div>' +
'</div>' +
'</div>'
$(this.$el).find('.allTasks').prepend(cardHTML)
// 加载完毕需要重置
$.pullToRefreshDone('.pull-to-refresh-content')
$.hideIndicator()
}.bind(this), 1500)
refreshAll () {
$.showIndicator() //显示指示器 modal
setTimeout(function () {
let cardNumber = $(this.$el).find('.card').length
let cardHTML = '<div class="card">' +
'<div class="card-header">card' + cardNumber + '</div>' +
'<div class="card-content">' +
'<div class="card-content-inner">' +
'这里是第' + cardNumber + '个card,下拉刷新会出现第' + (cardNumber + 1) + '个card。' +
'</div>' +
'</div>' +
'</div>'
$(this.$el).find('.card-container').prepend(cardHTML);
// 加载完毕需要重置
$.pullToRefreshDone('.pull-to-refresh-content');
$.hideIndicator()
}.bind(this), 1500)
refreshPoint () {
$.showIndicator()
setTimeout(function () {
console.log('refresh')
$.pullToRefreshDone('.pull-to-refresh-content')
$.hideIndicator()
}, 1500)
},
refreshInvite () {
refreshMine () {
$.showIndicator()
setTimeout(function () {
console.log('refreshMine')
let num = this.length + 1
let title = `card${num}`
let content = `这里是第${num}个card,下拉刷新会出现第${num + 1}个card。`
this.tasks.push({
id: num,
title: title,
content: content
})
$.pullToRefreshDone('.pull-to-refresh-content')
$.hideIndicator()
}.bind(this), 1500)
}
},
refresh () {
$.showIndicator()
setTimeout(function () {
console.log('refresh')
$.pullToRefreshDone('.pull-to-refresh-content')
$.hideIndicator()
}, 1500)
}
},