File tree 2 files changed +33
-0
lines changed
2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 1
1
module . exports = {
2
2
comments : false ,
3
+ presets : [
4
+ [
5
+ "@babel/env" ,
6
+ {
7
+ targets : {
8
+ ie : "10" ,
9
+ edge : "17" ,
10
+ firefox : "60" ,
11
+ chrome : "67" ,
12
+ safari : "11.1"
13
+ } ,
14
+ useBuiltIns : "usage" ,
15
+ corejs : "3.6.5"
16
+ }
17
+ ]
18
+ ] ,
3
19
plugins : [ "transform-vue-jsx" ] ,
4
20
/* presets: [["env", { modules: false }]], */
5
21
env : {
Original file line number Diff line number Diff line change @@ -55,6 +55,22 @@ export default {
55
55
this . observer . observe ( this . $el ) ;
56
56
} ,
57
57
58
+ // is support IntersectionObserver
59
+ isSupport ( ) {
60
+ if (
61
+ ! ( "IntersectionObserver" in window ) ||
62
+ ! ( "IntersectionObserverEntry" in window ) ||
63
+ ! (
64
+ "intersectionRatio" in
65
+ window . IntersectionObserverEntry . prototype
66
+ )
67
+ ) {
68
+ console . warn (
69
+ "Your browser does not support IntersectionObserver!"
70
+ ) ;
71
+ }
72
+ } ,
73
+
58
74
// destroy observer
59
75
destroyObserver ( ) {
60
76
if ( this . observer ) {
@@ -64,6 +80,7 @@ export default {
64
80
}
65
81
} ,
66
82
mounted ( ) {
83
+ this . isSupport ( ) ;
67
84
this . createObserver ( ) ;
68
85
} ,
69
86
beforeDestroy ( ) {
You can’t perform that action at this time.
0 commit comments