fix(runtime-core): support object syntax for class (#215)
This commit is contained in:
@@ -4,8 +4,7 @@ import {
|
||||
isString,
|
||||
isObject,
|
||||
EMPTY_ARR,
|
||||
extend,
|
||||
PatchFlags
|
||||
extend
|
||||
} from '@vue/shared'
|
||||
import {
|
||||
ComponentInternalInstance,
|
||||
@@ -146,9 +145,7 @@ export function createVNode(
|
||||
if (isReactive(props) || SetupProxySymbol in props) {
|
||||
props = extend({}, props)
|
||||
}
|
||||
// class normalization only needed if the vnode isn't generated by
|
||||
// compiler-optimized code
|
||||
if (props.class != null && !(patchFlag & PatchFlags.CLASS)) {
|
||||
if (props.class != null) {
|
||||
props.class = normalizeClass(props.class)
|
||||
}
|
||||
let { style } = props
|
||||
|
||||
Reference in New Issue
Block a user