[new feature] Coupon: add description prop (#2458)

This commit is contained in:
neverland
2019-01-07 17:25:03 +08:00
committed by GitHub
parent 7f853f694a
commit 2c3458587e
10 changed files with 256 additions and 21 deletions
+3 -2
View File
@@ -53,9 +53,10 @@ export default sfc({
render(h) {
const { coupon, disabled } = this;
const description = (disabled && coupon.reason) || coupon.description;
return (
<div class={bem({ disabled: this.disabled })}>
<div class={bem({ disabled })}>
<div class={bem('content')}>
<div class={bem('head')}>
<h2 domPropsInnerHTML={this.faceAmount} />
@@ -67,7 +68,7 @@ export default sfc({
{this.chosen && <Checkbox value={true} class={bem('corner')} />}
</div>
</div>
{(disabled && coupon.reason) && <p class={bem('reason')}>{coupon.reason}</p>}
{description && <p class={bem('description')}>{description}</p>}
</div>
);
}
+1 -1
View File
@@ -72,7 +72,7 @@
}
}
&__reason {
&__description {
padding: 7px 15px;
border-top: 1px dashed @border-color;
background-color: @background-color-light;