mirror of
https://github.com/element-plus/element-plus.git
synced 2025-02-17 11:49:41 +08:00
fix(theme-chalk): input-number controls increase/decrease height (#5088)
This commit is contained in:
parent
dad5dc1743
commit
2f146e8624
@ -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>
|
||||
|
@ -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
|
||||
)};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user