Browse Source

chore: update classname

pull/165/head
tangjinzhou 6 years ago
parent
commit
e4b4aba25e
  1. 5
      components/_util/vnode.js

5
components/_util/vnode.js

@ -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 }

Loading…
Cancel
Save