fix(compiler-core): normalize v-bind:style with array literal value
fix #5106
This commit is contained in:
@@ -767,10 +767,11 @@ export function buildProps(
|
||||
}
|
||||
if (
|
||||
styleProp &&
|
||||
!isStaticExp(styleProp.value) &&
|
||||
// the static style is compiled into an object,
|
||||
// so use `hasStyleBinding` to ensure that it is a dynamic style binding
|
||||
(hasStyleBinding ||
|
||||
(styleProp.value.type === NodeTypes.SIMPLE_EXPRESSION &&
|
||||
styleProp.value.content.trim()[0] === `[`) ||
|
||||
// v-bind:style and style both exist,
|
||||
// v-bind:style with static literal object
|
||||
styleProp.value.type === NodeTypes.JS_ARRAY_EXPRESSION)
|
||||
|
||||
Reference in New Issue
Block a user