Skip to content

Commit 1e4bbe0

Browse files
authored
Update col.js
1 parent 74f0385 commit 1e4bbe0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/components/layout/col.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ function strNum() {
2727
}
2828
}
2929

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+
//
3233
// See: https://vuejs.org/v2/guide/components-dynamic-async.html#Async-Components
33-
3434
export default (resolve, reject) => {
3535
// Grab the breakpoints from the config (exclude the '' (xs) breakpoint)
3636
const breakpoints = getBreakpointsUp().filter(Boolean)
3737

38-
// Memoized function for better performance
38+
// Memoized function for better performance on generating class names
3939
const computeBkPtClass = memoize(function computeBkPt(type, breakpoint, val) {
4040
let className = type
4141
if (val === false || val === null || val === undefined) {
@@ -66,13 +66,13 @@ export default (resolve, reject) => {
6666
return propMap
6767
}, create(null))
6868

69-
// Supports classes like: .offset-3, .offset-md-1, .offset-lg-12
69+
// Supports classes like: .offset-md-1, .offset-lg-12
7070
const breakpointOffset = breakpoints.reduce((propMap, breakpoint) => {
7171
propMap[suffixPropName(breakpoint, 'offset')] = strNum()
7272
return propMap
7373
}, create(null))
7474

75-
// Supports classes like: .order-3, .order-md-1, .order-lg-12
75+
// Supports classes like: .order-md-1, .order-lg-12
7676
const breakpointOrder = breakpoints.reduce((propMap, breakpoint) => {
7777
propMap[suffixPropName(breakpoint, 'order')] = strNum()
7878
return propMap
@@ -95,10 +95,6 @@ export default (resolve, reject) => {
9595
name: 'BCol',
9696
functional: true,
9797
props: {
98-
tag: {
99-
type: String,
100-
default: 'div'
101-
},
10298
// Generic flexbox .col (xs)
10399
col: {
104100
type: Boolean,
@@ -118,6 +114,10 @@ export default (resolve, reject) => {
118114
default: null,
119115
validator: str =>
120116
arrayIncludes(['auto', 'start', 'end', 'center', 'baseline', 'stretch'], str)
117+
},
118+
tag: {
119+
type: String,
120+
default: 'div'
121121
}
122122
},
123123
render(h, { props, data, children }) {

0 commit comments

Comments
 (0)