fix(theme-chalk): input-number controls increase/decrease height (#5088)

This commit is contained in:
云游君 2021-12-31 17:24:38 +08:00 committed by GitHub
parent dad5dc1743
commit 2f146e8624
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 4 deletions

View File

@ -4,6 +4,23 @@
:min="1"
:max="10"
controls-position="right"
size="large"
@change="handleChange"
/>
<el-input-number
v-model="num"
class="mx-4"
:min="1"
:max="10"
controls-position="right"
@change="handleChange"
/>
<el-input-number
v-model="num"
:min="1"
:max="10"
size="small"
controls-position="right"
@change="handleChange"
/>
</template>

View File

@ -125,8 +125,13 @@
}
@include e((increase, decrease)) {
height: auto;
line-height: #{math.div(map.get($input-height, 'default') - 2, 2)};
--el-input-number-controls-height: #{math.div(
map.get($input-height, 'default') - 2,
2
)};
height: var(--el-input-number-controls-height);
line-height: var(--el-input-number-controls-height);
[class*='#{$namespace}-icon'] {
transform: scale(0.8);
@ -134,13 +139,14 @@
}
@include e(increase) {
bottom: auto;
left: auto;
border-radius: 0 var(--el-border-radius-base) 0 0;
border-bottom: var(--el-border-base);
}
@include e(decrease) {
right: 1px;
bottom: 1px;
top: auto;
left: auto;
border-right: none;
@ -152,7 +158,10 @@
&[class*='#{$size}'] {
[class*='increase'],
[class*='decrease'] {
line-height: #{math.div(map.get($input-height, $size) - 2, 2)};
--el-input-number-controls-height: #{math.div(
map.get($input-height, $size) - 2,
2
)};
}
}
}