Version
2.7.0-beta.3
Reproduction link
stackblitz.com
Steps to reproduce
- Create a Vue 2.7 project that uses the object property shorthand syntax within the template:
<p :style="{ color }">Test</p>
- See error within console: "Uncaught SyntaxError: Unexpected token '.'"
What is expected?
Template expressions support the object property shorthand syntax just like on Vue v2.6
What is actually happening?
The object property shorthand is not supported
The template compiler inserts code that looks like this { _vm.color } where it should probably be compiled to something like { color: _vm.color } instead