mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 03:11:15 +00:00
[new feature] Collapse: add border prop (#2933)
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user