[bugfix] Cell arrow (#1343)

This commit is contained in:
neverland 2018-06-28 09:22:57 +08:00 committed by GitHub
parent f5fc86f182
commit d43c8c8050
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 5 deletions

View File

@ -28,7 +28,7 @@
</slot> </slot>
</div> </div>
<slot name="right-icon"> <slot name="right-icon">
<icon v-if="isLink" :class="`${b('right-icon')} ${arrowDirection ? b(`arrow--${arrowDirection}`) : ''}`" name="arrow" /> <icon v-if="isLink" :class="b('right-icon', arrowDirection)" name="arrow" />
</slot> </slot>
<slot name="extra" /> <slot name="extra" />
</div> </div>
@ -57,11 +57,11 @@ export default create({
clickable: Boolean, clickable: Boolean,
title: [String, Number], title: [String, Number],
value: [String, Number], value: [String, Number],
arrowDirection: String,
border: { border: {
type: Boolean, type: Boolean,
default: true default: true
}, }
arrowDirection: String
}, },
methods: { methods: {

View File

@ -68,6 +68,16 @@ exports[`renders demo correctly 1`] = `
<!----> <!---->
</i> </i>
</div> </div>
<div class="van-cell van-cell--clickable van-hairline">
<!---->
<div class="van-cell__title"><span>单元格</span>
<!---->
</div>
<div class="van-cell__value"><span>内容</span></div>
<i class="van-icon van-icon-arrow van-cell__right-icon van-cell__right-icon--down" style="color:undefined;">
<!---->
</i>
</div>
</div> </div>
</div> </div>
<div> <div>

View File

@ -56,9 +56,7 @@
font-size: 12px; font-size: 12px;
line-height: 24px; line-height: 24px;
margin-left: 5px; margin-left: 5px;
}
&__arrow {
&--left::before { &--left::before {
transform: rotate(180deg); transform: rotate(180deg);
} }