The problem of line break misalignment in el-checkbox-group

the effect is shown in figure

clipboard.png

the code is as follows

    <el-form-item label=" ">
      <el-checkbox-group v-model="formData.date" size="mini" >
        <el-checkbox style="width:30px;"  v-for="item in dateFromTo(1,31)" :label="item" :key="item">{{item}}</el-checkbox>
      </el-checkbox-group>
      <el-button type="primary" size="mini"  @click="toggle("date")"> / </el-button>
    </el-form-item>
Mar.10,2021

overwrite the underlying style with this
.el-checkbox+.el-checkbox {
margin-left: 0px;
}
.el-checkbox {
margin-right: 25px;
}


give a fixed width

/deep/ .el-checkbox {
    width: 40px !important;
}
Menu