We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
class
1 parent 6d32836 commit ae1f924Copy full SHA for ae1f924
components/_util/props-util.js
@@ -1,5 +1,5 @@
1
import isPlainObject from 'lodash/isPlainObject'
2
-
+import classNames from 'classnames'
3
function getType (fn) {
4
const match = fn && fn.toString().match(/^\s*function (\w+)/)
5
return match ? match[1] : ''
@@ -184,6 +184,8 @@ export function getClass (ele) {
184
let cls = {}
185
if (typeof tempCls === 'string') {
186
tempCls.split(' ').forEach(c => { cls[c.trim()] = true })
187
+ } else if (Array.isArray(tempCls)) {
188
+ classNames(tempCls).split(' ').forEach(c => { cls[c.trim()] = true })
189
} else {
190
cls = tempCls
191
}
0 commit comments