File tree Expand file tree Collapse file tree 5 files changed +20
-3
lines changed Expand file tree Collapse file tree 5 files changed +20
-3
lines changed Original file line number Diff line number Diff line change
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file. See [ standard-version] ( https://github.com/conventional-changelog/standard-version ) for commit guidelines.
4
+
5
+ <a name =" 1.1.0 " ></a >
6
+ # [ 1.1.0] ( https://github.com/apertureless/vue-breakpoints/compare/v1.0.0...v1.1.0 ) (2018-04-05)
7
+
8
+
9
+ ### Features
10
+
11
+ * ** debug:** Add proper render condition and console warnings ([ 3afe976] ( https://github.com/apertureless/vue-breakpoints/commit/3afe976 ) )
12
+ * ** render:** Remove surrounding divs in render function ([ 9395fab] ( https://github.com/apertureless/vue-breakpoints/commit/9395fab ) )
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vue-breakpoints" ,
3
- "version" : " 1.0 .0" ,
3
+ "version" : " 1.1 .0" ,
4
4
"description" : " Vue.js utility component to show and hide components based on breakpoints" ,
5
5
"author" :
" Jakub Juszczak <[email protected] >" ,
6
6
"license" : " MIT" ,
Original file line number Diff line number Diff line change 44
44
}
45
45
46
46
if (shouldRender) {
47
- return this .$slots .default [0 ]
47
+ return this .$slots .default ? this . $slots . default [0 ] : null
48
48
}
49
49
return null
50
50
}
Original file line number Diff line number Diff line change 44
44
}
45
45
46
46
if (shouldRender) {
47
- return this .$slots .default [0 ]
47
+ return this .$slots .default ? this . $slots . default [0 ] : null
48
48
}
49
49
return null
50
50
}
Original file line number Diff line number Diff line change 25
25
mounted () {
26
26
window .addEventListener (' resize' , this .handleResize )
27
27
this .handleResize ()
28
+ if (this .$slots .default && this .$slots .default .length > 1 ) {
29
+ console .warn (' [✋ vue-breakpoints] You may only wrap one element in a <showAt> or <hideAt/> component.' )
30
+ } else if (! this .$slots .default || this .$slots .default .length < 1 ) {
31
+ console .warn (' [✋ vue-breakpoints] You must have one child inside a <showAt> or <hideAt/> component.' )
32
+ }
28
33
},
29
34
30
35
beforeDestroy () {
You can’t perform that action at this time.
0 commit comments