Button: fix disabled color wrong when has bottomAction prop

This commit is contained in:
陈嘉涵 2017-09-14 20:05:53 +08:00
parent 3be326f7ea
commit 63acb5b799
4 changed files with 15 additions and 19 deletions

View File

@ -74,7 +74,8 @@ Vue.component(Button.name, Button);
:::demo 加载状态 :::demo 加载状态
```html ```html
<van-button loading /> <van-button loading></van-button>
<van-button loading type="primary"></van-button>
``` ```
::: :::

View File

@ -3,8 +3,8 @@
<van-cell-group> <van-cell-group>
<van-cell :title="title" :isLink="editable" @click="$emit('click')"> <van-cell :title="title" :isLink="editable" @click="$emit('click')">
<div v-if="coupons[chosenCoupon]"> <div v-if="coupons[chosenCoupon]">
<h2>{{ amount }}</h2> <div>{{ amount }}</div>
<span>{{ coupons[chosenCoupon].condition }}</span> <div>{{ coupons[chosenCoupon].condition }}</div>
</div> </div>
<template v-else>{{ guide }}</template> <template v-else>{{ guide }}</template>
</van-cell> </van-cell>

View File

@ -36,10 +36,6 @@
color: $button-default-color; color: $button-default-color;
background-color: $button-default-background-color; background-color: $button-default-background-color;
border: 1px solid $button-default-border-color; border: 1px solid $button-default-border-color;
&:active {
color: $gray-dark;
}
} }
&--primary { &--primary {
@ -91,12 +87,6 @@
} }
} }
&--disabled {
color: $button-disabled-color;
background-color: $button-disabled-background-color;
border: 1px solid $button-disabled-border-color;
}
&--block { &--block {
width: 100%; width: 100%;
display: block; display: block;
@ -112,13 +102,14 @@
color: $bottom-action-button-default-color; color: $bottom-action-button-default-color;
background-color: $bottom-action-button-default-background-color; background-color: $bottom-action-button-default-background-color;
&:active {
color: $white;
}
&.van-button--primary { &.van-button--primary {
color: $bottom-action-button-primary-color;
background-color: $bottom-action-button-primary-background-color; background-color: $bottom-action-button-primary-background-color;
} }
} }
&--disabled {
color: $button-disabled-color;
background-color: $button-disabled-background-color;
border: 1px solid $button-disabled-border-color;
}
} }

View File

@ -32,8 +32,12 @@
width: 100%; width: 100%;
height: 14px; height: 14px;
font-size: 14px; font-size: 14px;
color: $gray-dark; color: $gray-darker;
border: none; border: none;
&::placeholder {
color: $gray-dark;
}
} }
&__cancel { &__cancel {