Skip to content

Commit

Permalink
fix(weex): support data class type that is string (vuejs#9139)
Browse files Browse the repository at this point in the history
  • Loading branch information
imyzf authored and aJean committed Aug 19, 2020
1 parent 96ab42a commit 7a69217
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/platforms/weex/runtime/modules/class.js
Expand Up @@ -44,6 +44,8 @@ function makeClassList (data: VNodeData): Array<string> {
classList.push.apply(classList, dataClass)
} else if (isObject(dataClass)) {
classList.push.apply(classList, Object.keys(dataClass).filter(className => dataClass[className]))
} else if (typeof dataClass === 'string') {
classList.push.apply(classList, dataClass.trim().split(/\s+/))
}
return classList
}
Expand Down

0 comments on commit 7a69217

Please sign in to comment.