Commit 2c94eed9 authored by 姬鋆屾's avatar 姬鋆屾

推修改考勤汇总单条数据表格错位的问题

parent 328af58d
...@@ -12,8 +12,9 @@ ...@@ -12,8 +12,9 @@
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
:empty-text="emptytxt ? emptytxt : emptyText" :empty-text="emptytxt ? emptytxt : emptyText"
border border
:height="tableData.length >= 10 ? '680px' : ''" :height="height"
style="width: 100%" style="width: 100%"
ref="selectTable"
> >
<template v-for="column in columns"> <template v-for="column in columns">
<el-table-column <el-table-column
...@@ -114,10 +115,6 @@ export default { ...@@ -114,10 +115,6 @@ export default {
required: false, required: false,
default: () => [], default: () => [],
}, },
height: {
type: String,
required: false,
},
}, },
computed: { computed: {
emptyText() { emptyText() {
...@@ -130,7 +127,11 @@ export default { ...@@ -130,7 +127,11 @@ export default {
val.length == 0 || val.length > 0 val.length == 0 || val.length > 0
? (this.emptytxt = "暂无数据") ? (this.emptytxt = "暂无数据")
: (this.emptytxt = "加载中..."); : (this.emptytxt = "加载中...");
val.length >= 10 ? (this.height = "680px") : (this.height = "");
this.$nextTick(() => {
this.$refs.selectTable.doLayout();
});
this.$forceUpdate();
// if (val.length > 0) { // if (val.length > 0) {
// val.forEach((v) => { // val.forEach((v) => {
// for (let key in v) { // for (let key in v) {
...@@ -151,6 +152,7 @@ export default { ...@@ -151,6 +152,7 @@ export default {
data() { data() {
return { return {
emptytxt: "", emptytxt: "",
height: "",
}; };
}, },
}; };
......
...@@ -320,9 +320,7 @@ export default { ...@@ -320,9 +320,7 @@ export default {
}); });
} }
}); });
this.$nextTick(() => {
this.$refs.layoutTable.doLayout();
});
return row; return row;
}, },
/** 重写新增方法 */ /** 重写新增方法 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment