提交 a34fa042 编写于 作者: Q qiang

Merge branch 'dev' into alpha

...@@ -250,9 +250,14 @@ export default { ...@@ -250,9 +250,14 @@ export default {
this._execLoadData(callback, clear) this._execLoadData(callback, clear)
}, },
loadMore () { loadMore () {
if (this._isEnded) { if (this._isEnded || this.loading) {
return return
} }
if (this.pageData === pageMode.add) {
this.paginationInternal.current++
}
this._execLoadData() this._execLoadData()
}, },
refresh () { refresh () {
...@@ -402,7 +407,11 @@ export default { ...@@ -402,7 +407,11 @@ export default {
const data2 = this.getone ? (data.length ? data[0] : undefined) : data const data2 = this.getone ? (data.length ? data[0] : undefined) : data
callback && callback(data2, this._isEnded) if (this.getcount) {
this.paginationInternal.count = count
}
callback && callback(data2, this._isEnded, this.paginationInternal)
this._dispatchEvent(events.load, data2) this._dispatchEvent(events.load, data2)
if (this.getone || this.pageData === pageMode.replace) { if (this.getone || this.pageData === pageMode.replace) {
...@@ -413,13 +422,6 @@ export default { ...@@ -413,13 +422,6 @@ export default {
} else { } else {
this.dataList.push(...data2) this.dataList.push(...data2)
} }
if (this.dataList.length) {
this.paginationInternal.current++
}
}
if (this.getcount) {
this.paginationInternal.count = count
} }
// #ifdef H5 // #ifdef H5
...@@ -557,9 +559,9 @@ export default { ...@@ -557,9 +559,9 @@ export default {
}, },
_dispatchEvent (type, data) { _dispatchEvent (type, data) {
if (this._changeDataFunction) { if (this._changeDataFunction) {
this._changeDataFunction(data, this._isEnded) this._changeDataFunction(data, this._isEnded, this.paginationInternal)
} else { } else {
this.$emit(type, data, this._isEnded) this.$emit(type, data, this._isEnded, this.paginationInternal)
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册