Skip to content

Commit a5725de

Browse files
imyzfhefeng
authored and
hefeng
committed
fix(weex): support data class type that is string (vuejs#9139)
close vuejs#9124
1 parent 16919f4 commit a5725de

File tree

1 file changed

+2
-0
lines changed
  • src/platforms/weex/runtime/modules

1 file changed

+2
-0
lines changed

src/platforms/weex/runtime/modules/class.js

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ function makeClassList (data: VNodeData): Array<string> {
4444
classList.push.apply(classList, dataClass)
4545
} else if (isObject(dataClass)) {
4646
classList.push.apply(classList, Object.keys(dataClass).filter(className => dataClass[className]))
47+
} else if (typeof dataClass === 'string') {
48+
classList.push.apply(classList, dataClass.trim().split(/\s+/))
4749
}
4850
return classList
4951
}

0 commit comments

Comments
 (0)