修改新模块的bug

This commit is contained in:
liushuai
2018-11-24 10:23:12 +08:00
parent dc0100bb9b
commit bbca4d7afc
4 changed files with 42 additions and 31 deletions

View File

@@ -79,9 +79,6 @@ export default {
})
}
}
if (this[carrier].length !== 0) {
this[carrier] = response.data[0][select[0]]
}
})
} else {
requestData(param).then(response => { // 这个方法没什么难度,不注释了
@@ -139,7 +136,7 @@ export default {
// 3接受值数组一般是['table','total','loading']顺序不能变
Vue.prototype.getTable = function(requestData, param, e) {
requestData(...param).then(response => {
const data = response.data.rows ? response.data.rows : response.data
const data = response.data.rows
this[e[0]] = []
this[e[1]] = 0
if (data && data.length > 0) {
@@ -159,9 +156,7 @@ export default {
// console.log('暂无数据')
}
}).then(() => {
if (this[e[2]]) {
this[e[2]] = false
}
this[e[2]] = false
})
}
// 添加表格数据