[new feature] Collapse: add border prop (#2933)

This commit is contained in:
neverland
2019-03-10 16:21:40 +08:00
committed by GitHub
parent 4d0e3d6644
commit 144fa2d711
5 changed files with 53 additions and 6 deletions

View File

@@ -5,7 +5,11 @@ const [sfc, bem] = use('collapse');
export default sfc({
props: {
accordion: Boolean,
value: [String, Number, Array]
value: [String, Number, Array],
border: {
type: Boolean,
default: true
}
},
data() {
@@ -27,6 +31,10 @@ export default sfc({
},
render(h) {
return <div class={[bem(), 'van-hairline--top-bottom']}>{this.slots()}</div>;
return (
<div class={[bem(), { 'van-hairline--top-bottom': this.border }]}>
{this.slots()}
</div>
);
}
});