根据提供的代码片段,el-table-column的高度没有变化的原因可能是因为el-table-column本身没有设置高度属性。在上述代码中,style属性被应用于el-table-column标签本身,而不是应用于列中的内容。所以,设置el-table-column的高度并不会影响列中的内容的高度。

如果你想要改变列中内容的高度,可以尝试将样式应用于模板中的span元素,而不是应用于el-table-column本身。例如:

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

通过将height属性应用于span元素,你可以改变列中内容的高度。

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/i5YV 著作权归作者所有。请勿转载和采集!

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