Skip to content

Commit

Permalink
fix(weex): support data class type that is string (#9139)
Browse files Browse the repository at this point in the history
close #9124
  • Loading branch information
imyzf authored and yyx990803 committed Dec 11, 2018
1 parent 8fccd82 commit d8285c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/platforms/weex/runtime/modules/class.js
Original file line number Diff line number Diff line change
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 d8285c5

Please sign in to comment.