Commit 627860ef by 李长胜

调整表格无数据高度

1 parent e14081e7
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.3.1", "glsx-components": "^1.3.6",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-amap": "^0.5.10", "vue-amap": "^0.5.10",
......
...@@ -326,9 +326,12 @@ export default { ...@@ -326,9 +326,12 @@ export default {
this.$apis.store.findMerchantByPage(params).then(res => { this.$apis.store.findMerchantByPage(params).then(res => {
this.tableData = res.data this.tableData = res.data
this.tableTotal = res.count this.tableTotal = res.count
if (res.data && res.data.length == []) {
this.$refs.table.setTableHeightFun() this.tableData.length ? (this.$refs.table.tableHeightValues = '') : this.$refs.table.setTableHeightFun()
}
// if (res.data && res.data.length == []) {
// this.$refs.table.setTableHeightFun()
// }
}) })
}, },
handleReset() { handleReset() {
......
...@@ -320,9 +320,10 @@ export default { ...@@ -320,9 +320,10 @@ export default {
}) })
}, },
setTableFinishFun() { setTableFinishFun() {
if (this.$refs.employeeRef.data && !this.$refs.employeeRef.data.length) { // if (this.$refs.employeeRef.data && !this.$refs.employeeRef.data.length) {
this.$refs.employeeRef.setTableHeightFun() // this.$refs.employeeRef.setTableHeightFun()
} // }
this.$refs.employeeRef.data.length ? (this.$refs.employeeRef.tableHeightValues = '') : this.$refs.employeeRef.setTableHeightFun()
}, },
handleDetail(row) { handleDetail(row) {
this.$router.push('/employee/detailEmployee/' + row.id) this.$router.push('/employee/detailEmployee/' + row.id)
......
...@@ -145,9 +145,10 @@ export default { ...@@ -145,9 +145,10 @@ export default {
this.$apis.role.roleDataList(para).then(res => { this.$apis.role.roleDataList(para).then(res => {
this.tableData = res.data this.tableData = res.data
this.tableTotal = res.count this.tableTotal = res.count
if (!res.data.length || !res) { this.tableData.length ? (this.$refs.table.tableHeightValues = '') : this.$refs.table.setTableHeightFun()
this.$refs.table.setTableHeightFun() // if (!res.data.length || !res) {
} // this.$refs.table.setTableHeightFun()
// }
// this.$nextTick(() => { // this.$nextTick(() => {
// this.$refs.table.setTableHeightFun() // this.$refs.table.setTableHeightFun()
// }) // })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!