File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 40
40
hasRight: ' right' in this .$slots ,
41
41
leftOpen: false ,
42
42
rightOpen: false ,
43
+ leftActionsWidth: 0 ,
44
+ rightActionsWidth: 0 ,
43
45
};
44
46
},
45
47
props: {
46
48
threshold: {
47
49
type: Number ,
48
50
default: 45 ,
49
- },
51
+ },
50
52
},
51
53
mounted () {
52
54
if (! this .hasLeft && ! this .hasRight )
53
55
return ;
54
56
this ._createHammer ();
55
57
},
56
- computed: {
57
- leftActionsWidth () {
58
- return this .$refs .left ? this .$refs .left .clientWidth : 0 ;
59
- },
60
- rightActionsWidth () {
61
- return this .$refs .right ? this .$refs .right .clientWidth : 0 ;
62
- },
63
- },
64
58
beforeDestroy () {
65
59
if (this .hammer )
66
60
this .hammer .destroy ();
139
133
_startListener (event ) {
140
134
this .isTransitioning = false ;
141
135
if (event .deltaY >= - 5 && event .deltaY <= 5 ) {
136
+ this .leftActionsWidth = this .$refs .left ? this .$refs .left .clientWidth : 0 ;
137
+ this .rightActionsWidth = this .$refs .right ? this .$refs .right .clientWidth : 0 ;
138
+
142
139
this .startLeft = this ._distanceSwiped ();
143
140
this .isActive = true ;
144
141
You can’t perform that action at this time.
0 commit comments