@@ -27,15 +27,15 @@ function strNum() {
27
27
}
28
28
}
29
29
30
- // Async component
31
- // So that we can have configed breakpoints generate props
30
+ // Async (lazy) component
31
+ // So that we can generate breakpoint specific props once the config has been updated.
32
+ //
32
33
// See: https://vuejs.org/v2/guide/components-dynamic-async.html#Async-Components
33
-
34
34
export default ( resolve , reject ) => {
35
35
// Grab the breakpoints from the config (exclude the '' (xs) breakpoint)
36
36
const breakpoints = getBreakpointsUp ( ) . filter ( Boolean )
37
37
38
- // Memoized function for better performance
38
+ // Memoized function for better performance on generating class names
39
39
const computeBkPtClass = memoize ( function computeBkPt ( type , breakpoint , val ) {
40
40
let className = type
41
41
if ( val === false || val === null || val === undefined ) {
@@ -66,13 +66,13 @@ export default (resolve, reject) => {
66
66
return propMap
67
67
} , create ( null ) )
68
68
69
- // Supports classes like: .offset-3, .offset- md-1, .offset-lg-12
69
+ // Supports classes like: .offset-md-1, .offset-lg-12
70
70
const breakpointOffset = breakpoints . reduce ( ( propMap , breakpoint ) => {
71
71
propMap [ suffixPropName ( breakpoint , 'offset' ) ] = strNum ( )
72
72
return propMap
73
73
} , create ( null ) )
74
74
75
- // Supports classes like: .order-3, .order- md-1, .order-lg-12
75
+ // Supports classes like: .order-md-1, .order-lg-12
76
76
const breakpointOrder = breakpoints . reduce ( ( propMap , breakpoint ) => {
77
77
propMap [ suffixPropName ( breakpoint , 'order' ) ] = strNum ( )
78
78
return propMap
@@ -95,10 +95,6 @@ export default (resolve, reject) => {
95
95
name : 'BCol' ,
96
96
functional : true ,
97
97
props : {
98
- tag : {
99
- type : String ,
100
- default : 'div'
101
- } ,
102
98
// Generic flexbox .col (xs)
103
99
col : {
104
100
type : Boolean ,
@@ -118,6 +114,10 @@ export default (resolve, reject) => {
118
114
default : null ,
119
115
validator : str =>
120
116
arrayIncludes ( [ 'auto' , 'start' , 'end' , 'center' , 'baseline' , 'stretch' ] , str )
117
+ } ,
118
+ tag : {
119
+ type : String ,
120
+ default : 'div'
121
121
}
122
122
} ,
123
123
render ( h , { props, data, children } ) {
0 commit comments