Skip to content

el-form表单样式改成表格风格

loading

关键样式

css
<style>
.reset-el-form-for-table-style .el-form-item {
    margin-bottom: 0;
}

.reset-el-form-for-table-style .el-form-item__label {
    /* 标签样式 对应 el-form-item 的 label */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background-color: #f5f7fa;
    border: 1px solid #ebeef5;
    height: auto;
    line-height: normal;
}

.reset-el-form-for-table-style .el-form-item__content {
    padding: 8px 12px;
    border: 1px solid #ebeef5;
    border-left: none;
}
</style>