feat: 表格高度自适应
This commit is contained in:
@@ -9,8 +9,8 @@
|
|||||||
fit
|
fit
|
||||||
:data="crud.dataSource"
|
:data="crud.dataSource"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
height="450"
|
:height="height"
|
||||||
max-height="450"
|
:max-height="height"
|
||||||
@selection-change="onTableSelectionChange"
|
@selection-change="onTableSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column v-if="mode === 'multi'" type="selection" width="55" />
|
<el-table-column v-if="mode === 'multi'" type="selection" width="55" />
|
||||||
@@ -117,6 +117,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
height() {
|
||||||
|
return document.documentElement.clientHeight - 250
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initData()
|
this.initData()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
fit
|
fit
|
||||||
:data="crud.dataSource"
|
:data="crud.dataSource"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
height="450"
|
:height="height"
|
||||||
max-height="450"
|
:max-height="height"
|
||||||
@selection-change="onTableSelectionChange"
|
@selection-change="onTableSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column v-if="mode === 'multi'" type="selection" width="55" />
|
<el-table-column v-if="mode === 'multi'" type="selection" width="55" />
|
||||||
@@ -116,6 +116,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
height() {
|
||||||
|
return document.documentElement.clientHeight - 250
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initData()
|
this.initData()
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user