mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-22 22:49:15 +08:00
[Improvement] Stepper: update disabled style (#997)
This commit is contained in:
parent
cb525ca98e
commit
829dd6a36c
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="b({ disabled })">
|
<div :class="b()">
|
||||||
<button
|
<button
|
||||||
:class="b('minus', { disabled: minusDisabled })"
|
:class="b('minus', { disabled: minusDisabled })"
|
||||||
@click="onChange('minus')"
|
@click="onChange('minus')"
|
||||||
|
@ -3,14 +3,6 @@
|
|||||||
.van-stepper {
|
.van-stepper {
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
|
|
||||||
&--disabled {
|
|
||||||
.van-stepper__input,
|
|
||||||
.van-stepper__minus,
|
|
||||||
.van-stepper__plus {
|
|
||||||
border-color: $active-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&__minus,
|
&__minus,
|
||||||
&__plus {
|
&__plus {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
@ -48,6 +40,15 @@
|
|||||||
background-color: $active-color;
|
background-color: $active-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&--disabled {
|
||||||
|
background-color: $background-color;
|
||||||
|
|
||||||
|
&::before,
|
||||||
|
&::after {
|
||||||
|
background-color: $gray;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&--disabled:active {
|
&--disabled:active {
|
||||||
background-color: $background-color;
|
background-color: $background-color;
|
||||||
}
|
}
|
||||||
@ -59,20 +60,10 @@
|
|||||||
&::after {
|
&::after {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
&--disabled {
|
|
||||||
background-color: $background-color;
|
|
||||||
border-color: $active-color $border-color $active-color $active-color;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__plus {
|
&__plus {
|
||||||
border-radius: 0 2px 2px 0;
|
border-radius: 0 2px 2px 0;
|
||||||
|
|
||||||
&--disabled {
|
|
||||||
background-color: $background-color;
|
|
||||||
border-color: $active-color $active-color $active-color $border-color;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__input {
|
&__input {
|
||||||
@ -88,10 +79,14 @@
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
|
|
||||||
|
&[disabled] {
|
||||||
|
color: $gray;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=number]::-webkit-inner-spin-button,
|
input[type="number"]::-webkit-inner-spin-button,
|
||||||
input[type=number]::-webkit-outer-spin-button {
|
input[type="number"]::-webkit-outer-spin-button {
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user