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

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

parent 328af58d
......@@ -12,8 +12,9 @@
:row-class-name="tableRowClassName"
:empty-text="emptytxt ? emptytxt : emptyText"
border
:height="tableData.length >= 10 ? '680px' : ''"
:height="height"
style="width: 100%"
ref="selectTable"
>
<template v-for="column in columns">
<el-table-column
......@@ -114,10 +115,6 @@ export default {
required: false,
default: () => [],
},
height: {
type: String,
required: false,
},
},
computed: {
emptyText() {
......@@ -130,7 +127,11 @@ export default {
val.length == 0 || val.length > 0
? (this.emptytxt = "暂无数据")
: (this.emptytxt = "加载中...");
val.length >= 10 ? (this.height = "680px") : (this.height = "");
this.$nextTick(() => {
this.$refs.selectTable.doLayout();
});
this.$forceUpdate();
// if (val.length > 0) {
// val.forEach((v) => {
// for (let key in v) {
......@@ -151,6 +152,7 @@ export default {
data() {
return {
emptytxt: "",
height: "",
};
},
};
......
......@@ -320,9 +320,7 @@ export default {
});
}
});
this.$nextTick(() => {
this.$refs.layoutTable.doLayout();
});
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