File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ VantComponent({
28
28
29
29
data : {
30
30
expanded : false ,
31
+ parentBorder : true ,
31
32
} ,
32
33
33
34
mounted ( ) {
@@ -41,7 +42,7 @@ VantComponent({
41
42
return ;
42
43
}
43
44
44
- const { value, accordion } = this . parent . data ;
45
+ const { value, accordion, border } = this . parent . data ;
45
46
const { children = [ ] } = this . parent ;
46
47
const { name } = this . data ;
47
48
@@ -56,7 +57,7 @@ VantComponent({
56
57
setContentAnimate ( this , expanded , this . mounted ) ;
57
58
}
58
59
59
- this . setData ( { index, expanded } ) ;
60
+ this . setData ( { index, expanded, parentBorder : border } ) ;
60
61
} ,
61
62
62
63
onClick ( ) {
Original file line number Diff line number Diff line change 1
1
<wxs src="../wxs/utils.wxs" module="utils" />
2
2
3
- <view class="van-collapse-item custom-class {{ index !== 0 ? 'van-hairline--top' : '' }}">
3
+ <view class="van-collapse-item custom-class {{ index !== 0 && parentBorder ? 'van-hairline--top' : '' }}">
4
4
<van-cell
5
5
size="{{ size }}"
6
6
title="{{ title }}"
You can’t perform that action at this time.
0 commit comments