要使的高度保持不变,可以将style属性中的height设置为固定值,如200px。这样无论表格中的内容多少,该列的高度都将保持为200px。

下面是示例代码:

<el-table-column prop="id" label="ID" style="height: 200px;">
  <template #default="{ row }">
    <span style="font-size: 30px;">{{ row.id }}</span>
  </template>
</el-table-column>

请注意,设置列的高度可能会影响表格的整体布局和显示效果,因此需要根据实际需求和样式进行调整。

el-table-column prop=id label=ID style=height 200px; template #default= row span style=font-size 30px; rowid span template el-table-column高度不变

原文地址: https://www.cveoy.top/t/topic/i5YU 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录