38
38
height : 100px ;
39
39
border :1px solid rgba (255 ,255 ,255 , .95 );
40
40
}
41
- .crop-box .reference-line {
41
+ .crop-box :after ,
42
+ .crop-box :before {
43
+ content : ' ' ;
44
+ display : block ;
42
45
opacity : 0 ;
43
46
position : absolute ;
44
47
left : 33.3333% ;
48
51
background-color : transparent ;
49
52
border-color : rgba (255 ,255 ,255 ,.7 );
50
53
border-style : solid ;
54
+ border-width : 0 ;
51
55
}
52
- .crop-box :active .reference-line {
56
+ .crop-box :active ::before ,
57
+ .crop-box :active ::after {
53
58
opacity : 1 ;
54
59
}
55
- .crop-box .reference-line.v {
60
+ .crop-box :before {
56
61
border-left-width : 1px ;
57
62
border-right-width : 1px ;
58
63
}
59
- .crop-box .reference-line.h {
64
+ .crop-box :after {
60
65
top : 33.3333% ;
61
66
left : 0 ;
62
67
height : 33.3334% ;
76
81
cursor : se-resize ;
77
82
border-radius : 10px ;
78
83
background-color : #fff ;
84
+ box-shadow : 0 2px 4px -2px rgba (0 ,0 ,0 ,.25 );
79
85
}
80
86
</style >
81
87
@@ -190,7 +196,6 @@ export default {
190
196
this .container = $container;
191
197
const move = function (ev ) {
192
198
const newCropStyle = resize (ev, self .el , $container, coor, self .ratioW / self .ratioH , helper .isMobile );
193
- console .log (newCropStyle);
194
199
if (newCropStyle) {
195
200
self .cropCSS .width = newCropStyle .width ;
196
201
self .cropCSS .height = newCropStyle .height ;
@@ -233,6 +238,7 @@ export default {
233
238
};
234
239
const move = function (ev ) {
235
240
const newCropStyle = drag (ev, self .el , coor);
241
+ console .log (newCropStyle);
236
242
if (newCropStyle) {
237
243
self .cropCSS .left = newCropStyle .left ;
238
244
self .cropCSS .top = newCropStyle .top ;
@@ -253,7 +259,6 @@ export default {
253
259
document .addEventListener (' touchend' , stopMove, false );
254
260
return ;
255
261
}
256
- console .log (1 );
257
262
document .addEventListener (' mousemove' , move, false );
258
263
document .addEventListener (' mouseup' , stopMove, false );
259
264
},
0 commit comments