chore: update classname
parent
a3f61ef00a
commit
e4b4aba25e
|
@ -84,13 +84,12 @@ export function cloneElement (n, nodeProps, deep) {
|
||||||
style = { ...style, ...tempStyle }
|
style = { ...style, ...tempStyle }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof data.class === 'string') {
|
if (typeof data.class === 'string' && data.class.trim() !== '') {
|
||||||
cls[data.class] = true
|
|
||||||
data.class.split(' ').forEach(c => { cls[c.trim()] = true })
|
data.class.split(' ').forEach(c => { cls[c.trim()] = true })
|
||||||
} else {
|
} else {
|
||||||
cls = { ...data.class, ...cls }
|
cls = { ...data.class, ...cls }
|
||||||
}
|
}
|
||||||
if (typeof tempCls === 'string') {
|
if (typeof tempCls === 'string' && tempCls.trim() !== '') {
|
||||||
tempCls.split(' ').forEach(c => { cls[c.trim()] = true })
|
tempCls.split(' ').forEach(c => { cls[c.trim()] = true })
|
||||||
} else {
|
} else {
|
||||||
cls = { ...cls, ...tempCls }
|
cls = { ...cls, ...tempCls }
|
||||||
|
|
Loading…
Reference in New Issue