提交 7cb62f22 编写于 作者: d-u-a's avatar d-u-a 提交者: qiang

update: unicloud-db getone 优先 page-data

上级 fd4e1665
......@@ -315,13 +315,13 @@ export default {
callback && callback(data2, this._isEnded)
this._dispatchEvent(events.load, data2)
if (this.pageData === pageMode.add) {
if (this.getone || this.pageData === pageMode.replace) {
this.dataList = data2
} else {
this.dataList.push(...data2)
if (this.dataList.length) {
this.paginationInternal.current++
}
} else {
this.dataList = data2
}
if (this.getcount) {
......@@ -331,7 +331,7 @@ export default {
// #ifdef H5
if (process.env.NODE_ENV === 'development') {
this._debugDataList.length = 0
let formatData = JSON.parse(JSON.stringify(this.dataList))
const formatData = JSON.parse(JSON.stringify(this.dataList))
if (Array.isArray(this.dataList)) {
this._debugDataList.push(...formatData)
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册