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 hefeng committed Jan 25, 2019
1 parent 16919f4 commit a5725de
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 a5725de

Please sign in to comment.