el-table-column prop=id label=ID template #default= row span style=size 100px; rowid span template el-table-columnid怎么大小不变
要使id的大小不变,可以使用CSS样式来设置span元素的大小,并且去掉el-table-column的默认宽度设置。示例代码如下:
<el-table-column prop="id" label="ID" width="auto">
<template #default="{ row }">
<span style="font-size: 14px;">{{ row.id }}</span>
</template>
</el-table-column>
在上面的代码中,将el-table-column的宽度设置为"auto",这样它将根据内容自动调整宽度。然后,通过设置span元素的字体大小为"14px"(或你想要的大小),可以保持id的大小不变。
原文地址: https://www.cveoy.top/t/topic/i5Yq 著作权归作者所有。请勿转载和采集!