tianheng-ui 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tianheng-ui",
3
3
  "description": "A Vue.js project",
4
- "version": "0.1.7",
4
+ "version": "0.1.9",
5
5
  "author": "shu lang <403732931@qq.com>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -230,7 +230,7 @@ export default {
230
230
  headers: remoteFunc.headers,
231
231
  data: { ...remoteFunc.params }
232
232
  }).then(res => {
233
- const resultData = res.data.records;
233
+ const resultData = res.data.records ? res.data.records : res.data;
234
234
  item.options.remoteOptions = resultData.map(element => {
235
235
  return {
236
236
  value: element[item.options.props.value || "value"],
@@ -290,10 +290,10 @@ export default {
290
290
  this.tableConfig.loading.show = false;
291
291
  let data = [];
292
292
  if (this.tableConfig.pageInfo.show) {
293
- data = res.records;
294
- this.tableConfig.pageInfo.options.total = Number(res.total);
293
+ data = res.data.records;
294
+ this.tableConfig.pageInfo.options.total = Number(res.data.total);
295
295
  } else {
296
- data = res;
296
+ data = res.data;
297
297
  }
298
298
  this.tableData = data;
299
299
  })