table滚动
This commit is contained in:
parent
07cceb5060
commit
8090c6a28c
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="table-container">
|
<div class="table-container">
|
||||||
<el-table :data="tableData" :row-key="rowKey" :tree-props="treeProps" :border="border"
|
<el-table height="100%" :data="tableData" :row-key="rowKey" :tree-props="treeProps" :border="border"
|
||||||
:highlight-current-row="highlightCurrentRow" v-bind="$attrs" @row-click="handleRowClick">
|
:highlight-current-row="highlightCurrentRow" v-bind="$attrs" @row-click="handleRowClick">
|
||||||
<!-- 动态表头列 -->
|
<!-- 动态表头列 -->
|
||||||
<template v-for="(column, index) in columns" :key="index">
|
<template v-for="(column, index) in columns" :key="index">
|
||||||
|
|
@ -63,8 +63,8 @@ const handleRowClick = (row: any) => {
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.table-container {
|
.table-container {
|
||||||
max-width: calc(100vw - 200px);
|
width: 100%;
|
||||||
max-height: calc(100vh - 180px);
|
height: calc(100vh - 180px);
|
||||||
overflow: auto;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue