@antmjs/vantui
Version:
一套适用于Taro3及React的vantui组件库
131 lines (106 loc) • 2.24 kB
text/less
@import '../style/var.less';
@class-prefix-number-keyboard: ~'vantui-number-keyboard';
.@{class-prefix-number-keyboard} {
&-main {
display: flex;
flex-wrap: wrap;
flex: 1;
&.confirmed-style .sign-key {
.theme(background-color, '@number-keyboard-sign-background-color');
}
}
&-wrapper {
display: flex;
}
&-header {
height: 68px;
line-height: 68px;
border-top: solid 1px #f5f5f5;
display: flex;
justify-content: center;
align-items: center;
padding: 0 24px;
.theme(color, '@number-keyboard-week-color');
background-color: #ffffff;
&-close-button {
padding: 0 24px;
font-size: 24px;
}
&.with-title {
justify-content: space-between;
.@{class-prefix-number-keyboard}-header-close-button {
padding-right: 0;
}
}
}
&-footer {
background: #ffffff;
}
&-title {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
&-confirm {
width: 25%;
}
&-key {
flex: 1 33.33%;
position: relative;
display: flex;
align-items: center;
justify-content: center;
height: 96px;
font-size: 44px;
box-sizing: border-box;
border: solid 2px #f5f5f5;
border-bottom: none;
border-left: none;
&:nth-child(3n),
&:last-child {
border-right: none;
}
&::before {
position: absolute;
top: 50%;
left: 50%;
width: 100%;
height: 100%;
background-color: #000000;
border: inherit;
border-color: #000000;
border-radius: inherit;
transform: translate(-50%, -50%);
opacity: 0;
content: ' ';
box-sizing: content-box;
}
&.mid-key {
flex-basis: 66.67%;
}
&.sign-key:active::before {
opacity: 0.1;
}
&.extra-key {
border-left: solid 1px #f5f5f5;
border-right: none;
}
&.extra-key,
&.number-key {
background-color: #ffffff;
&:active::before {
opacity: 0.1;
}
}
&.ok-key {
.theme(background-color, '@blue');
.theme(color, '@white');
height: 288px;
font-size: 32px;
border: none;
}
}
&-bs-key {
height: 40px;
}
}