.basic-number--left.el-input-number { height: 32px; .el-input__inner { text-align: left; } } .el-input-number { .el-input { .el-input__wrapper { padding: 1px 12px; } } &.basic-number--left { height: 32px; .el-input__inner { text-align: left; } } &.basic-number--unit { position: relative; .el-input__inner { text-align: left; padding-right: 24px; } &::after { content: attr(data-unit); position: absolute; right: 4px; top: 2px; height: @formItemLineHeight; color: @info; } } &.basic-number-standard { .el-input-number__decrease { left: auto; right: 32px; // 按钮30px+右边框1px+左边竖线1px background: inherit; border: none; } .el-input-number__increase { background: inherit; border: none; &::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px; background: var(--el-border-color); } } .el-input__inner { // 61px = 右侧两个按钮2*30+中间竖线1px,15px为默认的左边间距 } &.el-input-number--large { .el-input-number__decrease { right: 40px; // 按钮38px+右边框1px+左边竖线1px } .el-input__inner { // 77px = 右侧两个按钮2*38+中间竖线1px,15px为默认的左右边间距 } } } &.basic-number--no-controls { .el-input__inner { // no-controls 的padding权重需要比 basic-number-standard 的高 } } }