[breaking change] rebuild style struct (#2021)
This commit is contained in:
@@ -136,14 +136,14 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="postcss">
|
||||
@import '../../vant-css/src/common/var.css';
|
||||
<style lang="less">
|
||||
@import '../../style/var';
|
||||
|
||||
.demo-field {
|
||||
padding-bottom: 30px;
|
||||
|
||||
.van-field__icon .van-icon {
|
||||
color: $blue;
|
||||
color: @blue;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
@import '../style/var';
|
||||
|
||||
.van-field {
|
||||
.van-cell__title {
|
||||
max-width: 90px;
|
||||
}
|
||||
|
||||
&__body {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&__control {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
resize: none;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
background-color: transparent;
|
||||
|
||||
&:disabled {
|
||||
opacity: 1;
|
||||
color: @gray-darker;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
&--center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&--right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* for ios wechat */
|
||||
&[type="date"],
|
||||
&[type="time"] {
|
||||
min-height: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
&__clear,
|
||||
&__icon,
|
||||
&__button {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
&__clear,
|
||||
&__icon {
|
||||
padding: 0 10px;
|
||||
line-height: inherit;
|
||||
margin-right: -10px;
|
||||
}
|
||||
|
||||
&__clear {
|
||||
color: @gray;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
&__icon .van-icon {
|
||||
display: block;
|
||||
font-size: 16px;
|
||||
color: @gray-dark;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
&__button {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
&__error-message {
|
||||
color: @red;
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
&--disabled {
|
||||
.van-field__control {
|
||||
color: @gray-dark;
|
||||
}
|
||||
}
|
||||
|
||||
&--error {
|
||||
.van-field__control {
|
||||
&,
|
||||
&::placeholder {
|
||||
color: @red;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&--min-height {
|
||||
.van-field__control {
|
||||
min-height: 60px;
|
||||
}
|
||||
}
|
||||
|
||||
&--label {
|
||||
&-center {
|
||||
.van-cell__title {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
&-right {
|
||||
.van-cell__title {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user