Skip to content

Commit

Permalink
chore: update classname
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Jul 29, 2018
1 parent e8cbe7d commit b48bbac
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions components/_util/vnode.js
Expand Up @@ -84,13 +84,12 @@ export function cloneElement (n, nodeProps, deep) {
style = { ...style, ...tempStyle }
}

if (typeof data.class === 'string') {
cls[data.class] = true
if (typeof data.class === 'string' && data.class.trim() !== '') {
data.class.split(' ').forEach(c => { cls[c.trim()] = true })
} else {
cls = { ...data.class, ...cls }
}
if (typeof tempCls === 'string') {
if (typeof tempCls === 'string' && tempCls.trim() !== '') {
tempCls.split(' ').forEach(c => { cls[c.trim()] = true })
} else {
cls = { ...cls, ...tempCls }
Expand Down

0 comments on commit b48bbac

Please sign in to comment.